update mautrix-whatsapp script

This commit is contained in:
thomas 2022-12-10 13:39:43 +01:00
parent 80abe21699
commit 59094128f4
2 changed files with 8 additions and 16 deletions

View File

@ -4,8 +4,7 @@ Priority: optional
Maintainer: Thomas Legay <thomas@lgy.fr>
Build-Depends: debhelper-compat (= 13), golang (>= 16)
Standards-Version: 3.9.8
Homepage: http://www.gnu.org/software/gawk/
https://github.com/mautrix/whatsapp/archive/refs/tags/v0.4.0.tar.gz
Package: mautrix-whatsapp
Architecture: all

View File

@ -6,27 +6,20 @@ DEPOT=https://github.com/mautrix/whatsapp.git
GIT_VERSION=v${VERSION}
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=4
PACKAGE_DEPENDENCY="debhelper-compat libolm-dev build-essential"
STEP="envinit prebuild makedeb"
envinit() {
main(){
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
base_package_upgrade
install_package_dependency
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}
get_git_source
makedeb
}
makedeb(){
cd /tmp/${APP}/
cp -fr /tmp/src/debian /tmp/${APP}
dpkg-buildpackage -us -uc
cp /tmp/*.deb /tmp/dist
}