38 lines
989 B
Bash
38 lines
989 B
Bash
#!/usr/bin/env bash
|
|
|
|
pkgname="forgejo"
|
|
arch="amd64"
|
|
pkgrel=4
|
|
pkgver="1.20.4-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"
|
|
"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
|
|
}
|