2023-03-27 13:56:56 +00:00
|
|
|
#/usr/bin/env bash
|
|
|
|
|
|
|
|
pkgname="dufs"
|
2023-08-02 14:30:49 +00:00
|
|
|
arch="amd64"
|
2023-12-06 14:31:41 +00:00
|
|
|
pkgver="0.38.0"
|
2023-08-24 14:33:19 +00:00
|
|
|
pkgrel=1
|
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
|
2023-08-18 12:40:34 +00:00
|
|
|
adduser --system dufs
|
2023-03-27 13:56:56 +00:00
|
|
|
mkdir -p /srv/dufs
|
|
|
|
chown dufs:dufs -R /srv/dufs
|
|
|
|
systemctl daemon-reload
|
|
|
|
EOF
|
|
|
|
}
|