debmaker/ressources/mautrix-whatsapp/debmaker
2022-09-21 01:59:25 +02:00

32 lines
801 B
Bash
Executable file

#!/bin/bash
VERSION=0.7.0
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
}