Add gotify

optimize apt without recommends packages
add package dpkg fakeroot when needed
This commit is contained in:
thomas 2022-02-20 23:33:43 +01:00
parent a340b7db22
commit b69d1ee47f
29 changed files with 77 additions and 94 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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} $*

View File

@ -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() {

View File

@ -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/
}

View File

@ -1,7 +1,7 @@
Package: gotify
Package: gotify-server
Version: %VERSION%
Section: base
Priority: optional
Architecture: all
Maintainer: Thomas Legay <thomas@syngate.fr>
Description: gotify
Description: gotify-server

View File

@ -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

View File

@ -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

View File

@ -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() {

View File

@ -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

View File

@ -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
}

View File

@ -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() {

View File

@ -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(){

View File

@ -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} $*

View File

@ -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

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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