debmaker/ressources/mautrix-whatsapp/debmaker

36 lines
857 B
Bash
Executable File

#!/bin/bash
VERSION=0.6.0
[ -e ./lib/function.sh ] && source ./lib/function.sh
APP=mautrix-whatsapp
DEPOT=https://github.com/mautrix/whatsapp.git
GIT_VERSION=v${VERSION}
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=4
STEP="envinit prebuild makedeb"
envinit() {
echo deb http://deb.debian.org/debian bullseye-backports main > /etc/apt/sources.list.d/backports.list
apt-get update
apt-get dist-upgrade -y
apt install -y --no-install-recommends ca-certificates git libolm-dev debhelper-compat build-essential
apt install -y --no-install-recommends -t bullseye-backports golang
}
prebuild(){
rm /tmp/*.deb
[ -e /tmp/${APP}] && rm -fr /tmp/${APP}
mkdir /tmp/${APP}
git clone --depth 1 -b ${GIT_VERSION} ${DEPOT} /tmp/${APP}
cp -fr /tmp/src/debian /tmp/${APP}
}
makedeb(){
cd /tmp/${APP}/
dpkg-buildpackage -us -uc
cp /tmp/*.deb /tmp/dist
}