This commit is contained in:
Thomas Legay 2023-09-02 22:51:34 +02:00
parent efdd66373e
commit 5220958c0a
18 changed files with 61 additions and 112 deletions

View File

@ -11,12 +11,14 @@ install_package_dependency(){
}
get_git_source(){
[ -e /tmp/${APP} ] && rm -fr /tmp/${APP}
GIT_PATH=/tmp/${APP}
[ ! "$1" == "" ] && GIT_PATH=$1
[ -e ${GIT_PATH} ] && rm -fr ${GIT_PATH}
if [ "${GIT_VERSION}" = "last" ] ;
then
git clone --depth 1 ${DEPOT} /tmp/${APP}
git clone --depth 1 ${DEPOT} ${GIT_PATH}
else
git clone --depth 1 -b ${GIT_VERSION} ${DEPOT} /tmp/${APP}
git clone --depth 1 -b ${GIT_VERSION} ${DEPOT} ${GIT_PATH}
fi
}
@ -28,20 +30,21 @@ configure_depot_yarn() {
configure_depot_nodejs() {
NODE_VERSION=16
[ ! "$1" == "" ] && NODE_VERSION=$1
DEB_FILE=/etc/apt/sources.list.d/nodesource.list
XNODE_VERSION=${NODE_VERSION}.x
grep -q ${XNODE_VERSION} /etc/apt/sources.list.d/nodesource.list
if [ $? -ne 0 ]
if [ -e ${DEB_FILE} ] && [ $(grep -c ${XNODE_VERSION} ${DEB_FILE}) -ne 0 ]
then
wget -qO - https://deb.nodesource.com/setup_${XNODE_VERSION} | bash
fi
wget -qO - https://deb.nodesource.com/setup_${XNODE_VERSION} | bash
echo -e "Package: nodejs\\nPin: version ${NODE_VERSION}.*\\nPin-Priority: 1000" > /etc/apt/preferences.d/nodejs
}
install_go() {
GO_VERSION=1.20.6
GO_VERSION=1.20.7
[ ! "$1" == "" ] && GO_VERSION=$1
PATH=$PATH:/usr/local/go/bin
if [ ! "$(go version)" == "go version go${GO_VERSION} linux/amd64" ] ;
if [ -e /usr/local/go/bin/go ] || [ ! "$(go version)" == "go version go${GO_VERSION} linux/amd64" ] ;
then
rm -rvf /usr/local/go/
wget -qO - https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz | tar -C /usr/local -xz

View File

@ -1,6 +1,6 @@
#!/bin/bash
VERSION=0.108.0-b.42
VERSION=0.108.0-b.43
APP=adguardhome
DEPOT=https://github.com/AdguardTeam/AdGuardHome.git
GIT_VERSION=v${VERSION}

View File

@ -1,6 +1,6 @@
#!/bin/bash
VERSION=2023.7.0
VERSION=2023.8.2
APP=bitwarden-desktop
DEPOT=https://github.com/bitwarden/clients.git
GIT_VERSION=desktop-v${VERSION}

View File

@ -24,13 +24,16 @@ apt install -y --no-install-recommends curl apt-transport-https gnupg wget ca-ce
wget -qO - https://deb.lgy.fr/install.sh | bash
wget -qO - https://deb.nodesource.com/setup_18.x | bash
wget https://repos.azul.com/azul-repo.key -O - | gpg --dearmor -o /usr/share/keyrings/azul.gpg
wget -qO - https://repos.azul.com/azul-repo.key | gpg --dearmor -o /usr/share/keyrings/azul.gpg
echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" > /etc/apt/sources.list.d/zulu.list
#echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list
#wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg
curl https://couchdb.apache.org/repo/keys.asc | gpg --dearmor > /usr/share/keyrings/couchdb-archive-keyring.gpg
wget -qO - https://couchdb.apache.org/repo/keys.asc | gpg --dearmor > /usr/share/keyrings/couchdb-archive-keyring.gpg
source /etc/os-release
echo "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/couchdb.list

View File

@ -1,109 +1,49 @@
#!/bin/bash
VERSION=2.8.29
VERSION=2.9.33
APP=budibase
DEPOT=https://github.com/Budibase/budibase.git
GIT_VERSION=${VERSION}
GIT_VERSION=2.9.33-alpha.0
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=20
PACKAGE_DEPENDENCY="yarn nodejs build-essential"
PACKAGE_DEPENDENCY="yarn nodejs build-essential python3-multiprocess "
main(){
base_package_upgrade
envinit
get_git_source
get_git_source /opt/${APP}/
build
makedeb
}
envinit(){
envinit() {
configure_depot_yarn
configure_depot_nodejs 16
configure_depot_nodejs 18
install_package_dependency
}
build() {
cd /tmp/${APP}
[ -e /opt/budibase ] && rm -fr /opt/budibase
KEEP="dist|package.json|yarn.lock|client|builder|build"
npm install -g yarn jest lerna husky --force
mkdir -p /opt/budibase/node_modules
cp -fr /tmp/${APP}/packages/server /opt/budibase
cp -fr /tmp/${APP}/packages/worker /opt/budibase
cp -fr /tmp/${APP}/packages/builder/ /opt/budibase/server
cp -fr /tmp/${APP}/packages/client/ /opt/budibase/server
cp -fr /tmp/${APP}/yarn.lock /opt/budibase/
cd /opt/${APP}
ln -s /opt/budibase/node_modules /opt/budibase/server/node_modules
ln -s /opt/budibase/node_modules /opt/budibase/worker/node_modules
cd /opt/budibase/server
sed "s/\"0.0.0\"/\"${VERSION}\"/" -i package.json
yarn install --production=true
yarn build
cd /opt/budibase/worker
sed "s/\"0.0.0\"/\"${VERSION}\"/" -i package.json
yarn install --production=true
yarn build
#rm -fr /opt/budibase/node_modules
#mkdir -p /opt/budibase/node_modules
#cd /opt/budibase/server
#ls | egrep -v $KEEP | xargs rm -rfv
#ln -s /opt/budibase/node_modules /opt/budibase/worker/node_modules
#NODE_ENV=production yarn
#
#cd /opt/budibase/worker
#ls | egrep -v $KEEP | xargs rm -rfv
#ln -s /opt/budibase/node_modules /opt/budibase/server/node_modules
#NODE_ENV=production yarn
}
build() {
cd /tmp/${APP}
npm install -g yarn jest lerna husky --force
npm install -g yarn jest lerna typescript husky esbuild --force
node ./hosting/scripts/setup.js
yarn
#yarn bootstrap
yarn bootstrap
yarn build
rm -fr /tmp/${APP}/packages/*/build
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
grep "process.env" /tmp/${APP}/packages/server/src/environment.ts | grep ":" | cut -d ":" -f 1 | tr -d ' ' | grep ^[A-Z] | awk '{print "#"$1"="}' | sort > ${PATH_DEB}/etc/default/budibase-server
grep "process.env" /tmp/${APP}/packages/worker/src/environment.ts | grep ":" | cut -d ":" -f 1 | tr -d ' ' | grep ^[A-Z] | awk '{print "#"$1"="}' | sort > ${PATH_DEB}/etc/default/budibase-worker
grep "process.env" /opt/${APP}/packages/server/src/environment.ts | grep ":" | cut -d ":" -f 1 | tr -d ' ' | grep ^[A-Z] | awk '{print "#"$1"="}' | sort > ${PATH_DEB}/etc/default/budibase-server
grep "process.env" /opt/${APP}/packages/worker/src/environment.ts | grep ":" | cut -d ":" -f 1 | tr -d ' ' | grep ^[A-Z] | awk '{print "#"$1"="}' | sort > ${PATH_DEB}/etc/default/budibase-worker
mv /opt/ ${PATH_DEB}/
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
grep "process.env" /tmp/${APP}/packages/server/src/environment.ts | grep ":" | cut -d ":" -f 1 | tr -d ' ' | grep ^[A-Z] | awk '{print "#"$1"="}' | sort > ${PATH_DEB}/etc/default/budibase-server
grep "process.env" /tmp/${APP}/packages/worker/src/environment.ts | grep ":" | cut -d ":" -f 1 | tr -d ' ' | grep ^[A-Z] | awk '{print "#"$1"="}' | sort > ${PATH_DEB}/etc/default/budibase-worker
mkdir -p ${PATH_DEB}/opt/budibase
cp -fr /tmp/${APP}/packages/* ${PATH_DEB}/opt/budibase/
cp -fr /tmp/${APP}/node_modules ${PATH_DEB}/opt/budibase/
mkdir -p ${PATH_DEB}/opt/budibase/server/client
cp ${PATH_DEB}/opt/budibase/client/manifest.json ${PATH_DEB}/opt/budibase/server/client
cp ${PATH_DEB}/opt/budibase/client/dist/budibase-client.js ${PATH_DEB}/opt/budibase/server/client
mkdir -p ${PATH_DEB}/opt/
cp -fr /opt/${APP} ${PATH_DEB}/opt/${APP}
mkdir -p ${PATH_DEB}/opt/budibase/packages/server/client
cp ${PATH_DEB}/opt/budibase/packages/client/manifest.json ${PATH_DEB}/opt/budibase/packages/server/client
cp ${PATH_DEB}/opt/budibase/packages/client/dist/budibase-client.js ${PATH_DEB}/opt/budibase/packages/server/client
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist

View File

@ -4,7 +4,8 @@ After=network.target
[Service]
EnvironmentFile=/etc/default/budibase-server
ExecStart=/usr/bin/node /opt/budibase/server/dist/index.js
ExecStart=/usr/bin/node dist/index.js
WorkingDirectory=/opt/budibase/packages/server/
Restart=always
#User=budibase-server
#Group=budibase-server

View File

@ -4,7 +4,8 @@ After=network.target
[Service]
EnvironmentFile=/etc/default/budibase-worker
ExecStart=/usr/bin/node /opt/budibase/worker/dist/index.js
ExecStart=/usr/bin/node dist/index.js
WorkingDirectory=/opt/budibase/packages/worker/
Restart=always
#User=budibase-worker
#Group=budibase-worker

View File

@ -1,6 +1,6 @@
#!/bin/bash
VERSION=1.11.36
VERSION=1.11.38
APP=element-web
DEPOT=https://github.com/vector-im/element-web.git
GIT_VERSION=v${VERSION}
@ -19,7 +19,7 @@ main(){
envinit() {
configure_depot_yarn
configure_depot_nodejs
configure_depot_nodejs 18
install_package_dependency
}

View File

@ -1,6 +1,6 @@
#!/bin/bash
VERSION=2.3.0
VERSION=2.3.1
APP=flame
DEPOT=https://github.com/pawelmalak/flame.git
GIT_VERSION=v${VERSION}

View File

@ -1,19 +1,19 @@
#!/bin/bash
VERSION=1.20.1-0
VERSION=1.20.3-0
APP=forgejo
DEPOT=https://codeberg.org/forgejo/forgejo
GIT_VERSION=v${VERSION}
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bookworm
IMAGE_SIZE=6
PACKAGE_DEPENDENCY="build-essential nodejs"
PACKAGE_DEPENDENCY="build-essential nodejs golang"
main() {
base_package_upgrade
configure_depot_nodejs 18
install_package_dependency
install_go
# install_go
get_git_source
build
makedeb

View File

@ -1,6 +1,6 @@
#!/bin/bash
VERSION=2.12.10
VERSION=2.12.14
APP=joplin-desktop
GIT_VERSION=v${VERSION}
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)

View File

@ -1,5 +1,7 @@
[Unit]
Description=mautrix-whatsapp bridge
Wants=network.target
After=network.target
[Service]
Type=exec

View File

@ -1,18 +1,18 @@
#!/bin/bash
VERSION=0.9.0
VERSION=0.10.0
APP=mautrix-whatsapp
DEPOT=https://github.com/mautrix/whatsapp.git
GIT_VERSION=v${VERSION}
DEBIAN_VERSION_CODENAME=bullseye
DEBIAN_VERSION_CODENAME=bookworm
IMAGE_SIZE=4
PACKAGE_DEPENDENCY="debhelper-compat libolm-dev build-essential devscripts"
PACKAGE_DEPENDENCY="debhelper-compat libolm-dev build-essential devscripts golang"
main(){
echo deb http://deb.debian.org/debian bullseye-backports main > /etc/apt/sources.list.d/backports.list
# echo deb http://deb.debian.org/debian bullseye-backports main > /etc/apt/sources.list.d/backports.list
base_package_upgrade
install_package_dependency
apt install -y --no-install-recommends -t bullseye-backports golang
# apt install -y --no-install-recommends -t bullseye-backports golang
get_git_source
makedeb
}

View File

@ -1,6 +1,6 @@
#!/bin/bash
VERSION=0.46.6.4
VERSION=0.47.0
APP=metabase
DEPOT=https://github.com/metabase/metabase.git
GIT_VERSION=v$VERSION
@ -12,7 +12,7 @@ PACKAGE_DEPENDENCY="build-essential default-jdk curl nodejs yarn"
main(){
base_package_upgrade
configure_depot_yarn
configure_depot_nodejs
configure_depot_nodejs 18
install_package_dependency
install_clojure
get_git_source

View File

@ -1,7 +1,7 @@
#!/bin/bash
VERSION=2_9_0
APP=mysql_fdw
VERSION=2_9_1
APP=mysqlfdw
DEPOT=https://github.com/EnterpriseDB/mysql_fdw.git
GIT_VERSION=REL-${VERSION}
DEB_VERSION=$(echo ${VERSION} | sed 's/_/./g' )-$(date +%Y%m%d%H%M)

View File

@ -1,8 +1,8 @@
Package: mysqlfdw
Package: mysqlfdw
Version: %VERSION%
Section: contrib
Priority: optional
Depends: libmariadb-dev-compat
Architecture: all
Maintainer: Thomas Legay <thomas@lgy.fr>
Description: mysql_fdw
Description: mysql_fdw

View File

@ -3,7 +3,7 @@
VERSION=10.4.00
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
APP=picapport
DEBIAN_VERSION_CODENAME=bullseye
DEBIAN_VERSION_CODENAME=bookworm
IMAGE_SIZE=3
main(){

View File

@ -1,10 +1,9 @@
#!/bin/bash
APP=picapport
id ${APP} &> /dev/null || useradd ${APP} -r -s /bin/false -d /var/lib/${APP}
id ${APP} &> /dev/null || useradd ${APP} -r -s /bin/false -md /var/lib/${APP}
chown ${APP}:${APP} /var/lib/${APP}/
chown ${APP}:${APP} /var/lib/${APP}/*
chown -R ${APP}:${APP} /var/lib/${APP}/
if [[ $(systemctl list-unit-files | grep ${APP}.services) -eq 0 ]]
then