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 ### 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 : To create deb file you just need to run the bellow command :
```bash ```bash
. ressources/<App name>/debmaker ./debmaker run <app>
debmaker_run
``` ```
after execution, .deb file is generate in 'dist' folder after execution, .deb file is generate in 'dist' folder
### Debug #### Edit debmaker script
```bash
./debmaker edit <app>
```
#### Debug
To enter in temporary filesystem To enter in temporary filesystem
```bash ```bash
debmaker_chroot cache/<App name> ./debmaker chroot <app>
``` ```
### packages available in shared repository ### 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/dist ] || sudo mkdir ${MOUNT_PATH}/${APP}/tmp/dist/
[ -d ${MOUNT_PATH}/${APP}/tmp/src ] && sudo rm -rf ${MOUNT_PATH}/${APP}/tmp/src/ [ -d ${MOUNT_PATH}/${APP}/tmp/src ] && sudo rm -rf ${MOUNT_PATH}/${APP}/tmp/src/
sudo mkdir -p ${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 -pfr ressources/${APP}/* ${MOUNT_PATH}/${APP}/tmp/src
sudo cp -fr lib/exec_in_chroot.sh ${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 find ${MOUNT_PATH}/${APP}/tmp/src -name .gitkeep -exec rm {} \;
sudo umount ${MOUNT_PATH}/${APP}/ sudo umount ${MOUNT_PATH}/${APP}/
} }

View file

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

View file

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

View file

@ -1,39 +1,47 @@
#!/bin/bash #!/bin/bash
VERSION=0.3.0
RELEASE=1
[ -e ./lib/function.sh ] && source ./lib/function.sh [ -e ./lib/function.sh ] && source ./lib/function.sh
APP=mautrix-whatsapp APP=mautrix-whatsapp
VERSION=0.2.4 DEPOT=https://github.com/mautrix/whatsapp.git
GIT_VERSION=v$VERSION GIT_VERSION=v${VERSION}
DEB_VERSION=$VERSION-3 DEB_VERSION=${VERSION}-${RELEASE}
DEBIAN_VERSION_CODENAME=bullseye DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE= IMAGE_SIZE=4
STEP="envinit prebuild build makedeb" STEP="envinit prebuild build makedeb"
envinit() { envinit() {
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 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 wget -qO - https://go.dev/dl/go1.17.7.linux-amd64.tar.gz | tar -C /usr/local -xz
fi
} }
prebuild(){ prebuild(){
GIT_VERSION=$1 [ -e /tmp/git ] && rm -fr /tmp/git
git clone --depth 1 -b ${GIT_VERSION} https://github.com/mautrix/whatsapp.git /tmp/whatsapp [ -e /tmp/${APP} ] || mkdir /tmp/${APP}
git clone --depth 1 -b ${GIT_VERSION} ${DEPOT} /tmp/git
cp -r /tmp/git/. /tmp/${APP}
} }
build() { build() {
cd /tmp/whatsapp/ cd /tmp/${APP}/
PATH=$PATH:/usr/local/go/bin ./build.sh PATH=$PATH:/usr/local/go/bin ./build.sh
} }
makedeb(){ makedeb(){
GIT_VERSION=$1
DEB_VERSION=$2
PATH_DEB=/tmp/src/rootfs PATH_DEB=/tmp/src/rootfs
cp /tmp/whatsapp/mautrix-whatsapp ${PATH_DEB}/usr/lib/mautrix-whatsapp/mautrix-whatsapp cp /tmp/mautrix-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/example-config.yaml ${PATH_DEB}/etc/mautrix-whatsapp/config.yaml
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
} }