debmaker/ressources/mautrix-syncproxy/debmaker

33 lines
713 B
Plaintext
Raw Normal View History

#!/bin/bash
APP=mautrix-syncproxy
2022-08-17 20:35:16 +02:00
VERSION=last
GIT_VERSION=$VERSION
2022-08-17 20:35:16 +02:00
DEB_VERSION=0.1-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=2
2022-08-17 20:35:16 +02:00
DEPOT=https://github.com/mautrix/syncproxy.git
2022-08-17 20:35:16 +02:00
STEP="base_package_upgrade envinit get_git_source build makedeb"
envinit() {
2022-08-17 20:35:16 +02:00
apt install -y --no-install-recommends build-essential
install_go
}
build() {
2022-08-17 20:35:16 +02:00
cd /tmp/${APP}
PATH=$PATH:/usr/local/go/bin
go build -o mautrix-syncproxy
}
makedeb(){
GIT_VERSION=$1
DEB_VERSION=$2
PATH_DEB=/tmp/src/rootfs
cp /tmp/mautrix-syncproxy/mautrix-syncproxy ${PATH_DEB}/usr/bin/mautrix-syncproxy
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}