summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMarcell Meszaros2022-07-07 01:57:45 +0200
committerMarcell Meszaros2022-07-07 01:58:28 +0200
commitd1bb8e647b9299518fd53e7275fbfc80fdca0814 (patch)
tree6f6a16dc75ba2818bd6f28c5acd8a3a38a916183 /PKGBUILD
parentdbd3dc27d079ed0b784c4462028a529132933945 (diff)
downloadaur-d1bb8e647b9299518fd53e7275fbfc80fdca0814.tar.gz
2.6.1-7 (for real): fix split package, architecture and license
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD45
1 files changed, 38 insertions, 7 deletions
diff --git a/PKGBUILD b/PKGBUILD
index fa133245f45d..451c82397d56 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,17 +4,48 @@
pkgbase='python-pycrypto'
pkgname=('python-pycrypto' 'python-crypto')
+_name="${pkgbase#python-}"
pkgver=2.6.1
-pkgrel=6
-pkgdesc='DEPRECATED and insecure since 2013, so this is an empty dummy. Use Arch/community/python-pycryptodome.'
-arch=('any')
-url='https://github.com/pycrypto/pycrypto/blob/master/README.md'
-license=('Public domain')
+pkgrel=7
+pkgdesc='[DEPRECATED since 2013] Cryptographic primitives and algorithms for Python'
+arch=('x86_64')
+url="https://github.com/${_name}/${_name}/blob/master/README.md"
+license=('custom:Unlicense' 'PSF')
+makedepends=(
+ 'gmp'
+ 'python-setuptools'
+)
+_tarname="${_name}-${pkgver}"
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_tarname}.tar.gz"
+ '0001-replaced-time.clock-with-time.process_time-time-cloc.patch')
+sha512sums=('20a4aed4dac4e9e61d773ebc1d48ea577e9870c33f396be53d075a9bf8487d93e75e200179882d81e452efd0f6751789bac434f6f431b3e7c1c8ef9dba392847'
+ '9a8c9812b3a13701571cb9cebb2fd755be7206f4045cbec76375259b716c2769dd25996cd8af89248cf7d9de0b088193a245442169c0c645ccd6083b529e3e50')
+
+prepare() {
+ cd "${_tarname}"
+ patch -p1 < '../0001-replaced-time.clock-with-time.process_time-time-cloc.patch'
+}
+
+build() {
+ cd "${_tarname}"
+ python setup.py build
+}
package_python-pycrypto() {
- depends=("python-crypto=${pkgver}")
+ arch=('any')
+ license=('Unlicense')
+ depends=("python-crypto=${pkgver}")
}
package_python-crypto() {
- cd "${srcdir}"
+ depends=(
+ 'gmp'
+ 'python'
+ )
+ conflicts=('python-pycryptodome')
+
+ cd "${_tarname}"
+ python setup.py install --root="${pkgdir}" --prefix='/usr' --optimize=1 --skip-build
+ install -Dm 644 'COPYRIGHT' "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ find 'LEGAL/' -type f -exec install -Dm 644 "{}" "${pkgdir}/usr/share/licenses/${pkgname}/{}" \;
}