New method

This commit is contained in:
thomas 2022-08-17 20:35:16 +02:00
parent 590209a9ba
commit 8da4693b9f
28 changed files with 111 additions and 330 deletions

View file

@ -1,28 +1,22 @@
#!/bin/bash
[ -e ./lib/function.sh ] && source ./lib/function.sh
APP=mautrix-syncproxy
VERSION=0.0.1
VERSION=last
GIT_VERSION=$VERSION
DEB_VERSION=$VERSION-1
DEB_VERSION=0.1-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=2
DEPOT=https://github.com/mautrix/syncproxy.git
STEP="envinit prebuild build makedeb"
STEP="base_package_upgrade envinit get_git_source build makedeb"
envinit() {
apt install -y --no-install-recommends build-essential git wget ca-certificates dpkg fakeroot
wget -qO - https://go.dev/dl/go1.17.7.linux-amd64.tar.gz | tar -C /usr/local -xz
}
prebuild(){
GIT_VERSION=$1
git clone --depth 1 https://github.com/mautrix/syncproxy.git /tmp/mautrix-syncproxy
apt install -y --no-install-recommends build-essential
install_go
}
build() {
cd /tmp/mautrix-syncproxy/
cd /tmp/${APP}
PATH=$PATH:/usr/local/go/bin
go build -o mautrix-syncproxy
}