blob: b232fa7131947709a67258a30483efafdbc35587 (
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
|
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
pkgname=filebrowser
pkgver=2.31.2
pkgrel=1
pkgdesc="Standalone web file manager"
arch=(x86_64)
url="https://filebrowser.org/"
license=(Apache-2.0)
depends=(glibc)
makedepends=(git go nodejs npm go.rice)
source=("git+https://github.com/filebrowser/filebrowser.git#tag=v${pkgver}"
"filebrowser@.service")
sha512sums=('3dd8cf2c8aa3367ea5c5f7c9d8bc03f17647b9bdf9bacd4dfebaa91d2970600a5c6afbd32460898b3dd56eca3c68cf0cf1331cc912a0681ab189e48b6311aaf9'
'0846815afbb3c5ccbb097a5361461ca0ada69e04246935afb123f4609d09cd61f9e3fe50e3b6698b3e4c1f335cbb0aa3d998cae13b422e2989aad62ed7ce4682')
options=(emptydirs !lto)
build() {
cd "filebrowser/frontend"
npm install
echo "DONE NPM INSTALL"
#npm update --legacy-peer-deps
npm update --force
echo "DONE NPM UPDATE"
npm run build
echo "DONE NPM RUN BUILD"
cd "${srcdir}/filebrowser/http"
rice embed-go
echo "DONE rice embed-go"
cd "${srcdir}/filebrowser"
export GOPATH="$SRCDEST/go-modules"
go build \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
.
}
package() {
install -Dm644 filebrowser@.service "${pkgdir}"/usr/lib/systemd/system/filebrowser@.service
install -Dm755 "${srcdir}/${pkgname}/filebrowser" "${pkgdir}"/usr/bin/filebrowser
install -d "${pkgdir}"/usr/share/filebrowser
install -d "${pkgdir}"/etc/filebrowser/
# cd "${pkgdir}"/usr/share/filebrowser
# "${srcdir}"/filebrowser/filebrowser config init
# "${srcdir}"/filebrowser/filebrowser config export ${pkgdir}/etc/filebrowser/config.json
}
|