debian-packages/packages/bin/dufs-bin/DEBBUILD
leafee98 82734470d2
All checks were successful
ci/woodpecker/push/build Pipeline was successful
refactor package directory, enhance build script
- update makedeb
- use bin, git, normal, leafee98 to classify packages
- only build package from leafee98 and bin in ci
- add script to build all packages locally
- add more log about running hook in build.sh
2023-08-18 17:28:14 +08:00

34 lines
858 B
Plaintext

#/usr/bin/env bash
pkgname="dufs"
arch="amd64"
pkgver="0.35.0"
pkgrel=1
pkgdesc="A file server that supports static serving, uploading, searching, accessing control, webdav..."
url="https://github.com/sigoden/dufs"
maintainer="Leafee98 <me@leafee98.com>"
_arch="x86_64"
platform="unknown-linux-musl"
source=(
"dufs-v${pkgver}-${_arch}-${platform}.tar.gz::https://github.com/sigoden/dufs/releases/download/v${pkgver}/dufs-v${pkgver}-${_arch}-${platform}.tar.gz"
"dufs.service::materials/dufs.service"
)
function package {
install -Dm755 "${srcdir}/dufs" "${pkgdir}/usr/local/bin/dufs"
install -Dm644 "${srcdir}/dufs.service" "${pkgdir}/usr/lib/systemd/system/dufs.service"
}
function debian_postinst {
cat << EOF
#!/usr/bin/env bash
useradd --system dufs
mkdir -p /srv/dufs
chown dufs:dufs -R /srv/dufs
systemctl daemon-reload
EOF
}