blob: 6b5cb76a12b6a9b919b2421017b7fb7c988c1562 (
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
|
# Maintainer: Hugo Rodrigues <hugorodrigues@hugorodrigues.xyz>
pkgname=filebrowser
pkgver=2.23.0
pkgrel=3
pkgdesc="Web File Browser"
url="https://github.com/filebrowser/filebrowser"
arch="x86_64"
license="Apache-2.0"
makedepends="go npm"
pkgusers="$pkgname"
pkggroups="$pkgname"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/filebrowser/filebrowser/archive/refs/tags/v$pkgver.tar.gz
filebrowser.initd
filebrowser.confd
"
prepare() {
default_prepare
# Set binary version inside go
sed -i "s/(untracked)/$pkgver/g" version/version.go
}
build() {
cd frontend
npm ci
# ancient webpack
NODE_OPTIONS="--openssl-legacy-provider" \
npm run build
cd "$builddir"
go build
}
check() {
go test ./...
}
package() {
install -Dm755 filebrowser -t "$pkgdir"/usr/bin/
install -Dm 644 "$srcdir"/filebrowser.confd "$pkgdir"/etc/conf.d/filebrowser
install -Dm 755 "$srcdir"/filebrowser.initd "$pkgdir"/etc/init.d/filebrowser
install -dDm 770 -o $pkgusers -g $pkggroups "$pkgdir"/var/lib/$pkgname
install -dDm 770 -o $pkgusers -g $pkggroups "$pkgdir"/var/lib/$pkgname/data
}
sha512sums="
4e683402d4b9ff738d0bf4dc9633500167d2992eacd8bb71744ded8f5c5188a66a076c3ebd917629130ba8518a90743544eaeacb83dfff7f9ee13958346ac874 filebrowser-2.23.0.tar.gz
381cabc633f5076e46e32c5b69aca5b4c82fc227b4cbfef4d0f710db9d9a5db46dc8f29c1641f4af20fb6dc70eb33d2af63d93e194ccc2e94a6c9fae8c7f9906 filebrowser.initd
2d95fe1cef5f5a1a76448a25bed6d66d996b4a3cf6852dd7c8a63c52efc05dfff41bb7e0db20ec344c5389110852d5949131bc0a02fa3c2a48654b27a568dd7c filebrowser.confd
"
|