package/python-pycrypto: fix legal-info
authorYann E. MORIN <yann.morin.1998@free.fr>
Mon, 23 Dec 2013 17:39:48 +0000 (18:39 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 25 Dec 2013 09:08:45 +0000 (10:08 +0100)
The pycrypto package contains a LICENSE.orig file, but apply-patches.sh
removes all .orig file, so we can't list a .orig file asa license file,
as it would have disapeared by the time 'make legal-info' sould be called.

Add a post-extract hook that renames this license file, so it is renamed
just before we apply patches and remove .orig files.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Ryan Barnett <rjbarnet@rockwellcollins.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/python-pycrypto/python-pycrypto.mk

index eda48bd50de28953925bfda8b6da65e342c4747e..f872ccc2425cda38806330e5d523bb9dadaa6120 100644 (file)
@@ -11,7 +11,17 @@ PYTHON_PYCRYPTO_SETUP_TYPE = distutils
 
 PYTHON_PYCRYPTO_LICENSE = Public Domain, Python 2.2 License (HMAC.py, setup.py)
 PYTHON_PYCRYPTO_LICENSE_FILES = COPYRIGHT LEGAL/copy/LICENSE.libtom \
-               LEGAL/copy/LICENSE.orig LEGAL/copy/LICENSE.python-2.2
+               LEGAL/copy/LICENSE.python-2.2
+
+# The pycrypto package contains a LICENSE.orig file, but our patching
+# infrastrucure removes all .orig file, so we must rename that license
+# file prior to patching, so it is still available to the legal-info
+# infrastructure
+define PYTHON_PYCRYPTO_RENAME_LICENSE
+       mv $(@D)/LEGAL/copy/LICENSE.orig $(@D)/LEGAL/copy/LICENSE.original
+endef
+PYTHON_PYCRYPTO_POST_EXTRACT_HOOKS += PYTHON_PYCRYPTO_RENAME_LICENSE
+PYTHON_PYCRYPTO_LICENSE_FILES += LEGAL/copy/LICENSE.original
 
 PYTHON_PYCRYPTO_DEPENDENCIES = gmp