summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcell Meszaros2022-07-07 01:57:45 +0200
committerMarcell Meszaros2022-07-07 01:58:28 +0200
commitd1bb8e647b9299518fd53e7275fbfc80fdca0814 (patch)
tree6f6a16dc75ba2818bd6f28c5acd8a3a38a916183
parentdbd3dc27d079ed0b784c4462028a529132933945 (diff)
downloadaur-d1bb8e647b9299518fd53e7275fbfc80fdca0814.tar.gz
2.6.1-7 (for real): fix split package, architecture and license
-rw-r--r--.SRCINFO20
-rw-r--r--.gitignore20
-rw-r--r--0001-replaced-time.clock-with-time.process_time-time-cloc.patch28
-rw-r--r--PKGBUILD45
4 files changed, 98 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e107d661621f..d99e1f5da673 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,24 @@
pkgbase = python-pycrypto
- pkgdesc = DEPRECATED and insecure since 2013, so this is an empty dummy. Use Arch/community/python-pycryptodome.
+ pkgdesc = [DEPRECATED since 2013] Cryptographic primitives and algorithms for Python
pkgver = 2.6.1
- pkgrel = 6
+ pkgrel = 7
url = https://github.com/pycrypto/pycrypto/blob/master/README.md
- arch = any
- license = Public domain
+ arch = x86_64
+ license = custom:Unlicense
+ license = PSF
+ makedepends = gmp
+ makedepends = python-setuptools
+ source = https://files.pythonhosted.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz
+ source = 0001-replaced-time.clock-with-time.process_time-time-cloc.patch
+ sha512sums = 20a4aed4dac4e9e61d773ebc1d48ea577e9870c33f396be53d075a9bf8487d93e75e200179882d81e452efd0f6751789bac434f6f431b3e7c1c8ef9dba392847
+ sha512sums = 9a8c9812b3a13701571cb9cebb2fd755be7206f4045cbec76375259b716c2769dd25996cd8af89248cf7d9de0b088193a245442169c0c645ccd6083b529e3e50
pkgname = python-pycrypto
+ arch = any
+ license = Unlicense
depends = python-crypto=2.6.1
pkgname = python-crypto
+ depends = gmp
+ depends = python
+ conflicts = python-pycryptodome
diff --git a/.gitignore b/.gitignore
index 0a2223f3641d..6696e5c62eee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,16 @@
-*.tar.gz
-*.tar.xz
-src/
-pkg/
+# from https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore
+*.tar
+*.tar.*
+*.rpm
+*.jar
+*.exe
+*.msi
+*.zip
+*.tgz
+*.log
+*.log.*
+
+*/
+*.orig
+*.bak
+*.backup
diff --git a/0001-replaced-time.clock-with-time.process_time-time-cloc.patch b/0001-replaced-time.clock-with-time.process_time-time-cloc.patch
new file mode 100644
index 000000000000..bd203159ebd8
--- /dev/null
+++ b/0001-replaced-time.clock-with-time.process_time-time-cloc.patch
@@ -0,0 +1,28 @@
+From 6d41ad025331afce9e495d7be3205730ddfa8f07 Mon Sep 17 00:00:00 2001
+From: Fabian Topfstedt <topfstedt@schneevonmorgen.com>
+Date: Mon, 18 Nov 2019 22:19:35 +0100
+Subject: [PATCH] replaced time.clock with time.process_time (time clock was
+ flagged as deprecated in Python 3.3 and got removed in Python 3.8)
+
+---
+ lib/Crypto/Random/_UserFriendlyRNG.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Crypto/Random/_UserFriendlyRNG.py b/lib/Crypto/Random/_UserFriendlyRNG.py
+index 957e006..f389cfc 100644
+--- a/lib/Crypto/Random/_UserFriendlyRNG.py
++++ b/lib/Crypto/Random/_UserFriendlyRNG.py
+@@ -73,8 +73,8 @@ class _EntropyCollector(object):
+ t = time.time()
+ self._time_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
+
+- # Add the fractional part of time.clock()
+- t = time.clock()
++ # Add the fractional part of time.process_time()
++ t = time.process_time()
+ self._clock_es.feed(struct.pack("@I", int(2**30 * (t - floor(t)))))
+
+
+--
+2.27.0
+
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}/{}" \;
}