Fix : use original date file in deb
Update version of application : authelia element-web mautrix-whatsapp
This commit is contained in:
parent
3deb21e79d
commit
a20c6440ee
5 changed files with 43 additions and 22 deletions
|
@ -1,39 +1,47 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=0.3.0
|
||||
RELEASE=1
|
||||
|
||||
[ -e ./lib/function.sh ] && source ./lib/function.sh
|
||||
|
||||
APP=mautrix-whatsapp
|
||||
VERSION=0.2.4
|
||||
GIT_VERSION=v$VERSION
|
||||
DEB_VERSION=$VERSION-3
|
||||
DEPOT=https://github.com/mautrix/whatsapp.git
|
||||
GIT_VERSION=v${VERSION}
|
||||
DEB_VERSION=${VERSION}-${RELEASE}
|
||||
DEBIAN_VERSION_CODENAME=bullseye
|
||||
IMAGE_SIZE=
|
||||
|
||||
IMAGE_SIZE=4
|
||||
|
||||
STEP="envinit prebuild build makedeb"
|
||||
|
||||
envinit() {
|
||||
apt install -y --no-install-recommends wget fakeroot dpkg ca-certificates git libolm3 libolm-dev build-essential
|
||||
wget -qO - https://go.dev/dl/go1.17.7.linux-amd64.tar.gz | tar -C /usr/local -xz
|
||||
if [ $(dpkg -l | grep -e 'ii libolm3 ' | wc -l) -eq 1 ];
|
||||
then
|
||||
apt-get update
|
||||
apt-get dist-upgrade -y
|
||||
else
|
||||
apt install -y --no-install-recommends wget fakeroot dpkg ca-certificates git libolm3 libolm-dev build-essential
|
||||
wget -qO - https://go.dev/dl/go1.17.7.linux-amd64.tar.gz | tar -C /usr/local -xz
|
||||
fi
|
||||
}
|
||||
|
||||
prebuild(){
|
||||
GIT_VERSION=$1
|
||||
git clone --depth 1 -b ${GIT_VERSION} https://github.com/mautrix/whatsapp.git /tmp/whatsapp
|
||||
[ -e /tmp/git ] && rm -fr /tmp/git
|
||||
[ -e /tmp/${APP} ] || mkdir /tmp/${APP}
|
||||
git clone --depth 1 -b ${GIT_VERSION} ${DEPOT} /tmp/git
|
||||
cp -r /tmp/git/. /tmp/${APP}
|
||||
}
|
||||
|
||||
build() {
|
||||
cd /tmp/whatsapp/
|
||||
cd /tmp/${APP}/
|
||||
PATH=$PATH:/usr/local/go/bin ./build.sh
|
||||
}
|
||||
|
||||
makedeb(){
|
||||
GIT_VERSION=$1
|
||||
DEB_VERSION=$2
|
||||
PATH_DEB=/tmp/src/rootfs
|
||||
|
||||
cp /tmp/whatsapp/mautrix-whatsapp ${PATH_DEB}/usr/lib/mautrix-whatsapp/mautrix-whatsapp
|
||||
cp /tmp/whatsapp/example-config.yaml ${PATH_DEB}/etc/mautrix-whatsapp/config.yaml
|
||||
cp /tmp/mautrix-whatsapp/mautrix-whatsapp ${PATH_DEB}/usr/lib/mautrix-whatsapp/mautrix-whatsapp
|
||||
cp /tmp/mautrix-whatsapp/example-config.yaml ${PATH_DEB}/etc/mautrix-whatsapp/config.yaml
|
||||
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