debmaker/ressources/mautrix-wsproxy/debmaker

33 lines
737 B
Text
Raw Normal View History

#!/bin/bash
APP=mautrix-wsproxy
VERSION=1.0.0
2022-08-17 20:35:16 +02:00
GIT_VERSION=last
DEB_VERSION=$VERSION-$(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/wsproxy.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-wsproxy
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
2022-08-17 20:35:16 +02:00
cp /tmp/${APP}/mautrix-wsproxy ${PATH_DEB}/usr/bin/mautrix-wsproxy
cp /tmp/${APP}/example-config.yaml ${PATH_DEB}/etc/mautrix-wsproxy.yaml
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}