2023-03-27 13:56:56 +00:00
|
|
|
#/usr/bin/env bash
|
|
|
|
|
|
|
|
pkgname="dufs"
|
2023-08-02 14:30:49 +00:00
|
|
|
arch="amd64"
|
2024-01-14 05:02:24 +00:00
|
|
|
pkgver="0.39.0"
|
2024-01-30 08:55:08 +00:00
|
|
|
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
|
2024-01-30 08:55:08 +00:00
|
|
|
adduser --system --group dufs
|
2023-12-13 09:19:28 +00:00
|
|
|
|
2023-03-27 13:56:56 +00:00
|
|
|
mkdir -p /srv/dufs
|
|
|
|
chown dufs:dufs -R /srv/dufs
|
2023-12-13 09:19:28 +00:00
|
|
|
|
2023-03-27 13:56:56 +00:00
|
|
|
systemctl daemon-reload
|
2023-12-13 09:19:28 +00:00
|
|
|
if systemctl is-active --quiet dufs.service ; then
|
|
|
|
systemctl restart dufs.service
|
|
|
|
fi
|
2023-03-27 13:56:56 +00:00
|
|
|
EOF
|
|
|
|
}
|