diff --git a/README.MD b/README.MD index 4318b7c..caa2b8c 100644 --- a/README.MD +++ b/README.MD @@ -1,6 +1,4 @@ ## DEBMAKER -The main goal of this repository is allow to create application from source without install all compilation utility directly on the main system. -All package are install in folder in chroot environnement with only one script. ### Requirement - debootstrap (ie apt install debootstrap) @@ -15,13 +13,7 @@ allstep ### package are available without compilation - - [joplin-server](#joplin-server) - - [rss-bridge](#rss-bridge) - - [vaultwarden](#vaultwarden) - - [zigbee2mqtt](#zigbee2mqtt) - - [element-web](#element-web) - -#### joplin-server +#### joplin server ```bash apt install -y python wget ca-certificates @@ -76,22 +68,3 @@ apt-get install -y zigbee2mqtt systemctl enable --now zigbee2mqtt ``` - - -#### element-web - -```bash -wget -qO - https://deb.lgy.fr/install.sh | bash -apt install element-web - -# sample configuration for apache2 - -cp /usr/share/doc/element-web/apache2-element-web.conf /etc/apache2/sites-available/element-web.conf -a2ensite element-web - -# edit /etc/apache2/sites-available/element-web.conf -# edit /etc/element-web/config.json - -systemctl restart apache2 -``` - diff --git a/element-web2deb b/element-web2deb index 431ec79..6bd2d9e 100755 --- a/element-web2deb +++ b/element-web2deb @@ -1,7 +1,7 @@ #!/bin/bash APP=element-web -VERSION=1.10.2 +VERSION=1.10.1 GIT_VERSION=v$VERSION DEB_VERSION=$VERSION-2 DEBIAN_VERSION_CODENAME=bullseye diff --git a/grocy2deb b/grocy2deb deleted file mode 100755 index c659a35..0000000 --- a/grocy2deb +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -APP=grocy -VERSION=3.2.0 -GIT_VERSION=v$VERSION -DEB_VERSION=$VERSION-5 -DEBIAN_VERSION_CODENAME=sid - -source ./lib/function.sh diff --git a/joplin2deb b/joplin2deb index e5d7ead..7b098e5 100755 --- a/joplin2deb +++ b/joplin2deb @@ -1,9 +1,9 @@ #!/bin/bash APP=joplin -VERSION=2.7.12 +VERSION=2.7.8 GIT_VERSION=$VERSION -DEB_VERSION=$VERSION-1 +DEB_VERSION=$VERSION-6 DEBIAN_VERSION_CODENAME=bullseye source ./lib/function.sh diff --git a/lib/function.sh b/lib/function.sh index 7f910d9..e461161 100644 --- a/lib/function.sh +++ b/lib/function.sh @@ -19,39 +19,44 @@ step1() { #InstallOs step2(){ + if [ -e ressources/${APP}/envinit ]; then if [ ! -e ${CACHE_STEP2} ] ; then mkdir -p ${CACHE_APP} cp -a ${CACHE_STEP1}/ ${CACHE_STEP2} - cp ressources/${APP}/${APP} ${CACHE_STEP2}/tmp/make + cp ressources/${APP}/envinit ${CACHE_STEP2}/tmp/envinit mount -t proc proc ${CACHE_STEP2}/proc sleep 2 - chroot ${CACHE_STEP2} /tmp/make envinit + chroot ${CACHE_STEP2} /tmp/envinit umount ${CACHE_STEP2}/proc - rm ${CACHE_STEP2}/tmp/${APP} + rm ${CACHE_STEP2}/tmp/envinit fi + fi } #ConfigureBeforeBuild step3(){ + if [ -e ressources/${APP}/prebuild ]; then if [ ! -e ${CACHE_STEP3} ]; then cp -a ${CACHE_STEP2} ${CACHE_STEP3} - cp ressources/${APP}/${APP} ${CACHE_STEP3}/tmp/make - chroot ${CACHE_STEP3} /tmp/make prebuild ${GIT_VERSION} - rm ${CACHE_STEP3}/tmp/make + cp ressources/${APP}/prebuild ${CACHE_STEP3}/tmp/prebuild + chroot ${CACHE_STEP3} /tmp/prebuild ${GIT_VERSION} + rm ${CACHE_STEP3}/tmp/prebuild fi + fi } #Build step4(){ + if [ -e ressources/${APP}/build ]; then if [ ! -e ${CACHE_STEP4} ] ; then cp -a ${CACHE_STEP3} ${CACHE_STEP4} - cp ressources/${APP}/${APP} ${CACHE_STEP4}/tmp/make + cp ressources/${APP}/build ${CACHE_STEP4}/tmp/build mount -t proc proc ${CACHE_STEP4}/proc/ sleep 2 - chroot ${CACHE_STEP4} /tmp/make build + chroot ${CACHE_STEP4} /tmp/build umount ${CACHE_STEP4}/proc/ - rm ${CACHE_STEP4}/tmp/make fi + fi } #PackageDeb @@ -59,7 +64,7 @@ step5(){ rm -fr dist/${APP} mkdir dist/${APP} cp -pfr ressources/${APP}/rootfs/* dist/$APP/ - bash ressources/${APP}/${APP} makedeb ${CACHE_STEP4} dist/${APP} ${GIT_VERSION} + bash ressources/${APP}/makedeb ${CACHE_STEP4} dist/${APP} ${GIT_VERSION} sed -i "s/%VERSION%/$DEB_VERSION/" dist/${APP}/DEBIAN/control fakeroot dpkg-deb -Z gzip --build dist/${APP} dist rm -fr dist/${APP} diff --git a/ressources/authelia/authelia b/ressources/authelia/authelia deleted file mode 100755 index 352860c..0000000 --- a/ressources/authelia/authelia +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -envinit() { - apt install -y build-essential git 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 - 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://get.pnpm.io/install.sh | sh - -} - -prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/authelia/authelia.git - cd authelia/ - git checkout $VERSION -} - -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 -} - -makedeb(){ - PATH_BUILD=$1 - PATH_DEB=$2 - GIT_VERSION=$3 - - 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 -} -echo $1 -FUNC=$1 -shift -${FUNC} $* diff --git a/ressources/authelia/build b/ressources/authelia/build new file mode 100755 index 0000000..a048473 --- /dev/null +++ b/ressources/authelia/build @@ -0,0 +1,5 @@ +#!/bin/bash +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 diff --git a/ressources/authelia/envinit b/ressources/authelia/envinit new file mode 100755 index 0000000..6864d65 --- /dev/null +++ b/ressources/authelia/envinit @@ -0,0 +1,9 @@ +#/bin/bash +apt install -y build-essential git 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 +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://get.pnpm.io/install.sh | sh - diff --git a/ressources/authelia/makedeb b/ressources/authelia/makedeb new file mode 100644 index 0000000..306c022 --- /dev/null +++ b/ressources/authelia/makedeb @@ -0,0 +1,8 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +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 + diff --git a/ressources/authelia/prebuild b/ressources/authelia/prebuild new file mode 100755 index 0000000..0491775 --- /dev/null +++ b/ressources/authelia/prebuild @@ -0,0 +1,6 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/authelia/authelia.git +cd authelia/ +git checkout $VERSION diff --git a/ressources/element-web/build b/ressources/element-web/build new file mode 100755 index 0000000..ebb4cb8 --- /dev/null +++ b/ressources/element-web/build @@ -0,0 +1,4 @@ +#!/bin/bash +cd /tmp/element-web +yarn install +yarn dist diff --git a/ressources/element-web/element-web b/ressources/element-web/element-web deleted file mode 100755 index 09eb636..0000000 --- a/ressources/element-web/element-web +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -envinit() { - apt install -y 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 - apt-get update - apt-get install -y yarn nodejs -} - -prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/vector-im/element-web.git - cd element-web/ - git checkout $VERSION -} - -build() { - cd /tmp/element-web - yarn install - yarn dist -} - -makedeb(){ - PATH_BUILD=$1 - PATH_DEB=$2 - GIT_VERSION=$3 - - tar -zxf ${PATH_BUILD}/tmp/element-web/dist/element-${GIT_VERSION}-dirty.tar.gz --strip-components=1 -C ${PATH_DEB}/usr/lib/element-web/ - cp ${PATH_DEB}/usr/lib/element-web/config.sample.json ${PATH_DEB}/etc/element-web/config.json -} -echo $1 -FUNC=$1 -shift -${FUNC} $* diff --git a/ressources/element-web/envinit b/ressources/element-web/envinit new file mode 100755 index 0000000..f98a073 --- /dev/null +++ b/ressources/element-web/envinit @@ -0,0 +1,7 @@ +#/bin/bash +apt install -y 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 +apt-get update +apt-get install -y yarn nodejs diff --git a/ressources/element-web/makedeb b/ressources/element-web/makedeb new file mode 100644 index 0000000..6ee9ba1 --- /dev/null +++ b/ressources/element-web/makedeb @@ -0,0 +1,7 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +tar -zxf ${PATH_BUILD}/tmp/element-web/dist/element-${GIT_VERSION}-dirty.tar.gz --strip-components=1 -C ${PATH_DEB}/usr/lib/element-web/ +cp ${PATH_DEB}/usr/lib/element-web/config.sample.json ${PATH_DEB}/etc/element-web/config.json diff --git a/ressources/element-web/prebuild b/ressources/element-web/prebuild new file mode 100755 index 0000000..1d808ca --- /dev/null +++ b/ressources/element-web/prebuild @@ -0,0 +1,6 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/vector-im/element-web.git +cd element-web/ +git checkout $VERSION diff --git a/ressources/gotify/build b/ressources/gotify/build new file mode 100755 index 0000000..0332f67 --- /dev/null +++ b/ressources/gotify/build @@ -0,0 +1,4 @@ +#!/bin/bash +cd /tmp/server/ +. /root/.bashrc +PATH=$PATH:/usr/local/go/bin make diff --git a/ressources/gotify/envinit b/ressources/gotify/envinit new file mode 100755 index 0000000..a661b77 --- /dev/null +++ b/ressources/gotify/envinit @@ -0,0 +1,8 @@ +#/bin/bash +apt install -y build-essential git 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 +apt-get update +apt-get install -y nodejs yarn +wget -qO - https://go.dev/dl/go1.17.6.linux-amd64.tar.gz | tar -C /usr/local -xz diff --git a/ressources/gotify/gotify b/ressources/gotify/gotify deleted file mode 100755 index b3d373e..0000000 --- a/ressources/gotify/gotify +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -envinit() { - apt install -y build-essential git 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 - apt-get update - apt-get install -y nodejs yarn - wget -qO - https://go.dev/dl/go1.17.6.linux-amd64.tar.gz | tar -C /usr/local -xz -} - -prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/gotify/server.git - cd server/ - git checkout ${VERSION} -} - -build() { - cd /tmp/server/ - . /root/.bashrc - PATH=${PATH}:/usr/local/go/bin make -} - -makedeb(){ - PATH_BUILD=$1 - PATH_DEB=$2 - GIT_VERSION=$3 - - cp ${PATH_BUILD}/tmp/gotify/dist/gotify ${PATH_DEB}/usr/bin/gotify - cp ${PATH_BUILD}/tmp/authelia/config.template.yml ${PATH_DEB}/etc/authelia/configuration.yml -} -echo $1 -FUNC=$1 -shift -${FUNC} $* diff --git a/ressources/gotify/makedeb b/ressources/gotify/makedeb new file mode 100644 index 0000000..a69b1d3 --- /dev/null +++ b/ressources/gotify/makedeb @@ -0,0 +1,8 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +cp ${PATH_BUILD}/tmp/gotify/dist/gotify ${PATH_DEB}/usr/bin/gotify +cp ${PATH_BUILD}/tmp/authelia/config.template.yml ${PATH_DEB}/etc/authelia/configuration.yml + diff --git a/ressources/gotify/prebuild b/ressources/gotify/prebuild new file mode 100755 index 0000000..397f4f8 --- /dev/null +++ b/ressources/gotify/prebuild @@ -0,0 +1,6 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/gotify/server.git +cd server/ +git checkout $VERSION diff --git a/ressources/grocy/grocy b/ressources/grocy/grocy deleted file mode 100755 index 3f983b9..0000000 --- a/ressources/grocy/grocy +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -envinit() { - apt-get install -y wget ca-certificates gnupg2 composer git php-simplexml php-gd - 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 yarn -} - -prebuild(){ - VERSION=$1 - git clone https://github.com/grocy/grocy.git /tmp/grocy - cd /tmp/grocy/ - git checkout $VERSION -} - -build() { - set +x - cd /tmp/grocy - composer install -n - yarn install -} - -makedeb(){ - PATH_BUILD=$1 - PATH_DEB=$2 - GIT_VERSION=$3 - - find ${PATH_BUILD}/tmp/grocy -name .gitignore -exec rm {} \; - cp -fr ${PATH_BUILD}/tmp/grocy/* ${PATH_DEB}/usr/share/grocy/ - cp ${PATH_DEB}/usr/share/grocy/config-dist.php ${PATH_DEB}/etc/grocy/config.php - mv ${PATH_DEB}/usr/share/grocy/data ${PATH_DEB}/var/lib/grocy/ - ln -s /var/lib/grocy/data/ ${PATH_DEB}/usr/share/grocy/data - ln -s /etc/grocy/config.php ${PATH_DEB}/usr/share/grocy/config.php -} -echo $1 -FUNC=$1 -shift -${FUNC} $* diff --git a/ressources/grocy/rootfs/DEBIAN/changelog b/ressources/grocy/rootfs/DEBIAN/changelog deleted file mode 100644 index e69de29..0000000 diff --git a/ressources/grocy/rootfs/DEBIAN/conffiles b/ressources/grocy/rootfs/DEBIAN/conffiles deleted file mode 100644 index f54cdd9..0000000 --- a/ressources/grocy/rootfs/DEBIAN/conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/grocy/config.php diff --git a/ressources/grocy/rootfs/DEBIAN/control b/ressources/grocy/rootfs/DEBIAN/control deleted file mode 100644 index 1f5d3ba..0000000 --- a/ressources/grocy/rootfs/DEBIAN/control +++ /dev/null @@ -1,8 +0,0 @@ -Package: grocy -Version: %VERSION% -Section: base -Priority: optional -Architecture: all -Depends: php-simplexml, php-gd, php-sqlite3, php-intl, php-mbstring -Maintainer: Thomas Legay -Description: grocy diff --git a/ressources/grocy/rootfs/DEBIAN/postinst b/ressources/grocy/rootfs/DEBIAN/postinst deleted file mode 100755 index 126929b..0000000 --- a/ressources/grocy/rootfs/DEBIAN/postinst +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -chown www-data:www-data /var/lib/grocy diff --git a/ressources/grocy/rootfs/usr/share/doc/grocy/apache2-grocy.conf b/ressources/grocy/rootfs/usr/share/doc/grocy/apache2-grocy.conf deleted file mode 100644 index ad814b9..0000000 --- a/ressources/grocy/rootfs/usr/share/doc/grocy/apache2-grocy.conf +++ /dev/null @@ -1,11 +0,0 @@ - - ServerName grocy.net.lgy.fr - - DocumentRoot /usr/share/grocy/public/ - - - Options -Indexes -MultiViews +FollowSymLinks - AllowOverride all - Require all granted - - diff --git a/ressources/joplin-server/build b/ressources/joplin-server/build new file mode 100755 index 0000000..a050dc0 --- /dev/null +++ b/ressources/joplin-server/build @@ -0,0 +1,3 @@ +#!/bin/bash +cd /tmp/joplin/ +BUILD_SEQUENCIAL=1 yarn install diff --git a/ressources/joplin-server/envinit b/ressources/joplin-server/envinit new file mode 100755 index 0000000..f98a073 --- /dev/null +++ b/ressources/joplin-server/envinit @@ -0,0 +1,7 @@ +#/bin/bash +apt install -y 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 +apt-get update +apt-get install -y yarn nodejs diff --git a/ressources/joplin-server/joplin-server b/ressources/joplin-server/joplin-server deleted file mode 100755 index 743a230..0000000 --- a/ressources/joplin-server/joplin-server +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -envinit() { - apt install -y 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 - apt-get update - apt-get install -y yarn nodejs -} - -prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/laurent22/joplin.git - cd joplin/ - git checkout $VERSION - rm -fr packages/app* - rm -fr packages/generator-joplin - rm -fr packages/plugin-repo-cli - rm -fr packages/plugins -} - -build() { - cd /tmp/joplin/ - BUILD_SEQUENCIAL=1 yarn install -} - -makedeb(){ - PATH_BUILD=$1 - PATH_DEB=$2 - GIT_VERSION=$3 - - cp -fr ${PATH_BUILD}/tmp/joplin/packages/* ${PATH_DEB}/usr/lib/joplin-server/ -} -echo $1 -FUNC=$1 -shift -${FUNC} $* diff --git a/ressources/joplin-server/makedeb b/ressources/joplin-server/makedeb new file mode 100644 index 0000000..ba61045 --- /dev/null +++ b/ressources/joplin-server/makedeb @@ -0,0 +1,7 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +cp -fr ${PATH_BUILD}/tmp/joplin/packages/* ${PATH_DEB}/usr/lib/joplin-server/ + diff --git a/ressources/joplin-server/prebuild b/ressources/joplin-server/prebuild new file mode 100755 index 0000000..3a2b4fa --- /dev/null +++ b/ressources/joplin-server/prebuild @@ -0,0 +1,10 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/laurent22/joplin.git +cd joplin/ +git checkout $VERSION +rm -fr packages/app* +rm -fr packages/generator-joplin +rm -fr packages/plugin-repo-cli +rm -fr packages/plugins diff --git a/ressources/joplin/joplin b/ressources/joplin/joplin deleted file mode 100755 index d6b76d6..0000000 --- a/ressources/joplin/joplin +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -envinit() { - ls -} - -prebuild(){ - ls -} - -build() { - ls -} - -makedeb(){ - PATH_BUILD=$1 - PATH_DEB=$2 - GIT_VERSION=$3 - - wget https://github.com/laurent22/joplin/releases/download/v${GIT_VERSION}/Joplin-${GIT_VERSION}.AppImage -qO ${PATH_DEB}/usr/share/joplin/Joplin.AppImage - chmod +x ${PATH_DEB}/usr/share/joplin/Joplin.AppImage -} -echo $1 -FUNC=$1 -shift -${FUNC} $* diff --git a/ressources/joplin/makedeb b/ressources/joplin/makedeb new file mode 100644 index 0000000..1bdd522 --- /dev/null +++ b/ressources/joplin/makedeb @@ -0,0 +1,7 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +wget https://github.com/laurent22/joplin/releases/download/v${GIT_VERSION}/Joplin-${GIT_VERSION}.AppImage -qO ${PATH_DEB}/usr/share/joplin/Joplin.AppImage +chmod +x ${PATH_DEB}/usr/share/joplin/Joplin.AppImage diff --git a/ressources/mautrix-whatsapp/build b/ressources/mautrix-whatsapp/build new file mode 100755 index 0000000..2673991 --- /dev/null +++ b/ressources/mautrix-whatsapp/build @@ -0,0 +1,4 @@ +#/bin/bash +cd /tmp/whatsapp/ +git checkout $1 +PATH=$PATH:/usr/local/go/bin ./build.sh diff --git a/ressources/mautrix-whatsapp/envinit b/ressources/mautrix-whatsapp/envinit new file mode 100755 index 0000000..fb96686 --- /dev/null +++ b/ressources/mautrix-whatsapp/envinit @@ -0,0 +1,3 @@ +#/bin/bash +apt install -y ca-certificates git libolm3 libolm-dev build-essential wget +wget -qO - https://go.dev/dl/go1.17.3.linux-amd64.tar.gz | tar -C /usr/local -xz diff --git a/ressources/mautrix-whatsapp/makedeb b/ressources/mautrix-whatsapp/makedeb new file mode 100644 index 0000000..8604020 --- /dev/null +++ b/ressources/mautrix-whatsapp/makedeb @@ -0,0 +1,7 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +cp ${PATH_BUILD}/tmp/whatsapp/mautrix-whatsapp ${PATH_DEB}/usr/lib/mautrix-whatsapp/mautrix-whatsapp +cp ${PATH_BUILD}/tmp/whatsapp/example-config.yaml ${PATH_DEB}/etc/mautrix-whatsapp/config.yaml diff --git a/ressources/mautrix-whatsapp/mautrix-whatsapp b/ressources/mautrix-whatsapp/mautrix-whatsapp deleted file mode 100755 index d8512c4..0000000 --- a/ressources/mautrix-whatsapp/mautrix-whatsapp +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -envinit() { - apt install -y ca-certificates git libolm3 libolm-dev build-essential wget - wget -qO - https://go.dev/dl/go1.17.3.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 -} - -build() { - cd /tmp/whatsapp/ - git checkout $1 - PATH=$PATH:/usr/local/go/bin ./build.sh -} - -makedeb(){ - PATH_BUILD=$1 - PATH_DEB=$2 - GIT_VERSION=$3 - - cp ${PATH_BUILD}/tmp/whatsapp/mautrix-whatsapp ${PATH_DEB}/usr/lib/mautrix-whatsapp/mautrix-whatsapp - cp ${PATH_BUILD}/tmp/whatsapp/example-config.yaml ${PATH_DEB}/etc/mautrix-whatsapp/config.yaml -} -echo $1 -FUNC=$1 -shift -${FUNC} $* diff --git a/ressources/mautrix-whatsapp/prebuild b/ressources/mautrix-whatsapp/prebuild new file mode 100755 index 0000000..090b647 --- /dev/null +++ b/ressources/mautrix-whatsapp/prebuild @@ -0,0 +1,6 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/mautrix/whatsapp.git +cd whatsapp/ +git checkout $VERSION diff --git a/ressources/rss-bridge/build b/ressources/rss-bridge/build new file mode 100755 index 0000000..05a7907 --- /dev/null +++ b/ressources/rss-bridge/build @@ -0,0 +1,2 @@ +#!/bin/bash + diff --git a/ressources/rss-bridge/envinit b/ressources/rss-bridge/envinit new file mode 100755 index 0000000..21f4ffc --- /dev/null +++ b/ressources/rss-bridge/envinit @@ -0,0 +1,2 @@ +#/bin/bash +apt install -y git diff --git a/ressources/rss-bridge/makedeb b/ressources/rss-bridge/makedeb new file mode 100644 index 0000000..6dcbd19 --- /dev/null +++ b/ressources/rss-bridge/makedeb @@ -0,0 +1,16 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +cp -fr ${PATH_BUILD}/tmp/rss-bridge ${PATH_DEB}/usr/share/ + +cp ${PATH_DEB}/usr/share/rss-bridge/config.default.ini.php ${PATH_DEB}/etc/rss-bridge/config.ini.php +cp ${PATH_DEB}/usr/share/rss-bridge/whitelist.default.txt ${PATH_DEB}/etc/rss-bridge/whitelist.txt + +ln -s /etc/rss-bridge/config.ini.php ${PATH_DEB}/usr/share/rss-bridge/config.ini.php +ln -s /etc/rss-bridge/whitelist.txt ${PATH_DEB}/usr/share/rss-bridge/whitelist.txt + +mkdir -p ${PATH_DEB}/var/cache/rss-bridge/cache/ +rm ${PATH_DEB}/usr/share/rss-bridge/cache +ln -s /var/cache/rss-bridge/cache/ ${PATH_DEB}/usr/share/rss-bridge/cache diff --git a/ressources/rss-bridge/prebuild b/ressources/rss-bridge/prebuild new file mode 100755 index 0000000..f486be7 --- /dev/null +++ b/ressources/rss-bridge/prebuild @@ -0,0 +1,6 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/RSS-Bridge/rss-bridge.git +cd rss-bridge/ +git checkout $VERSION diff --git a/ressources/rss-bridge/rss-bridge b/ressources/rss-bridge/rss-bridge deleted file mode 100755 index b55e97a..0000000 --- a/ressources/rss-bridge/rss-bridge +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -envinit() { - apt install -y git -} - -prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/RSS-Bridge/rss-bridge.git - cd rss-bridge/ - git checkout $VERSION -} - -build() { - -} - -makedeb(){ - PATH_BUILD=$1 - PATH_DEB=$2 - GIT_VERSION=$3 - - cp -fr ${PATH_BUILD}/tmp/rss-bridge ${PATH_DEB}/usr/share/ - - cp ${PATH_DEB}/usr/share/rss-bridge/config.default.ini.php ${PATH_DEB}/etc/rss-bridge/config.ini.php - cp ${PATH_DEB}/usr/share/rss-bridge/whitelist.default.txt ${PATH_DEB}/etc/rss-bridge/whitelist.txt - - ln -s /etc/rss-bridge/config.ini.php ${PATH_DEB}/usr/share/rss-bridge/config.ini.php - ln -s /etc/rss-bridge/whitelist.txt ${PATH_DEB}/usr/share/rss-bridge/whitelist.txt - - mkdir -p ${PATH_DEB}/var/cache/rss-bridge/cache/ - rm ${PATH_DEB}/usr/share/rss-bridge/cache - ln -s /var/cache/rss-bridge/cache/ ${PATH_DEB}/usr/share/rss-bridge/cache -} -echo $1 -FUNC=$1 -shift -${FUNC} $* diff --git a/ressources/standardnotes-web/build b/ressources/standardnotes-web/build new file mode 100755 index 0000000..11717cf --- /dev/null +++ b/ressources/standardnotes-web/build @@ -0,0 +1,5 @@ +#!/bin/bash +cd /tmp/web +PATH=$PATH:/tmp/web/bin +npm install +npm run build diff --git a/ressources/standardnotes-web/envinit b/ressources/standardnotes-web/envinit new file mode 100755 index 0000000..95f0ae1 --- /dev/null +++ b/ressources/standardnotes-web/envinit @@ -0,0 +1,7 @@ +#/bin/bash +apt install -y 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 +apt-get update +apt-get install -y yarn nodejs diff --git a/ressources/standardnotes-web/makedeb b/ressources/standardnotes-web/makedeb new file mode 100644 index 0000000..160270f --- /dev/null +++ b/ressources/standardnotes-web/makedeb @@ -0,0 +1,6 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +cp -fr ${PATH_BUILD}/tmp/web/* ${PATH_DEB}/usr/lib/standardnotes/web/ diff --git a/ressources/standardnotes-web/prebuild b/ressources/standardnotes-web/prebuild new file mode 100755 index 0000000..76d9a2c --- /dev/null +++ b/ressources/standardnotes-web/prebuild @@ -0,0 +1,6 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/standardnotes/web.git +cd web/ +git checkout $VERSION diff --git a/ressources/standardnotes-web/standardnotes-web b/ressources/standardnotes-web/standardnotes-web deleted file mode 100755 index fe668cd..0000000 --- a/ressources/standardnotes-web/standardnotes-web +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -envinit() { - apt install -y 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 - apt-get update - apt-get install -y yarn nodejs -} - -prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/standardnotes/web.git - cd web/ - git checkout $VERSION -} - -build() { - cd /tmp/web - PATH=$PATH:/tmp/web/bin - npm install - npm run build -} - -makedeb(){ - PATH_BUILD=$1 - PATH_DEB=$2 - GIT_VERSION=$3 - - cp -fr ${PATH_BUILD}/tmp/web/* ${PATH_DEB}/usr/lib/standardnotes/web/ -} -echo $1 -FUNC=$1 -shift -${FUNC} $* diff --git a/ressources/vaultwarden-web/build b/ressources/vaultwarden-web/build new file mode 100755 index 0000000..d9f6bfb --- /dev/null +++ b/ressources/vaultwarden-web/build @@ -0,0 +1,4 @@ +#!/bin/bash +cd /tmp/web-vault +npm install +npm run dist:oss:selfhost diff --git a/ressources/vaultwarden-web/envinit b/ressources/vaultwarden-web/envinit new file mode 100755 index 0000000..1e027d0 --- /dev/null +++ b/ressources/vaultwarden-web/envinit @@ -0,0 +1,8 @@ +#/bin/bash +apt install -y 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 +apt-get update +#apt-get install -y yarn nodejs +apt-get install -y nodejs diff --git a/ressources/vaultwarden-web/makedeb b/ressources/vaultwarden-web/makedeb new file mode 100644 index 0000000..7cb0f12 --- /dev/null +++ b/ressources/vaultwarden-web/makedeb @@ -0,0 +1,6 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +cp -fr ${PATH_BUILD}/tmp/web-vault/build/* ${PATH_DEB}/usr/share/vaultwarden-web diff --git a/ressources/vaultwarden-web/prebuild b/ressources/vaultwarden-web/prebuild new file mode 100755 index 0000000..d76bd65 --- /dev/null +++ b/ressources/vaultwarden-web/prebuild @@ -0,0 +1,19 @@ +#!/bin/bash +VERSION=$1 + +cd /tmp +git clone https://github.com/bitwarden/web.git web-vault +cd /tmp/web-vault +git checkout ${VERSION} +git submodule update --init --recursive +cd .. + +git clone https://github.com/dani-garcia/bw_web_builds.git +cd bw_web_builds +PATCH=$(git tag --sort=v:refname | tail -n1) +git checkout ${PATCH} +cp patches/${PATCH}.patch ../web-vault/ + +cd /tmp/web-vault +git apply ${PATCH}.patch + diff --git a/ressources/vaultwarden-web/vaultwarden-web b/ressources/vaultwarden-web/vaultwarden-web deleted file mode 100755 index 0ceb1ba..0000000 --- a/ressources/vaultwarden-web/vaultwarden-web +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -envinit() { - apt install -y 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 - apt-get update - #apt-get install -y yarn nodejs - apt-get install -y nodejs -} - -prebuild(){ - VERSION=$1 - - cd /tmp - git clone https://github.com/bitwarden/web.git web-vault - cd /tmp/web-vault - git checkout ${VERSION} - git submodule update --init --recursive - cd .. - - git clone https://github.com/dani-garcia/bw_web_builds.git - cd bw_web_builds - PATCH=$(git tag --sort=v:refname | tail -n1) - git checkout ${PATCH} - cp patches/${PATCH}.patch ../web-vault/ - - cd /tmp/web-vault - git apply ${PATCH}.patch -} - -build() { - cd /tmp/web-vault - npm install - npm run dist:oss:selfhost -} - -makedeb(){ - PATH_BUILD=$1 - PATH_DEB=$2 - GIT_VERSION=$3 - - cp -fr ${PATH_BUILD}/tmp/web-vault/build/* ${PATH_DEB}/usr/share/vaultwarden-web -} -echo $1 -FUNC=$1 -shift -${FUNC} $* diff --git a/ressources/vaultwarden/build b/ressources/vaultwarden/build new file mode 100755 index 0000000..483991a --- /dev/null +++ b/ressources/vaultwarden/build @@ -0,0 +1,4 @@ +#!/bin/bash +cd /tmp/vaultwarden/ +source ~/.cargo/env +cargo build --features sqlite,mysql,postgresql --release diff --git a/ressources/vaultwarden/envinit b/ressources/vaultwarden/envinit new file mode 100755 index 0000000..41375e3 --- /dev/null +++ b/ressources/vaultwarden/envinit @@ -0,0 +1,6 @@ +#/bin/bash +apt install -y --no-install-recommends build-essential git wget ca-certificates libmariadb-dev libpq-dev pkg-config libmysql++-dev +cd /tmp +wget -qO - https://sh.rustup.rs > rustup +bash rustup -qy +apt clean diff --git a/ressources/vaultwarden/makedeb b/ressources/vaultwarden/makedeb new file mode 100644 index 0000000..4b8c245 --- /dev/null +++ b/ressources/vaultwarden/makedeb @@ -0,0 +1,7 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +cp -fr ${PATH_BUILD}/tmp/vaultwarden/target/release/vaultwarden ${PATH_DEB}/usr/lib/vaultwarden/ + diff --git a/ressources/vaultwarden/prebuild b/ressources/vaultwarden/prebuild new file mode 100755 index 0000000..0d09fee --- /dev/null +++ b/ressources/vaultwarden/prebuild @@ -0,0 +1,6 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/dani-garcia/vaultwarden.git +cd vaultwarden/ +git checkout $VERSION diff --git a/ressources/vaultwarden/vaultwarden b/ressources/vaultwarden/vaultwarden deleted file mode 100755 index a23a9c3..0000000 --- a/ressources/vaultwarden/vaultwarden +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -envinit() { - apt install -y --no-install-recommends build-essential git wget ca-certificates libmariadb-dev libpq-dev pkg-config libmysql++-dev - cd /tmp - wget -qO - https://sh.rustup.rs > rustup - bash rustup -qy - apt clean -} - -prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/dani-garcia/vaultwarden.git - cd vaultwarden/ - git checkout $VERSION -} - -build() { - cd /tmp/vaultwarden/ - source ~/.cargo/env - cargo build --features sqlite,mysql,postgresql --release -} - -makedeb(){ - PATH_BUILD=$1 - PATH_DEB=$2 - GIT_VERSION=$3 - - cp -fr ${PATH_BUILD}/tmp/vaultwarden/target/release/vaultwarden ${PATH_DEB}/usr/lib/vaultwarden/ -} -echo $1 -FUNC=$1 -shift -${FUNC} $* diff --git a/ressources/zigbee2mqtt/build b/ressources/zigbee2mqtt/build new file mode 100755 index 0000000..950a1be --- /dev/null +++ b/ressources/zigbee2mqtt/build @@ -0,0 +1,4 @@ +#!/bin/bash +cd /tmp/zigbee2mqtt/ +npm ci +npm run build diff --git a/ressources/zigbee2mqtt/envinit b/ressources/zigbee2mqtt/envinit new file mode 100755 index 0000000..4a9e8d7 --- /dev/null +++ b/ressources/zigbee2mqtt/envinit @@ -0,0 +1,3 @@ +#/bin/bash +apt install -y wget ca-certificates nodejs npm git make g++ gcc + diff --git a/ressources/zigbee2mqtt/makedeb b/ressources/zigbee2mqtt/makedeb new file mode 100644 index 0000000..e7dd874 --- /dev/null +++ b/ressources/zigbee2mqtt/makedeb @@ -0,0 +1,8 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +cp -fr ${PATH_BUILD}/tmp/zigbee2mqtt/data/configuration.yaml ${PATH_DEB}/etc/zigbee2mqtt/configuration.yaml +cp -fr ${PATH_BUILD}/tmp/zigbee2mqtt/* ${PATH_DEB}/usr/lib/zigbee2mqtt/ + diff --git a/ressources/zigbee2mqtt/prebuild b/ressources/zigbee2mqtt/prebuild new file mode 100755 index 0000000..dde8021 --- /dev/null +++ b/ressources/zigbee2mqtt/prebuild @@ -0,0 +1,6 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/Koenkk/zigbee2mqtt.git +cd zigbee2mqtt/ +git checkout $VERSION diff --git a/ressources/zigbee2mqtt/zigbee2mqtt b/ressources/zigbee2mqtt/zigbee2mqtt deleted file mode 100755 index 2ad950c..0000000 --- a/ressources/zigbee2mqtt/zigbee2mqtt +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -envinit() { - apt install -y wget ca-certificates nodejs npm git make g++ gcc -} - -prebuild(){ - VERSION=$1 - cd /tmp/ - git clone https://github.com/Koenkk/zigbee2mqtt.git - cd zigbee2mqtt/ - git checkout $VERSION -} - -build() { - cd /tmp/zigbee2mqtt/ - npm ci - npm run build -} - -makedeb(){ - PATH_BUILD=$1 - PATH_DEB=$2 - GIT_VERSION=$3 - - cp -fr ${PATH_BUILD}/tmp/zigbee2mqtt/data/configuration.yaml ${PATH_DEB}/etc/zigbee2mqtt/configuration.yaml - cp -fr ${PATH_BUILD}/tmp/zigbee2mqtt/* ${PATH_DEB}/usr/lib/zigbee2mqtt/ -} - -echo $1 -FUNC=$1 -shift -${FUNC} $*