2023-03-27 14:27:46 +00:00
|
|
|
#/usr/bin/env bash
|
|
|
|
|
|
|
|
pkgname="forgejo"
|
2023-08-02 14:30:49 +00:00
|
|
|
arch="amd64"
|
2023-07-25 04:59:19 +00:00
|
|
|
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
|
2023-07-25 04:59:19 +00:00
|
|
|
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
|
|
|
|
}
|