debian-packages/packages/bin/forgejo-bin/DEBBUILD

36 lines
906 B
Plaintext
Raw Normal View History

2023-03-27 14:27:46 +00:00
#/usr/bin/env bash
pkgname="forgejo"
arch="amd64"
pkgrel=2
2023-07-25 04:09:56 +00:00
pkgver="1.20.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>"
2023-07-25 04:09:56 +00:00
_arch="amd64"
2023-03-27 14:27:46 +00:00
source=(
2023-07-25 04:09:56 +00:00
"forgejo-${pkgver}-linux-${_arch}.xz::https://codeberg.org/forgejo/forgejo/releases/download/v${pkgver}/forgejo-${pkgver}-linux-${_arch}.xz"
2023-03-27 14:27:46 +00:00
"forgejo.service::materials/forgejo.service"
)
function package {
2023-07-25 04:09:56 +00:00
install -Dm755 "${srcdir}/forgejo-${pkgver}-linux-${_arch}" "${pkgdir}/usr/bin/forgejo"
2023-03-27 14:27:46 +00:00
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/conf
touch /etc/forgejo/conf/app.ini
2023-03-27 14:27:46 +00:00
useradd --system git
chown -R git:git /var/lib/forgejo /etc/forgejo /etc/forgejo/app.ini
systemctl daemon-reload
EOF
}