Add mautrix-syncproxy and mautrix-wsproxy
This commit is contained in:
parent
eaba9effe3
commit
51bcd703d6
18 changed files with 185 additions and 5 deletions
29
ressources/mautrix-syncproxy/mautrix-syncproxy
Executable file
29
ressources/mautrix-syncproxy/mautrix-syncproxy
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
STEP="envinit prebuild 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
|
||||
}
|
||||
|
||||
build() {
|
||||
cd /tmp/mautrix-syncproxy/
|
||||
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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue