debian-packages/packages/bin/forgejo-bin/DEBBUILD
leafee98 f3ca37573a
All checks were successful
ci/woodpecker/push/build Pipeline was successful
update forgejo to 1.21.2-1
2023-12-13 16:15:39 +08:00

38 lines
989 B
Bash

#!/usr/bin/env bash
pkgname="forgejo"
arch="amd64"
pkgrel=1
pkgver="1.21.2-1"
pkgdesc="A painless selfhost git service."
url="https://codeberg.org/forgejo/forgejo"
maintainer="Leafee98 <me@leafee98.com>"
_arch="amd64"
source=(
"forgejo-${pkgver}-linux-${_arch}.xz::https://codeberg.org/forgejo/forgejo/releases/download/v${pkgver}/forgejo-${pkgver}-linux-${_arch}.xz"
"forgejo.service::materials/forgejo.service"
"robots.txt::materials/robots.txt"
)
function package {
install -Dm755 "${srcdir}/forgejo-${pkgver}-linux-${_arch}" "${pkgdir}/usr/bin/forgejo"
install -Dm644 "${srcdir}/forgejo.service" "${pkgdir}/usr/lib/systemd/system/forgejo.service"
install -Dm644 "${srcdir}/robots.txt" "${pkgdir}/etc/forgejo/robots.txt"
}
function debian_postinst {
cat << EOF
#!/usr/bin/env bash
mkdir -p /var/lib/forgejo
mkdir -p /etc/forgejo/conf
touch /etc/forgejo/conf/app.ini
adduser --system git
chown -R git:git /var/lib/forgejo
systemctl daemon-reload
EOF
}