Add grocy
update version element-web2deb joplin2deb update README
This commit is contained in:
parent
dd0aad6740
commit
1055dbd48c
27
README.MD
27
README.MD
|
@ -15,7 +15,13 @@ allstep
|
|||
|
||||
### package are available without compilation
|
||||
|
||||
#### joplin server
|
||||
- [joplin-server](#joplin-server)
|
||||
- [rss-bridge](#rss-bridge)
|
||||
- [vaultwarden](#vaultwarden)
|
||||
- [zigbee2mqtt](#zigbee2mqtt)
|
||||
- [element-web](#element-web)
|
||||
|
||||
#### joplin-server
|
||||
|
||||
```bash
|
||||
apt install -y python wget ca-certificates
|
||||
|
@ -70,3 +76,22 @@ 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
|
||||
```
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
APP=element-web
|
||||
VERSION=1.10.1
|
||||
VERSION=1.10.2
|
||||
GIT_VERSION=v$VERSION
|
||||
DEB_VERSION=$VERSION-2
|
||||
DEBIAN_VERSION_CODENAME=bullseye
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
APP=grocy
|
||||
VERSION=3.2.0
|
||||
GIT_VERSION=v$VERSION
|
||||
DEB_VERSION=$VERSION-5
|
||||
DEBIAN_VERSION_CODENAME=sid
|
||||
|
||||
source ./lib/function.sh
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
APP=joplin
|
||||
VERSION=2.7.11
|
||||
VERSION=2.7.12
|
||||
GIT_VERSION=$VERSION
|
||||
DEB_VERSION=$VERSION-1
|
||||
DEBIAN_VERSION_CODENAME=bullseye
|
||||
|
|
|
@ -1,138 +0,0 @@
|
|||
#!/bin/bash
|
||||
CACHE_APP=cache/${APP}/
|
||||
CACHE_STEP1=cache/${DEBIAN_VERSION_CODENAME}
|
||||
CACHE_STEP2=cache/${APP}/envinit
|
||||
CACHE_STEP3=cache/${APP}/prebuild
|
||||
CACHE_STEP4=cache/${APP}/build
|
||||
|
||||
#DownloadOs
|
||||
step1() {
|
||||
if [ ! -e ${CACHE_STEP1} ]
|
||||
then
|
||||
mkdir -p ${CACHE_STEP1}/proc
|
||||
mount -t proc proc ${CACHE_STEP1}/proc
|
||||
sleep 2
|
||||
debootstrap ${DEBIAN_VERSION_CODENAME} ${CACHE_STEP1}
|
||||
umount ${CACHE_STEP1}/proc
|
||||
fi
|
||||
}
|
||||
|
||||
#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}/envinit ${CACHE_STEP2}/tmp/envinit
|
||||
mount -t proc proc ${CACHE_STEP2}/proc
|
||||
sleep 2
|
||||
chroot ${CACHE_STEP2} /tmp/envinit
|
||||
umount ${CACHE_STEP2}/proc
|
||||
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}/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}/build ${CACHE_STEP4}/tmp/build
|
||||
mount -t proc proc ${CACHE_STEP4}/proc/
|
||||
sleep 2
|
||||
chroot ${CACHE_STEP4} /tmp/build
|
||||
umount ${CACHE_STEP4}/proc/
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#PackageDeb
|
||||
step5(){
|
||||
rm -fr dist/${APP}
|
||||
mkdir dist/${APP}
|
||||
cp -pfr ressources/${APP}/rootfs/* dist/$APP/
|
||||
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}
|
||||
}
|
||||
|
||||
allstep(){
|
||||
step1
|
||||
step2
|
||||
step3
|
||||
step4
|
||||
step5
|
||||
}
|
||||
|
||||
DeleteStep1(){
|
||||
rm -fr ${CACHE_STEP1} ${CACHE_STEP2} ${CACHE_STEP3} ${CACHE_STEP4}
|
||||
}
|
||||
DeleteStep2(){
|
||||
rm -fr ${CACHE_STEP2} ${CACHE_STEP3} ${CACHE_STEP4}
|
||||
}
|
||||
DeleteStep3(){
|
||||
rm -fr ${CACHE_STEP3} ${CACHE_STEP4}
|
||||
}
|
||||
DeleteStep4(){
|
||||
rm -fr ${CACHE_STEP4}
|
||||
}
|
||||
|
||||
StartFromStep1(){
|
||||
DeleteStep1
|
||||
allstep
|
||||
}
|
||||
|
||||
StartFromStep2(){
|
||||
DeleteStep2
|
||||
allstep
|
||||
}
|
||||
|
||||
StartFromStep3(){
|
||||
DeleteStep3
|
||||
allstep
|
||||
}
|
||||
|
||||
StartFromStep4(){
|
||||
DeleteStep4
|
||||
allstep
|
||||
}
|
||||
|
||||
GotoStep1(){
|
||||
chroot ${CACHE_STEP1}
|
||||
}
|
||||
|
||||
GotoStep2(){
|
||||
chroot ${CACHE_STEP2}
|
||||
}
|
||||
|
||||
GotoStep3(){
|
||||
chroot ${CACHE_STEP3}
|
||||
}
|
||||
|
||||
GotoStep4(){
|
||||
mount -t proc proc ${CACHE_STEP4}/proc/
|
||||
chroot ${CACHE_STEP4}
|
||||
umount ${CACHE_STEP4}/proc/
|
||||
}
|
||||
|
||||
Clean(){
|
||||
rm -fr cache/*
|
||||
}
|
||||
|
||||
CleanAll(){
|
||||
rm -fr cache/*
|
||||
}
|
|
@ -22,12 +22,12 @@ step2(){
|
|||
if [ ! -e ${CACHE_STEP2} ] ; then
|
||||
mkdir -p ${CACHE_APP}
|
||||
cp -a ${CACHE_STEP1}/ ${CACHE_STEP2}
|
||||
cp ressources/${APP}/recette ${CACHE_STEP2}/tmp/recette
|
||||
cp ressources/${APP}/${APP} ${CACHE_STEP2}/tmp/make
|
||||
mount -t proc proc ${CACHE_STEP2}/proc
|
||||
sleep 2
|
||||
chroot ${CACHE_STEP2} /tmp/recette envinit
|
||||
chroot ${CACHE_STEP2} /tmp/make envinit
|
||||
umount ${CACHE_STEP2}/proc
|
||||
rm ${CACHE_STEP2}/tmp/envinit
|
||||
rm ${CACHE_STEP2}/tmp/${APP}
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -35,9 +35,9 @@ step2(){
|
|||
step3(){
|
||||
if [ ! -e ${CACHE_STEP3} ]; then
|
||||
cp -a ${CACHE_STEP2} ${CACHE_STEP3}
|
||||
cp ressources/${APP}/recette ${CACHE_STEP3}/tmp/recette
|
||||
chroot ${CACHE_STEP3} /tmp/recette prebuild ${GIT_VERSION}
|
||||
rm ${CACHE_STEP3}/tmp/prebuild
|
||||
cp ressources/${APP}/${APP} ${CACHE_STEP3}/tmp/make
|
||||
chroot ${CACHE_STEP3} /tmp/make prebuild ${GIT_VERSION}
|
||||
rm ${CACHE_STEP3}/tmp/make
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -45,11 +45,12 @@ step3(){
|
|||
step4(){
|
||||
if [ ! -e ${CACHE_STEP4} ] ; then
|
||||
cp -a ${CACHE_STEP3} ${CACHE_STEP4}
|
||||
cp ressources/${APP}/recette ${CACHE_STEP4}/tmp/recette
|
||||
cp ressources/${APP}/${APP} ${CACHE_STEP4}/tmp/make
|
||||
mount -t proc proc ${CACHE_STEP4}/proc/
|
||||
sleep 2
|
||||
chroot ${CACHE_STEP4} /tmp/recette build
|
||||
chroot ${CACHE_STEP4} /tmp/make build
|
||||
umount ${CACHE_STEP4}/proc/
|
||||
rm ${CACHE_STEP4}/tmp/make
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -58,7 +59,7 @@ step5(){
|
|||
rm -fr dist/${APP}
|
||||
mkdir dist/${APP}
|
||||
cp -pfr ressources/${APP}/rootfs/* dist/$APP/
|
||||
bash ressources/${APP}/recette makedeb ${CACHE_STEP4} dist/${APP} ${GIT_VERSION}
|
||||
bash ressources/${APP}/${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}
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
#!/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} $*
|
|
@ -0,0 +1 @@
|
|||
/etc/grocy/config.php
|
|
@ -0,0 +1,8 @@
|
|||
Package: grocy
|
||||
Version: %VERSION%
|
||||
Section: base
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Depends: php-simplexml, php-gd, php-sqlite3, php-intl, php-mbstring
|
||||
Maintainer: Thomas Legay <thomas@syngate.fr>
|
||||
Description: grocy
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
chown www-data:www-data /var/lib/grocy
|
|
@ -0,0 +1,11 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName grocy.net.lgy.fr
|
||||
|
||||
DocumentRoot /usr/share/grocy/public/
|
||||
|
||||
<directory /usr/share/grocy/public/>
|
||||
Options -Indexes -MultiViews +FollowSymLinks
|
||||
AllowOverride all
|
||||
Require all granted
|
||||
</directory>
|
||||
</VirtualHost>
|
|
@ -1,15 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
envinit() {
|
||||
|
||||
ls
|
||||
}
|
||||
|
||||
prebuild(){
|
||||
|
||||
ls
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
ls
|
||||
}
|
||||
|
||||
makedeb(){
|
||||
|
|
Loading…
Reference in New Issue