32 lines
737 B
Bash
Executable file
32 lines
737 B
Bash
Executable file
#!/bin/bash
|
|
|
|
APP=mautrix-wsproxy
|
|
VERSION=1.0.0
|
|
GIT_VERSION=last
|
|
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
|
|
DEBIAN_VERSION_CODENAME=bullseye
|
|
IMAGE_SIZE=2
|
|
DEPOT=https://github.com/mautrix/wsproxy.git
|
|
|
|
STEP="base_package_upgrade envinit get_git_source build makedeb"
|
|
|
|
envinit() {
|
|
apt install -y --no-install-recommends build-essential
|
|
install_go
|
|
}
|
|
|
|
build() {
|
|
cd /tmp/${APP}
|
|
PATH=$PATH:/usr/local/go/bin
|
|
go build -o mautrix-wsproxy
|
|
}
|
|
|
|
makedeb(){
|
|
PATH_DEB=/tmp/src/rootfs
|
|
|
|
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
|
|
}
|