41 lines
879 B
Bash
Executable File
41 lines
879 B
Bash
Executable File
#!/bin/bash
|
|
|
|
VERSION=4.38.10
|
|
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=bookworm
|
|
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
|
|
}
|