blob: 56eeb8b948b387a3ccdc6a0589cf9548ff77eee7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Maintainer: Gabriel Giovanini <mail@gabrielgio.me>
pkgname=photoview
pkgver=2.3.13
pkgrel=4
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"
depends="
exiftool
ffmpeg
"
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
"
|