summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO30
-rw-r--r--.gitignore20
-rw-r--r--0001-replaced-time.clock-with-time.process_time-time-cloc.patch28
-rw-r--r--PKGBUILD66
4 files changed, 109 insertions, 35 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8f189505c54d..0bcfa099b4be 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,24 @@
pkgbase = python-pycrypto
- pkgdesc = Cryptographic primitives and algorithms for Python
- pkgver = 2.6.1
- pkgrel = 3
- url = https://pypi.python.org/pypi/pycrypto
- arch = any
- license = Public domain
+ pkgdesc = [DEPRECATED since 2013] Cryptographic primitives and algorithms for Python
+ pkgver = 2.7a1
+ pkgrel = 5
+ url = https://github.com/pycrypto/pycrypto/blob/master/README.md
+ arch = x86_64
+ license = custom:Unlicense
+ license = PSF
+ makedepends = gmp
makedepends = python-setuptools
- depends = python-flask
- provides = python-pycryptodome
- provides = python-crypto
- source = https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz
- sha256sums = f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c
+ conflicts = python-pycryptodome
+ source = pycrypto-2.7a1.tar.gz::https://github.com/pycrypto/pycrypto/archive/refs/tags/v2.7a1.tar.gz
+ source = 0001-replaced-time.clock-with-time.process_time-time-cloc.patch
+ b2sums = a64fa64402a603d58762e5ce752adad8d59fb13a20d54aa402d34c3f1c4c97d101f6f07c4bbb98262973532a1e7759af0f4a339ac2046e2b3ae1249761d28907
+ b2sums = 2095507a13248be6e995cd18350670580773b37a483121b9f416447ad2fcf82c8f2602d98e5ac277dca81255ac5472bfb8eb91d76860203a9e98043d0f192915
pkgname = python-pycrypto
+ arch = any
+ license = Unlicense
+ depends = python-crypto=2.7a1
+pkgname = python-crypto
+ depends = gmp
+ depends = python
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 c87c418dfe5d..39d3c3e2efc3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,52 @@
-# Maintainers: Drew DeVault <sir@cmpwn.com>
-# Current Maintainer: Bruce Zhang <zttt183525594@gmail.com>
+# Contributor: Davide Depau <davide@depau.eu>
+# Contributor: Drew DeVault <sir@cmpwn.com>
+# Contributor: Bruce Zhang <zttt183525594@gmail.com>
-pkgname='python-pycrypto'
-_pkgname='pycrypto'
-pkgver=2.6.1
-pkgrel=3
-pkgdesc='Cryptographic primitives and algorithms for Python'
-arch=('any')
-url='https://pypi.python.org/pypi/pycrypto'
-license=('Public domain')
-depends=('python-flask')
-makedepends=('python-setuptools')
-provides=('python-pycryptodome' 'python-crypto')
-source=("https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-${pkgver}.tar.gz")
-sha256sums=('f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c')
+pkgbase='python-pycrypto'
+pkgname=('python-pycrypto' 'python-crypto')
+_name="${pkgbase#python-}"
+pkgver=2.7a1
+pkgrel=5
+pkgdesc='[DEPRECATED since 2013] Cryptographic primitives and algorithms for Python'
+arch=('x86_64')
+_repourl="https://github.com/${_name}/${_name}"
+url="${_repourl}/blob/master/README.md"
+license=('custom:Unlicense' 'PSF')
+makedepends=(
+ 'gmp'
+ 'python-setuptools'
+)
+conflicts=('python-pycryptodome')
+_tarname="${_name}-${pkgver}"
+source=("${_tarname}.tar.gz::${_repourl}/archive/refs/tags/v${pkgver}.tar.gz"
+ '0001-replaced-time.clock-with-time.process_time-time-cloc.patch')
+b2sums=('a64fa64402a603d58762e5ce752adad8d59fb13a20d54aa402d34c3f1c4c97d101f6f07c4bbb98262973532a1e7759af0f4a339ac2046e2b3ae1249761d28907'
+ '2095507a13248be6e995cd18350670580773b37a483121b9f416447ad2fcf82c8f2602d98e5ac277dca81255ac5472bfb8eb91d76860203a9e98043d0f192915')
+
+prepare() {
+ cd "${_tarname}"
+ patch -p1 < '../0001-replaced-time.clock-with-time.process_time-time-cloc.patch'
+}
build() {
- cd "$_pkgname-$pkgver"
- python setup.py build
+ cd "${_tarname}"
+ python setup.py build
}
-package() {
- cd "$_pkgname-$pkgver"
- python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+package_python-pycrypto() {
+ arch=('any')
+ license=('Unlicense')
+ depends=("python-crypto=${pkgver}")
+}
+
+package_python-crypto() {
+ depends=(
+ 'gmp'
+ 'python'
+ )
+
+ 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}/{}" \;
}