debian-packages/forgejo-bin/DEBBUILD

34 lines
831 B
Plaintext
Raw Normal View History

2023-03-27 14:27:46 +00:00
#/usr/bin/env bash
pkgname="forgejo"
pkgrel=1
2023-04-15 01:15:08 +00:00
pkgver="1.19.1-0"
2023-03-27 14:27:46 +00:00
pkgdesc="A painless selfhost git service."
url="https://codeberg.org/forgejo/forgejo"
maintainer="Leafee98 <me@leafee98.com>"
source=(
2023-04-15 01:15:08 +00:00
"forgejo-${pkgver}-linux-amd64.xz::https://codeberg.org/attachments/378694aa-c111-4681-aa69-a70ef3906114"
2023-03-27 14:27:46 +00:00
"forgejo.service::materials/forgejo.service"
)
function package {
install -Dm755 "${srcdir}/forgejo-${pkgver}-linux-amd64" "${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
}