36 lines
733 B
Bash
Executable file
36 lines
733 B
Bash
Executable file
#!/bin/bash
|
|
|
|
VERSION=0.108.0-b.39
|
|
APP=adguardhome
|
|
DEPOT=https://github.com/AdguardTeam/AdGuardHome.git
|
|
GIT_VERSION=v${VERSION}
|
|
GIT_VERSION=v0.108.0-b.30
|
|
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
|
|
DEBIAN_VERSION_CODENAME=bookworm
|
|
IMAGE_SIZE=4
|
|
PACKAGE_DEPENDENCY="build-essential nodejs yarn"
|
|
|
|
main(){
|
|
base_package_upgrade
|
|
configure_depot_yarn
|
|
configure_depot_nodejs
|
|
install_package_dependency
|
|
install_go
|
|
get_git_source
|
|
build
|
|
makedeb
|
|
}
|
|
|
|
build() {
|
|
cd /tmp/${APP}
|
|
PATH=$PATH:/usr/local/go/bin
|
|
make
|
|
}
|
|
|
|
makedeb(){
|
|
PATH_DEB=/tmp/src/rootfs
|
|
|
|
cp /tmp/adguardhome/AdGuardHome ${PATH_DEB}/usr/bin/adguardhome
|
|
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
|
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
|
}
|