Add gitea

This commit is contained in:
thomas 2022-03-04 21:47:14 +01:00
parent beb7aa882f
commit ca1f99908e
11 changed files with 115 additions and 12 deletions

View file

@ -6,6 +6,7 @@ RELEASE=1
[ -e ./lib/function.sh ] && source ./lib/function.sh
APP=authelia
DEPOT=https://github.com/authelia/authelia.git
GIT_VERSION=v${VERSION}
DEB_VERSION=${VERSION}-${RELEASE}
DEBIAN_VERSION_CODENAME=bullseye
@ -30,13 +31,13 @@ envinit() {
prebuild(){
[ -e /tmp/git ] && rm -fr /tmp/git
[ -e /tmp/element-web ] || mkdir /tmp/element-web
git clone --depth 1 -b ${GIT_VERSION} https://github.com/authelia/authelia.git /tmp/git
cp -r /tmp/git/. /tmp/authelia
[ -e /tmp/element-web ] || mkdir /tmp/${APP}
git clone --depth 1 -b ${GIT_VERSION} ${DEPOT} /tmp/git
cp -r /tmp/git/. /tmp/${APP}
}
build() {
cd /tmp/authelia/
cd /tmp/${APP}/
PATH=$PATH:/usr/local/go/bin:/root/.local/share/pnpm
./cmd/authelia-scripts/authelia-scripts build
}
@ -44,8 +45,8 @@ build() {
makedeb(){
PATH_DEB=/tmp/src/rootfs
cp /tmp/authelia/dist/authelia ${PATH_DEB}/usr/bin/authelia
cp /tmp/authelia/config.template.yml ${PATH_DEB}/etc/authelia/configuration.yml
cp /tmp/${APP}/dist/authelia ${PATH_DEB}/usr/bin/authelia
cp /tmp/${APP}/config.template.yml ${PATH_DEB}/etc/authelia/configuration.yml
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}