debmaker/ressources/authelia/debmaker
2022-09-21 01:59:25 +02:00

33 lines
861 B
Bash
Executable file

#!/bin/bash
VERSION=4.36.8
APP=authelia
DEPOT=https://github.com/authelia/authelia.git
GIT_VERSION=v${VERSION}
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=6
STEP="base_package_upgrade envinit get_git_source build makedeb"
envinit() {
configure_depot_nodejs
apt install -y --no-install-recommends build-essential nodejs
install_go
wget -qO - https://get.pnpm.io/install.sh | sh -
}
build() {
cd /tmp/${APP}/
PATH=$PATH:/usr/local/go/bin:/root/.local/share/pnpm
./cmd/authelia-scripts/authelia-scripts build
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
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
}