35 lines
751 B
Bash
Executable file
35 lines
751 B
Bash
Executable file
#!/bin/bash
|
|
|
|
VERSION=4.0.4
|
|
|
|
[ -e ./lib/function.sh ] && source ./lib/function.sh
|
|
|
|
APP=slimbookbattery
|
|
DEPOT=https://launchpad.net/~slimbook/+archive/ubuntu/slimbook/+sourcefiles/slimbookbattery/${VERSION}/slimbookbattery_${VERSION}.tar.gz
|
|
DEBIAN_VERSION_CODENAME=bullseye
|
|
IMAGE_SIZE=1
|
|
|
|
STEP="envinit prebuild build makedeb"
|
|
|
|
envinit() {
|
|
apt-get update
|
|
if [ $(dpkg -l | grep -e 'ii debhelper ' | wc -l) -eq 1 ];
|
|
then
|
|
apt-get dist-upgrade -y
|
|
else
|
|
apt install -y --no-install-recommends wget ca-certificates debhelper build-essential
|
|
fi
|
|
}
|
|
|
|
prebuild(){
|
|
wget -qO - ${DEPOT} | tar -zx -C /tmp/
|
|
}
|
|
|
|
build() {
|
|
cd /tmp/slimbookbattery-${VERSION}
|
|
dpkg-buildpackage --no-sign
|
|
}
|
|
|
|
makedeb(){
|
|
mv /tmp/slimbookbattery_${VERSION}_all.deb /tmp/dist
|
|
}
|