diff --git a/README.MD b/README.MD index 48060cc..115e1d2 100644 --- a/README.MD +++ b/README.MD @@ -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//debmaker -debmaker_run +./debmaker run ``` after execution, .deb file is generate in 'dist' folder -### Debug +#### Edit debmaker script + +```bash +./debmaker edit +``` + +#### Debug To enter in temporary filesystem ```bash -debmaker_chroot cache/ +./debmaker chroot ``` ### packages available in shared repository diff --git a/lib/function.sh b/lib/function.sh index 73cb172..86b77f1 100644 --- a/lib/function.sh +++ b/lib/function.sh @@ -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}/ } diff --git a/ressources/authelia/debmaker b/ressources/authelia/debmaker index e26500e..77a8d71 100755 --- a/ressources/authelia/debmaker +++ b/ressources/authelia/debmaker @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=4.34.4 +VERSION=4.34.5 RELEASE=1 [ -e ./lib/function.sh ] && source ./lib/function.sh diff --git a/ressources/element-web/debmaker b/ressources/element-web/debmaker index df48b5e..b04dbfe 100755 --- a/ressources/element-web/debmaker +++ b/ressources/element-web/debmaker @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=1.10.6 +VERSION=1.10.7 RELEASE=3 [ -e ./lib/function.sh ] && source ./lib/function.sh diff --git a/ressources/mautrix-whatsapp/debmaker b/ressources/mautrix-whatsapp/debmaker index 465038b..a75c23e 100755 --- a/ressources/mautrix-whatsapp/debmaker +++ b/ressources/mautrix-whatsapp/debmaker @@ -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 }