debian-packages/packages/bin/filebrowser-bin/DEBBUILD

41 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-04-03 14:25:12 +00:00
#/usr/bin/env bash
pkgname="filebrowser"
arch="amd64"
2024-01-03 07:40:58 +00:00
pkgver="2.27.0"
pkgrel=2
2023-04-03 14:25:12 +00:00
pkgdesc="Web File Browser"
maintainer="Leafee98 <me@leafee98.com>"
2023-08-02 14:37:05 +00:00
url="https://github.com/filebrowser/filebrowser"
2023-04-03 14:25:12 +00:00
_architecture="linux-amd64"
_tar_name="${_architecture}-filebrowser"
source=(
2024-01-03 07:40:58 +00:00
"${_tar_name}-${pkgver}.tar.gz::https://github.com/filebrowser/filebrowser/releases/download/v${pkgver}/${_tar_name}.tar.gz"
2023-04-03 14:25:12 +00:00
"filebrowser.service::materials/filebrowser.service"
)
function package {
install -Dm755 ${srcdir}/filebrowser ${pkgdir}/usr/bin/filebrowser
2023-04-13 01:10:51 +00:00
install -Dm644 ${srcdir}/CHANGELOG.md ${pkgdir}/usr/share/filebrowser/CHANGELOG.md
install -Dm644 ${srcdir}/LICENSE ${pkgdir}/usr/share/filebrowser/LICENSE
install -Dm644 ${srcdir}/README.md ${pkgdir}/usr/share/filebrowser/README.md
2023-04-03 14:25:12 +00:00
install -Dm644 ${srcdir}/filebrowser.service ${pkgdir}/usr/lib/systemd/system/filebrowser.service
}
function debian_postinst {
cat << EOF
#!/usr/bin/env bash
adduser --system --group filebrowser
systemctl daemon-reload
if systemctl is-active --quiet filebrowser.service ; then
systemctl restart filebrowser.service
fi
EOF
}