[arch-commits] Commit in khard/trunk (PKGBUILD)
David Runge
dvzrv at archlinux.org
Wed Jul 15 21:25:56 UTC 2020
Date: Wednesday, July 15, 2020 @ 21:25:56
Author: dvzrv
Revision: 664013
upgpkg: khard 0.16.1-2: Rebuilding for reproducibility.
Exporting PYTHONHASHSEED so .pyc files stay reproducible.
Removing prepopulated __pycache__ directory before build() and after check() as it makes the package non-reproducible.
Modified:
khard/trunk/PKGBUILD
----------+
PKGBUILD | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-07-15 21:18:23 UTC (rev 664012)
+++ PKGBUILD 2020-07-15 21:25:56 UTC (rev 664013)
@@ -2,7 +2,7 @@
pkgname=khard
pkgver=0.16.1
-pkgrel=1
+pkgrel=2
pkgdesc="Console CardDAV client"
arch=('any')
url="https://github.com/scheibler/khard"
@@ -17,23 +17,31 @@
source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/${pkgname}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('617959667807e3108e4e73d8c9600da80d09daededdffcb0025941bff8f6ed3fc12f02dd2e0f39d1dc9cad125bf386308ed311e59ea5fa366fa9979ebe10aa62')
+prepare() {
+ cd "$pkgname-$pkgver"
+ # removing prepopulated __pycache__ directory
+ # https://github.com/scheibler/khard/issues/268
+ rm -rvf test/__pycache__
+}
+
build() {
cd "$pkgname-$pkgver"
python setup.py build
- make -C doc singlehtml man
+ make -C doc man
}
check() {
cd "$pkgname-$pkgver"
pytest -v
+ rm -rvf test/__pycache__
}
package() {
cd "$pkgname-$pkgver"
+ export PYTHONHASHSEED=0
python setup.py install --skip-build \
- --optimize=1 \
- --prefix=/usr \
- --root="${pkgdir}"
+ --optimize=1 \
+ --root="${pkgdir}"
# additional wrapper script
install -vDm 755 "misc/sdiff/sdiff_${pkgname}_wrapper.sh" \
"${pkgdir}/usr/lib/${pkgname}/sdiff_${pkgname}_wrapper.sh"
@@ -53,9 +61,4 @@
-t "${pkgdir}/usr/share/man/man1"
install -vDm 644 "doc/build/man/${pkgname}.conf.5" \
-t "${pkgdir}/usr/share/man/man5"
- # html
- install -vDm 644 "doc/build/singlehtml/index.html" \
- -t "${pkgdir}/usr/share/doc/${pkgname}/html"
- install -vDm 644 "doc/build/singlehtml/_static/"*.{css,js,png} \
- -t "${pkgdir}/usr/share/doc/${pkgname}/html/_static"
}
More information about the arch-commits
mailing list