debian-packages/forgejo-bin/DEBBUILD
leafee98 ea5bd7e4fd
All checks were successful
ci/woodpecker/push/build_bin Pipeline was successful
ci/woodpecker/push/build_other Pipeline was successful
update forgejo to 1.20.1-0
2023-07-25 12:09:56 +08:00

35 lines
883 B
Plaintext

#/usr/bin/env bash
pkgname="forgejo"
pkgrel=1
pkgver="1.20.1-0"
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"
)
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"
}
function debian_postinst {
cat << EOF
#!/usr/bin/env bash
mkdir -p /var/lib/forgejo
mkdir -p /etc/forgejo
touch /etc/forgejo/app.ini
useradd --system git
chown -R git:git /var/lib/forgejo /etc/forgejo /etc/forgejo/app.ini
systemctl daemon-reload
EOF
}