aboutsummaryrefslogtreecommitdiff
path: root/apks/photoview/APKBUILD
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-03-10 21:53:09 +0100
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-03-20 18:14:44 +0100
commite89c3ae528d667a63b9716653f9f926bf416f2ee (patch)
tree9c60bbc9f62f87b2f997ac46573d80ab482fa6ad /apks/photoview/APKBUILD
parent2a53753fc4006af8456c282edf88aad35fce52c7 (diff)
downloadapkbuilds-e89c3ae528d667a63b9716653f9f926bf416f2ee.tar.gz
apkbuilds-e89c3ae528d667a63b9716653f9f926bf416f2ee.tar.bz2
apkbuilds-e89c3ae528d667a63b9716653f9f926bf416f2ee.zip
feat: add initial photoview APKBUILD
Diffstat (limited to 'apks/photoview/APKBUILD')
-rw-r--r--apks/photoview/APKBUILD63
1 files changed, 63 insertions, 0 deletions
diff --git a/apks/photoview/APKBUILD b/apks/photoview/APKBUILD
new file mode 100644
index 0000000..ab6003c
--- /dev/null
+++ b/apks/photoview/APKBUILD
@@ -0,0 +1,63 @@
+# Maintainer: Gabriel Giovanini <mail@gabrielgio.me>
+pkgname=photoview
+pkgver=2.3.13
+pkgrel=2
+pkgdesc="Photo gallery for self-hosted personal servers"
+url="https://github.com/photoview/photoview"
+arch="x86_64"
+license="AGPL-3.0"
+install="$pkgname.pre-install"
+makedepends="go
+ npm
+ dlib-dev
+ yaml-dev
+ libheif-dev
+ jpeg-dev
+ blas-dev
+ lapack-dev
+ exiftool
+ ffmpeg-dev"
+subpackages="$pkgname-openrc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/photoview/photoview/archive/v$pkgver.tar.gz
+ $pkgname.pre-install
+ $pkgname.initd
+ $pkgname.confd"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver/api"
+ go build -o "$pkgname" server.go
+
+ cd "$srcdir/$pkgname-$pkgver/ui"
+ npm ci --yes --omit=dev --ignore-scripts
+ npm run build
+}
+
+check() {
+ cd "$srcdir/$pkgname-$pkgver/api"
+ go test ./...
+
+ cd "$srcdir/$pkgname-$pkgver/ui"
+ npm install
+ CI=true npm run test
+}
+
+package() {
+ install -Dm755 api/"$pkgname" "$pkgdir/usr/bin/$pkgname"
+ install -d "${pkgdir}/var/cache/${pkgname}/media_cache"
+
+ cd "$srcdir/$pkgname-$pkgver/ui/dist"
+ find * -type f -exec install -Dm0644 "{}" "${pkgdir}/usr/share/webapps/${pkgname}/{}" \;
+
+ install -d "${pkgdir}/var/lib/${pkgname}"
+
+ install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+}
+
+sha512sums="
+63feaaa33257a5f529fe87f354b1937f7eac60faf1ec0d01c1ca91bf6929b08b680359c044879e9ab96329690baa543e19d4cf0237b20fda152c39631496cd59 photoview-2.3.13.tar.gz
+25ab91023866397d7e7557c546606212c1c59f97d7a4f1dc091b717c5daaadcb35ab82552bc7ee723baf9b5dd8a76114e027ab453e4db9469931378655c82a29 photoview.pre-install
+e93390bbd9cf50f4838fdbe217656722781d07dcedebbbef27060df69107ebd5f04b8dec54f1802318e6da8f3a3c9c74a301c208e92713d3c785c7e35f14f55b photoview.initd
+41e8ac7cca9051b7420de9c4fb67bad0168ac1ecc4ff63761defb1e025b0cbc8264443e2488af18b21ecd189d63cf2037103d3a6d6ba83eaf362c578f765da31 photoview.confd
+"