M krystianch/photobrowser/APKBUILD => krystianch/photobrowser/APKBUILD +40 -14
@@ 1,24 1,27 @@
# Maintainer: Krystian Chachuła <krystian@krystianch.com>
pkgname=photobrowser
-pkgver=0.1.3
+pkgver=0.1.4
pkgrel=0
pkgdesc="Web photo and video browser"
-url="https://sr.ht/~krystianch/photobrowser"
+url="https://sr.ht/~krystianch/photobrowser/"
arch="noarch"
license="AGPL-3.0-or-later"
depends="python3 py3-bcrypt py3-click py3-flask py3-inotify_simple py3-jinja2 py3-pillow py3-qrcode py3-werkzeug py3-zipstream ffmpeg"
-makedepends="py3-gpep517 py3-wheel py3-setuptools gettext"
+makedepends="py3-gpep517 py3-setuptools py3-wheel gettext"
+checkdepends="py3-pytest"
+install="$pkgname.pre-install"
subpackages="$pkgname-pyc"
-source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~krystianch/photobrowser/archive/v$pkgver.tar.gz"
+source="
+ photobrowser.initd
+ photobrowser.confd
+ photobrowser-thumbs.initd
+ photobrowser-thumbs.confd
+ photobrowser-clips.initd
+ photobrowser-clips.confd
+ $pkgname-$pkgver.tar.gz::https://git.sr.ht/~krystianch/photobrowser/archive/v$pkgver.tar.gz
+ "
builddir="$srcdir/$pkgname-v$pkgver"
-prepare() {
- default_prepare
- msgfmt \
- -o photobrowser/locale/pl_PL/LC_MESSAGES/photobrowser.mo \
- photobrowser/locale/pl_PL/LC_MESSAGES/photobrowser.po
-}
-
build() {
gpep517 build-wheel \
--wheel-dir .dist \
@@ 26,14 29,37 @@ build() {
}
check() {
- python -m unittest discover -s test
+ python3 -m venv --clear --without-pip --system-site-packages .testenv
+ .testenv/bin/python3 -m installer .dist/*.whl
+ .testenv/bin/python3 -m pytest
}
package() {
python3 -m installer -d "$pkgdir" \
- .dist/photobrowser-$pkgver-py3-none-any.whl
+ .dist/*.whl
+
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname
+
+ install -m755 -D "$srcdir"/$pkgname-thumbs.initd \
+ "$pkgdir"/etc/init.d/$pkgname-thumbs
+ install -m644 -D "$srcdir"/$pkgname-thumbs.confd \
+ "$pkgdir"/etc/conf.d/$pkgname-thumbs
+
+ install -m755 -D "$srcdir"/$pkgname-clips.initd \
+ "$pkgdir"/etc/init.d/$pkgname-clips
+ install -m644 -D "$srcdir"/$pkgname-clips.confd \
+ "$pkgdir"/etc/conf.d/$pkgname-clips
}
sha512sums="
-a1503f53de0585de6b577377a11f07ee8953e3916cde31bcfaf4facd1c8e030757ef4cb87becac49d9ccec9a56730ec1505c1e22f1407bca4ab9ffc756fb4f32 photobrowser-0.1.3.tar.gz
+cf41b80b5e140cadb47f6727d2eb223ac75d78c216b209248af28dbd8f089e7ca62d2ed8e136b6fc2d58cb281d05902a6752b40dcb92aba7b4a9619aba5d8cf0 photobrowser.initd
+711655c974ae9774a1b6adc83ba93556753db9d3384cca67bd9e06c9276aa0d2f24d248b1aad68c5b61520a2df9b88e1617a626b4381d0378982b8df30c319a7 photobrowser.confd
+6133390ba0f2e5217f02c3be045400d6145172277516ac0700c455d553e0c40c730f8424fb3849f9f07ec26061bc1d490eaad0152c69c44e5a38a31eea8396be photobrowser-thumbs.initd
+f54d7acbf77987f0b4a6e9bc4d4c89e604e280986362a2887c97921b4082174ba9c5d0585592dc8d182f50a03aa15c459adf4feea0dd25c45fecde5b204f4c07 photobrowser-thumbs.confd
+cc88bcf4973ea2c7476730e67ffd15ae4e1b7a56c4d5201eed94cd493e05452f21c589333cd41ad19e9b26e76a851370766e68d377e62adf30b4dec0a28df581 photobrowser-clips.initd
+dd9822de89cb800a89b3098623a72bde96c4983ef06863f853ffa52b06e4115f5c5a97446fd10d6907fdec77b18509d79a42aad54e6a7468679c8ca48297a994 photobrowser-clips.confd
+121f48cc78ce12fbdffa0b62921f563294a4a21ba413e5d4466b63aaccff96fdc3413430cf28dc9bfe35958ac6f2301b26fa2891804eb8551b97bac96bb81ff0 photobrowser-0.1.4.tar.gz
"