aports/config/gitea/APKBUILD

43 lines
1.4 KiB
Plaintext

# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
. ../APKBUILD-config.template
pkgver=2022.18.11.01
pkgrel=0
depends="
redxen-data-gitea-theme
bash
"
# GITEA DEPENDS ON BASH FOR HOOKS, AAA
source="
redxen.ini
secret
"
build() {
. secret
: "${POSTGRESQL_GITEA_PASSWORD:?'PostgreSQL database access password missing'}"
: "${GITEA_SECRET_KEY:?'Gitea secret key is missing'}"
: "${GITEA_INTERNAL_TOKEN:?'Gitea internal token is missing'}"
: "${GITEA_MAILER_PASSWD:?'Gitea SMTP password is missing'}"
: "${GITEA_OAUTH_JWT_TOKEN:?'Gitea OAuth token is missing'}"
cp redxen.ini redxen-mod.ini
rx_replace "POSTGRESQL_GITEA_PASSWORD" "$POSTGRESQL_GITEA_PASSWORD" "redxen-mod.ini"
rx_replace "GITEA_SECRET_KEY" "$GITEA_SECRET_KEY" "redxen-mod.ini"
rx_replace "GITEA_INTERNAL_TOKEN" "$GITEA_INTERNAL_TOKEN" "redxen-mod.ini"
rx_replace "GITEA_MAILER_PASSWD" "$GITEA_MAILER_PASSWD" "redxen-mod.ini"
rx_replace "GITEA_OAUTH_JWT_TOKEN" "$GITEA_OAUTH_JWT_TOKEN" "redxen-mod.ini"
}
package() {
rx_install redxen-mod.ini redxen.ini
install -dm700 "$(rx_cpkgdir)"/var/lib/gitea
}
sha512sums="
76851240d10c1ed227ba243add1177f30a7f69453726e292bfb9f07ca4aeefd13e3cffd6ba4b703bed36e4a2a33cbf8e5da1be8c9c2e9fcae4ef8e02f6183a3b redxen.ini
012d489c5d71864cda4b99ec16b3d6edbf83d18ea14d2104afe70e320937f4dd223572e384fba040cb3d43ced8ca7267e434756e4a1cd8bd41bb6f9092ad4b9d secret
"