Fix : use original date file in deb

Update version of application : authelia element-web mautrix-whatsapp
This commit is contained in:
thomas 2022-03-19 05:56:51 +01:00
parent 3deb21e79d
commit a20c6440ee
5 changed files with 43 additions and 22 deletions

View File

@ -12,20 +12,33 @@ Objectives :
### Usage
#### List app
To list all applications with debmaker script
```bash
./debmaker list
```
#### Create deb file
To create deb file you just need to run the bellow command :
```bash
. ressources/<App name>/debmaker
debmaker_run
./debmaker run <app>
```
after execution, .deb file is generate in 'dist' folder
### Debug
#### Edit debmaker script
```bash
./debmaker edit <app>
```
#### Debug
To enter in temporary filesystem
```bash
debmaker_chroot cache/<App name>
./debmaker chroot <app>
```
### packages available in shared repository

View File

@ -45,8 +45,8 @@ zdebmaker_inject(){
[ -d ${MOUNT_PATH}/${APP}/tmp/dist ] || sudo mkdir ${MOUNT_PATH}/${APP}/tmp/dist/
[ -d ${MOUNT_PATH}/${APP}/tmp/src ] && sudo rm -rf ${MOUNT_PATH}/${APP}/tmp/src/
sudo mkdir -p ${MOUNT_PATH}/${APP}/tmp/src
sudo cp -fr ressources/${APP}/* ${MOUNT_PATH}/${APP}/tmp/src
sudo cp -fr lib/exec_in_chroot.sh ${MOUNT_PATH}/${APP}/tmp/src
sudo cp -pfr ressources/${APP}/* ${MOUNT_PATH}/${APP}/tmp/src
sudo cp lib/exec_in_chroot.sh ${MOUNT_PATH}/${APP}/tmp/src
sudo find ${MOUNT_PATH}/${APP}/tmp/src -name .gitkeep -exec rm {} \;
sudo umount ${MOUNT_PATH}/${APP}/
}

View File

@ -1,6 +1,6 @@
#!/bin/bash
VERSION=4.34.4
VERSION=4.34.5
RELEASE=1
[ -e ./lib/function.sh ] && source ./lib/function.sh

View File

@ -1,6 +1,6 @@
#!/bin/bash
VERSION=1.10.6
VERSION=1.10.7
RELEASE=3
[ -e ./lib/function.sh ] && source ./lib/function.sh

View File

@ -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
}