2023-06-30 14:02:31 +00:00
|
|
|
#/usr/bin/env bash
|
|
|
|
|
|
|
|
pkgname="plik-bin"
|
2023-08-02 14:30:49 +00:00
|
|
|
arch="amd64"
|
2024-01-30 08:55:08 +00:00
|
|
|
pkgrel=6
|
2023-09-20 02:40:54 +00:00
|
|
|
pkgver="1.3.8"
|
2023-06-30 14:02:31 +00:00
|
|
|
pkgdesc="Plik is a temporary file upload system (Wetransfer like) in Go."
|
|
|
|
_arch="amd64"
|
|
|
|
url="https://github.com/root-gg/plik/"
|
|
|
|
maintainer="Leafee98 <me@leafee98.com>"
|
|
|
|
|
|
|
|
_pkgname_base="plik-${pkgver}-linux-${_arch}"
|
|
|
|
_pkgname="${_pkgname_base}.tar.gz"
|
|
|
|
source=(
|
2023-09-20 02:40:54 +00:00
|
|
|
"${_pkgname}::https://github.com/root-gg/plik/releases/download/${pkgver}/${_pkgname}"
|
2023-06-30 14:02:31 +00:00
|
|
|
"plikd.service::materials/plikd.service"
|
|
|
|
)
|
|
|
|
|
|
|
|
function package {
|
|
|
|
install -Dm755 ${srcdir}/${_pkgname_base}/server/plikd ${pkgdir}/usr/bin/plikd
|
|
|
|
install -Dm644 ${srcdir}/${_pkgname_base}/server/plikd.cfg ${pkgdir}/etc/plik/plikd-sample.cfg
|
|
|
|
|
|
|
|
mkdir -p ${pkgdir}/usr/lib/plik
|
|
|
|
cp -r ${srcdir}/${_pkgname_base}/{changelog,clients,webapp} ${pkgdir}/usr/lib/plik
|
|
|
|
|
|
|
|
install -Dm755 ${srcdir}/plikd.service ${pkgdir}/usr/lib/systemd/system/plikd.service
|
|
|
|
}
|
|
|
|
|
|
|
|
function debian_postinst {
|
|
|
|
cat << EOF
|
|
|
|
#!/usr/bin/env bash
|
2024-01-30 08:55:08 +00:00
|
|
|
adduser --system --group plik
|
2023-12-13 09:19:28 +00:00
|
|
|
|
2023-06-30 14:02:31 +00:00
|
|
|
systemctl daemon-reload
|
2023-12-13 09:37:20 +00:00
|
|
|
if systemctl is-active --quiet plikd.service ; then
|
|
|
|
systemctl restart plikd.service
|
2023-12-13 09:19:28 +00:00
|
|
|
fi
|
2023-06-30 14:02:31 +00:00
|
|
|
EOF
|
|
|
|
}
|