debian-packages/packages/bin/dufs-bin/DEBBUILD

39 lines
951 B
Plaintext
Raw Normal View History

2023-03-27 13:56:56 +00:00
#/usr/bin/env bash
pkgname="dufs"
arch="amd64"
2024-01-14 05:02:24 +00:00
pkgver="0.39.0"
pkgrel=3
2023-03-27 13:56:56 +00:00
pkgdesc="A file server that supports static serving, uploading, searching, accessing control, webdav..."
url="https://github.com/sigoden/dufs"
maintainer="Leafee98 <me@leafee98.com>"
2023-08-06 11:51:31 +00:00
_arch="x86_64"
2023-03-27 13:56:56 +00:00
platform="unknown-linux-musl"
source=(
2023-08-06 11:51:31 +00:00
"dufs-v${pkgver}-${_arch}-${platform}.tar.gz::https://github.com/sigoden/dufs/releases/download/v${pkgver}/dufs-v${pkgver}-${_arch}-${platform}.tar.gz"
2023-03-27 13:56:56 +00:00
"dufs.service::materials/dufs.service"
)
function package {
2023-11-09 08:14:40 +00:00
install -Dm755 "${srcdir}/dufs" "${pkgdir}/usr/bin/dufs"
2023-03-27 13:56:56 +00:00
install -Dm644 "${srcdir}/dufs.service" "${pkgdir}/usr/lib/systemd/system/dufs.service"
}
function debian_postinst {
cat << EOF
#!/usr/bin/env bash
adduser --system --group dufs
2023-03-27 13:56:56 +00:00
mkdir -p /srv/dufs
chown dufs:dufs -R /srv/dufs
2023-03-27 13:56:56 +00:00
systemctl daemon-reload
if systemctl is-active --quiet dufs.service ; then
systemctl restart dufs.service
fi
2023-03-27 13:56:56 +00:00
EOF
}