Add grocy

update version element-web2deb joplin2deb
update README
This commit is contained in:
thomas 2022-02-15 23:11:30 +01:00
parent dd0aad6740
commit 1055dbd48c
13 changed files with 112 additions and 153 deletions

40
ressources/grocy/grocy Executable file
View file

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

View file

View file

@ -0,0 +1 @@
/etc/grocy/config.php

View file

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

View file

@ -0,0 +1,2 @@
#!/bin/bash
chown www-data:www-data /var/lib/grocy

View file

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