diff --git a/authelia2deb b/authelia2deb index f2dab32..4db1ad9 100755 --- a/authelia2deb +++ b/authelia2deb @@ -5,5 +5,6 @@ VERSION=4.33.2 GIT_VERSION=v$VERSION DEB_VERSION=$VERSION-4 DEBIAN_VERSION_CODENAME=bullseye +IMAGE_SIZE=4 source ./lib/function.sh diff --git a/element-web2deb b/element-web2deb index 1906369..5a2bb75 100755 --- a/element-web2deb +++ b/element-web2deb @@ -5,5 +5,6 @@ VERSION=1.10.4 GIT_VERSION=v$VERSION DEB_VERSION=$VERSION-1 DEBIAN_VERSION_CODENAME=bullseye +IMAGE_SIZE= source ./lib/function.sh diff --git a/gotify2deb b/gotify2deb index cf8166f..ac5a7e2 100755 --- a/gotify2deb +++ b/gotify2deb @@ -3,7 +3,7 @@ APP=gotify VERSION=2.1.4 GIT_VERSION=v$VERSION -DEB_VERSION=$VERSION-1 +DEB_VERSION=$VERSION-2 DEBIAN_VERSION_CODENAME=bullseye IMAGE_SIZE=4 diff --git a/grocy2deb b/grocy2deb index c61d25e..19baa6d 100644 --- a/grocy2deb +++ b/grocy2deb @@ -4,5 +4,6 @@ VERSION=3.2.0 GIT_VERSION=v$VERSION DEB_VERSION=$VERSION-5 DEBIAN_VERSION_CODENAME=sid +IMAGE_SIZE= source ./lib/function.sh diff --git a/joplin-server2deb b/joplin-server2deb index 6932790..76ee72c 100755 --- a/joplin-server2deb +++ b/joplin-server2deb @@ -1,9 +1,11 @@ #!/bin/bash + APP=joplin-server VERSION=2.7.4 GIT_VERSION=server-v$VERSION DEB_VERSION=$VERSION-2 DEBIAN_VERSION_CODENAME=bullseye +IMAGE_SIZE=6 source ./lib/function.sh diff --git a/joplin2deb b/joplin2deb index e5d7ead..d7ede49 100755 --- a/joplin2deb +++ b/joplin2deb @@ -5,5 +5,6 @@ VERSION=2.7.12 GIT_VERSION=$VERSION DEB_VERSION=$VERSION-1 DEBIAN_VERSION_CODENAME=bullseye +IMAGE_SIZE= source ./lib/function.sh diff --git a/mautrix-whatsapp2deb b/mautrix-whatsapp2deb index 3d66234..a974010 100755 --- a/mautrix-whatsapp2deb +++ b/mautrix-whatsapp2deb @@ -5,5 +5,6 @@ VERSION=0.2.4 GIT_VERSION=v$VERSION DEB_VERSION=$VERSION-3 DEBIAN_VERSION_CODENAME=bullseye +IMAGE_SIZE= source ./lib/function.sh diff --git a/ressources/authelia/authelia b/ressources/authelia/authelia index 352860c..1e40f98 100755 --- a/ressources/authelia/authelia +++ b/ressources/authelia/authelia @@ -1,40 +1,34 @@ #!/bin/bash +STEP="envinit prebuild build makedeb" + envinit() { - apt install -y build-essential git wget ca-certificates + apt install -y --no-install-recommends build-essential git wget ca-certificates dpkg fakeroot wget -qO - https://deb.nodesource.com/setup_16.x | bash - #wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg - #echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list apt-get update apt-get install -y nodejs - wget -qO - https://go.dev/dl/go1.17.3.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 wget -qO - https://get.pnpm.io/install.sh | sh - } prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/authelia/authelia.git - cd authelia/ - git checkout $VERSION + GIT_VERSION=$1 + git clone --depth 1 -b ${GIT_VERSION} https://github.com/authelia/authelia.git /tmp/authelia } build() { cd /tmp/authelia/ - . /root/.bashrc - PATH=$PATH:/usr/local/go/bin bash bootstrap.sh - PATH=$PATH:/usr/local/go/bin ./cmd/authelia-scripts/authelia-scripts build + PATH=$PATH:/usr/local/go/bin:/root/.local/share/pnpm + ./cmd/authelia-scripts/authelia-scripts build } makedeb(){ - PATH_BUILD=$1 - PATH_DEB=$2 - GIT_VERSION=$3 + GIT_VERSION=$1 + DEB_VERSION=$2 + PATH_DEB=/tmp/dist/rootfs - cp ${PATH_BUILD}/tmp/authelia/dist/authelia ${PATH_DEB}/usr/bin/authelia - cp ${PATH_BUILD}/tmp/authelia/config.template.yml ${PATH_DEB}/etc/authelia/configuration.yml + cp /tmp/authelia/dist/authelia ${PATH_DEB}/usr/bin/authelia + cp /tmp/authelia/config.template.yml ${PATH_DEB}/etc/authelia/configuration.yml + sed -i "s/%VERSION%/$DEB_VERSION/" /tmp/dist/rootfs/DEBIAN/control + fakeroot dpkg-deb -Z gzip --build /tmp/dist/rootfs/ /tmp/dist/ } -echo $1 -FUNC=$1 -shift -${FUNC} $* diff --git a/ressources/element-web/element-web b/ressources/element-web/element-web index a117364..28a6431 100755 --- a/ressources/element-web/element-web +++ b/ressources/element-web/element-web @@ -3,7 +3,7 @@ STEP="envinit prebuild build makedeb" envinit() { - apt install -y build-essential git python wget ca-certificates + apt install -y --no-install-recommends build-essential git python wget ca-certificates wget -qO - https://deb.nodesource.com/setup_16.x | bash wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list @@ -12,11 +12,8 @@ envinit() { } prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/vector-im/element-web.git - cd element-web/ - git checkout $VERSION + GIT_VERSION=$1 + git clone --depth 1 -b ${GIT_VERSION} https://github.com/vector-im/element-web.git /tmp/element-web } build() { diff --git a/ressources/gotify/gotify b/ressources/gotify/gotify index 1e32d17..689ebbc 100755 --- a/ressources/gotify/gotify +++ b/ressources/gotify/gotify @@ -3,7 +3,7 @@ STEP="envinit prebuild build makedeb" envinit() { - apt install -y build-essential git wget ca-certificates + apt install -y --no-install-recommends build-essential git wget ca-certificates dpkg fakeroot wget -qO - https://deb.nodesource.com/setup_16.x | bash wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list @@ -14,9 +14,7 @@ envinit() { prebuild(){ GIT_VERSION=$1 - git clone https://github.com/gotify/server.git /tmp/server - cd /tmp/server/ - git checkout ${GIT_VERSION} + git clone --depth 1 -b ${GIT_VERSION} https://github.com/gotify/server.git /tmp/server } build() { @@ -33,8 +31,10 @@ build() { makedeb(){ GIT_VERSION=$1 DEB_VERSION=$2 - cp /tmp/server/gotify-server /tmp/dist/rootfs/usr/bin/gotify-server - cp /tmp/server/config.example.yml /tmp/dist/rootfs/etc/gotify/config.yml - sed -i "s/%VERSION%/$DEB_VERSION/" /tmp/dist/rootfs/DEBIAN/control - fakeroot dpkg-deb -Z gzip --build /tmp/dist/rootfs/ /tmp/dist/ + PATH_DEB=/tmp/dist/rootfs + + cp /tmp/server/gotify-server ${PATH_DEB}/usr/bin/ + cp /tmp/server/config.example.yml ${PATH_DEB}/etc/gotify/config.yml + sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control + fakeroot dpkg-deb -Z gzip --build ${PATH_DEB}/ /tmp/dist/ } diff --git a/ressources/gotify/rootfs/DEBIAN/control b/ressources/gotify/rootfs/DEBIAN/control index c0e0f13..b548845 100644 --- a/ressources/gotify/rootfs/DEBIAN/control +++ b/ressources/gotify/rootfs/DEBIAN/control @@ -1,7 +1,7 @@ -Package: gotify +Package: gotify-server Version: %VERSION% Section: base Priority: optional Architecture: all Maintainer: Thomas Legay -Description: gotify +Description: gotify-server diff --git a/ressources/gotify/rootfs/DEBIAN/postinst b/ressources/gotify/rootfs/DEBIAN/postinst index 0f623ab..9644513 100755 --- a/ressources/gotify/rootfs/DEBIAN/postinst +++ b/ressources/gotify/rootfs/DEBIAN/postinst @@ -1,4 +1,4 @@ #!/bin/bash -id gotify &> /dev/null || useradd gotify -r -s /bin/false +id gotify &> /dev/null || useradd gotify -r -s /bin/false -md /var/lib/gotify diff --git a/ressources/gotify/rootfs/etc/systemd/system/gotify.service b/ressources/gotify/rootfs/etc/systemd/system/gotify.service index 2b2f4e6..a347207 100644 --- a/ressources/gotify/rootfs/etc/systemd/system/gotify.service +++ b/ressources/gotify/rootfs/etc/systemd/system/gotify.service @@ -6,8 +6,8 @@ After=network.target [Service] User=gotify Group=gotify -ExecStart=/usr/bin/gotify-linux-amd64 -WorkingDirectory=/usr/lib/gotify +ExecStart=/usr/bin/gotify-server +WorkingDirectory=/var/lib/gotify-server [Install] WantedBy=multi-user.target diff --git a/ressources/grocy/grocy b/ressources/grocy/grocy index 0b945f8..2f3efcf 100755 --- a/ressources/grocy/grocy +++ b/ressources/grocy/grocy @@ -3,7 +3,7 @@ STEP="envinit prebuild build makedeb" envinit() { - apt-get install -y wget ca-certificates gnupg2 composer git php-simplexml php-gd + apt-get install -y --no-install-recommends wget ca-certificates gnupg2 composer git php-simplexml php-gd fakeroot dpkg wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list apt-get update @@ -11,10 +11,8 @@ envinit() { } prebuild(){ - VERSION=$1 - git clone https://github.com/grocy/grocy.git /tmp/grocy - cd /tmp/grocy/ - git checkout $VERSION + GIT_VERSION=$1 + git clone --depth 1 -b ${GIT_VERSION} https://github.com/grocy/grocy.git /tmp/grocy/ } build() { diff --git a/ressources/joplin-server/joplin-server b/ressources/joplin-server/joplin-server index ea0c25b..471904f 100755 --- a/ressources/joplin-server/joplin-server +++ b/ressources/joplin-server/joplin-server @@ -3,7 +3,7 @@ STEP="envinit prebuild build makedeb" envinit() { - apt install -y build-essential git python wget ca-certificates + apt install -y --no-install-recommends build-essential git python wget ca-certificates wget -qO - https://deb.nodesource.com/setup_16.x | bash wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list @@ -12,11 +12,9 @@ envinit() { } prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/laurent22/joplin.git - cd joplin/ - git checkout $VERSION + GIT_VERSION=$1 + git clone --depth 1 -b ${GIT_VERSION} https://github.com/laurent22/joplin.git /tmp/joplin + cd /tmp/joplin rm -fr packages/app* rm -fr packages/generator-joplin rm -fr packages/plugin-repo-cli diff --git a/ressources/joplin/joplin b/ressources/joplin/joplin index 2b56f95..024e0d1 100755 --- a/ressources/joplin/joplin +++ b/ressources/joplin/joplin @@ -3,7 +3,7 @@ STEP="envinit makedeb" envinit() { - apt-get install -y wget ca-certificates wget fakeroot dpkg + apt-get install -y wget ca-certificates fakeroot dpkg } diff --git a/ressources/mautrix-whatsapp/mautrix-whatsapp b/ressources/mautrix-whatsapp/mautrix-whatsapp index 0ee6241..d25deba 100755 --- a/ressources/mautrix-whatsapp/mautrix-whatsapp +++ b/ressources/mautrix-whatsapp/mautrix-whatsapp @@ -3,16 +3,13 @@ STEP="envinit prebuild build makedeb" envinit() { - apt install -y ca-certificates git libolm3 libolm-dev build-essential wget + apt install -y --no-install-recommends ca-certificates git libolm3 libolm-dev build-essential wget wget -qO - https://go.dev/dl/go1.17.7.linux-amd64.tar.gz | tar -C /usr/local -xz } prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/mautrix/whatsapp.git - cd whatsapp/ - git checkout $VERSION + GIT_VERSION=$1 + git clone --depth 1 -b ${GIT_VERSION} https://github.com/mautrix/whatsapp.git /tmp/whatsapp } build() { diff --git a/ressources/rss-bridge/rss-bridge b/ressources/rss-bridge/rss-bridge index 71a78c1..d23eb21 100755 --- a/ressources/rss-bridge/rss-bridge +++ b/ressources/rss-bridge/rss-bridge @@ -3,15 +3,12 @@ STEP="envinit prebuild makedeb" envinit() { - apt install -y git + apt install -y --no-install-recommends git fakeroot dpkg } prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/RSS-Bridge/rss-bridge.git - cd rss-bridge/ - git checkout $VERSION + GIT_VERSION=$1 + git clone --depth 1 -b ${GIT_VERSION} https://github.com/RSS-Bridge/rss-bridge.git /tmp/rss-bridge } makedeb(){ diff --git a/ressources/standardnotes-web/standardnotes-web b/ressources/standardnotes-web/standardnotes-web index fe668cd..55f9abe 100755 --- a/ressources/standardnotes-web/standardnotes-web +++ b/ressources/standardnotes-web/standardnotes-web @@ -1,7 +1,9 @@ #!/bin/bash +STEP="envinit prebuild build makedeb" + envinit() { - apt install -y git build-essential python2 wget ruby-dev libxml2 libz-dev + apt install -y --no-install-recommends git build-essential python2 wget ruby-dev libxml2 libz-dev wget -qO - https://deb.nodesource.com/setup_16.x | bash wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list @@ -10,11 +12,8 @@ envinit() { } prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/standardnotes/web.git - cd web/ - git checkout $VERSION + GIT_VERSION=$1 + git clone --depth 1 -b ${GIT_VERSION} https://github.com/standardnotes/web.git /tmp/web } build() { @@ -25,13 +24,9 @@ build() { } makedeb(){ - PATH_BUILD=$1 - PATH_DEB=$2 - GIT_VERSION=$3 + GIT_VERSION=$1 + DEB_VERSION=$2 + PATH_DEB=/tmp/dist/rootfs - cp -fr ${PATH_BUILD}/tmp/web/* ${PATH_DEB}/usr/lib/standardnotes/web/ + cp -fr /tmp/web/* ${PATH_DEB}/usr/lib/standardnotes/web/ } -echo $1 -FUNC=$1 -shift -${FUNC} $* diff --git a/ressources/vaultwarden-web/vaultwarden-web b/ressources/vaultwarden-web/vaultwarden-web index 9563983..185022b 100755 --- a/ressources/vaultwarden-web/vaultwarden-web +++ b/ressources/vaultwarden-web/vaultwarden-web @@ -3,7 +3,7 @@ STEP="envinit prebuild build makedeb" envinit() { - apt install -y build-essential git python wget ca-certificates + apt install -y --no-install-recommends build-essential git python wget ca-certificates wget -qO - https://deb.nodesource.com/setup_16.x | bash #wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg #echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list diff --git a/ressources/vaultwarden/vaultwarden b/ressources/vaultwarden/vaultwarden index 687510e..f009539 100755 --- a/ressources/vaultwarden/vaultwarden +++ b/ressources/vaultwarden/vaultwarden @@ -11,11 +11,8 @@ envinit() { } prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/dani-garcia/vaultwarden.git - cd vaultwarden/ - git checkout $VERSION + GIT_VERSION=$1 + git clone --depth 1 -b ${GIT_VERSION} https://github.com/dani-garcia/vaultwarden.git /tmp/vaultwarden } build() { diff --git a/ressources/wallabag/wallabag b/ressources/wallabag/wallabag index 42c6adb..565864a 100755 --- a/ressources/wallabag/wallabag +++ b/ressources/wallabag/wallabag @@ -3,12 +3,12 @@ STEP="envinit prebuild build makedeb" envinit() { - apt-get install -y wget ca-certificates composer git php-common php-xml php-json php-gd php-mbstring php-xml php-tidy php-curl php-tokenizer php-bcmath php-intl php-fpm unzip + apt-get install -y --no-install-recommends wget ca-certificates composer git php-common php-xml php-json php-gd php-mbstring php-xml php-tidy php-curl php-tokenizer php-bcmath php-intl php-fpm unzip fakeroot dpkg } prebuild(){ - VERSION=$1 - git clone --depth 1 -b $VERSION https://github.com/wallabag/wallabag.git /tmp/wallabag + GIT_VERSION=$1 + git clone --depth 1 -b ${GIT_VERSION} https://github.com/wallabag/wallabag.git /tmp/wallabag } build() { diff --git a/ressources/zigbee2mqtt/zigbee2mqtt b/ressources/zigbee2mqtt/zigbee2mqtt index 7a4518d..3bd6430 100755 --- a/ressources/zigbee2mqtt/zigbee2mqtt +++ b/ressources/zigbee2mqtt/zigbee2mqtt @@ -3,15 +3,12 @@ STEP="envinit prebuild build makedeb" envinit() { - apt install -y wget ca-certificates nodejs npm git make g++ gcc + apt install -y --no-install-recommends wget ca-certificates nodejs npm git make g++ gcc fakeroot dpkg } prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/Koenkk/zigbee2mqtt.git - cd zigbee2mqtt/ - git checkout $VERSION + GIT_VERSION=$1 + git clone --depth 1 -b ${GIT_VERSION} https://github.com/Koenkk/zigbee2mqtt.git /tmp/zigbee2mqtt } build() { diff --git a/rss-bridge2deb b/rss-bridge2deb index 613d7fc..e8e096f 100755 --- a/rss-bridge2deb +++ b/rss-bridge2deb @@ -5,5 +5,6 @@ VERSION=2022-01-20 GIT_VERSION=$VERSION DEB_VERSION=$VERSION-3 DEBIAN_VERSION_CODENAME=bullseye +IMAGE_SIZE=1 source ./lib/function.sh diff --git a/standardnotes-web2deb b/standardnotes-web2deb index 434e126..ef6836d 100755 --- a/standardnotes-web2deb +++ b/standardnotes-web2deb @@ -5,5 +5,6 @@ VERSION=10.9.0 GIT_VERSION=$VERSION DEB_VERSION=$VERSION-1 DEBIAN_VERSION_CODENAME=bullseye +IMAGE_SIZE= source ./lib/function.sh diff --git a/vaultwarden-web2deb b/vaultwarden-web2deb index cc702ee..cdeea93 100755 --- a/vaultwarden-web2deb +++ b/vaultwarden-web2deb @@ -5,5 +5,6 @@ VERSION=2.25.1 GIT_VERSION=v$VERSION DEB_VERSION=$VERSION-2 DEBIAN_VERSION_CODENAME=bullseye +IMAGE_SIZE= source ./lib/function.sh diff --git a/vaultwarden2deb b/vaultwarden2deb index 2510225..5f98da6 100755 --- a/vaultwarden2deb +++ b/vaultwarden2deb @@ -5,5 +5,6 @@ VERSION=1.24.0 GIT_VERSION=$VERSION DEB_VERSION=$VERSION-1 DEBIAN_VERSION_CODENAME=bullseye +IMAGE_SIZE= source ./lib/function.sh diff --git a/wallabag2deb b/wallabag2deb index 9038b13..56fb4c0 100755 --- a/wallabag2deb +++ b/wallabag2deb @@ -5,5 +5,6 @@ VERSION=2.4.3 GIT_VERSION=$VERSION DEB_VERSION=$VERSION-1 DEBIAN_VERSION_CODENAME=bullseye +IMAGE_SIZE= source ./lib/function.sh diff --git a/zigbee2mqtt2deb b/zigbee2mqtt2deb index f639839..f564f5d 100755 --- a/zigbee2mqtt2deb +++ b/zigbee2mqtt2deb @@ -5,5 +5,6 @@ VERSION=1.23.0 GIT_VERSION=$VERSION DEB_VERSION=$VERSION-3 DEBIAN_VERSION_CODENAME=bullseye +IMAGE_SIZE= source ./lib/function.sh