40 lines
878 B
Bash
Executable file
40 lines
878 B
Bash
Executable file
#!/bin/bash
|
|
|
|
VERSION=4.37.5
|
|
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
|
|
PACKAGE_DEPENDENCY="build-essential nodejs"
|
|
|
|
main(){
|
|
base_package_upgrade
|
|
envinit
|
|
get_git_source
|
|
build
|
|
makedeb
|
|
}
|
|
|
|
envinit() {
|
|
configure_depot_nodejs
|
|
install_package_dependency
|
|
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
|
|
}
|