blob: d2cb83d89babeede80e82d43742357cabe7aaa6a (
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
|
# Maintainer: Fabio 'Lolix' Loli <fabio.loli@disroot.org> -> https://github.com/FabioLolix
# Contributor: Dct Mei <dctxmei@gmail.com>
pkgname=filebrowser-git
pkgver=2.32.0.r1.g35d1c092
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 pnpm go.rice)
provides=(filebrowser)
conflicts=(filebrowser)
source=("git+https://github.com/filebrowser/filebrowser.git"
"filebrowser@.service")
sha512sums=('SKIP'
'0846815afbb3c5ccbb097a5361461ca0ada69e04246935afb123f4609d09cd61f9e3fe50e3b6698b3e4c1f335cbb0aa3d998cae13b422e2989aad62ed7ce4682')
options=(emptydirs !lto)
pkgver() {
cd "filebrowser"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
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}"/filebrowser/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
}
|