From 02be4323ddeee691a5dcba864b93ec9aa3d47f38 Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Sun, 29 Jan 2023 16:10:40 +0100 Subject: feat: Add firefly3 config folder Now the env file is linked to the to the etc folder. --- apks/firefly3/APKBUILD | 31 +++++++++++++++++++++---------- apks/firefly3/firefly.nginx.conf | 16 ---------------- apks/firefly3/firefly3-env | 18 ++++++++++++++++++ apks/firefly3/firefly3.nginx.conf | 16 ++++++++++++++++ apks/firefly3/firefly3.post-install | 2 +- 5 files changed, 56 insertions(+), 27 deletions(-) delete mode 100644 apks/firefly3/firefly.nginx.conf create mode 100644 apks/firefly3/firefly3-env create mode 100644 apks/firefly3/firefly3.nginx.conf diff --git a/apks/firefly3/APKBUILD b/apks/firefly3/APKBUILD index 68bf67b..9f113c0 100644 --- a/apks/firefly3/APKBUILD +++ b/apks/firefly3/APKBUILD @@ -1,12 +1,12 @@ # Maintainer: Gabriel Arakaki Giovanini pkgname=firefly3 pkgver=5.7.13 -pkgrel=2 +pkgrel=4 pkgdesc="A free and open source personal finance manager" url="https://firefly-iii.org" arch="noarch" license="AGPL-3.0-only" -_php=php8 +_php=php81 _php_mods=" -curl -zip @@ -41,13 +41,18 @@ install=" " source=" ${pkgname}-${pkgver}.tar.gz::https://github.com/firefly-iii/firefly-iii/archive/refs/tags/$pkgver.tar.gz - firefly.nginx.conf + + $pkgname.nginx.conf + $pkgname-env " options="!check" # no clue how to run test on this builddir="$srcdir/firefly-iii-$pkgver/" package() { - local wwwdir="var/www/$pkgname" + local wwwdir="usr/share/webapps/$pkgname" + local confdir="etc/$pkgname" + + install -d -m 770 -o www-data -g www-data "$pkgdir"/$confdir mkdir -p "$pkgdir" cd "$pkgdir" @@ -62,22 +67,27 @@ package() { cd .. install -m 755 -o www-data -g www-data -d "$wwwdir" + + install -m 660 -o www-data -g www-data \ + "$srcdir"/$pkgname-env "$pkgdir"/$confdir/env + + ln -s /$confdir/env "$pkgdir"/$wwwdir/.env } _mysql() { - depends="firefly3 php8-pdo_mysql" + depends="firefly3 php81-pdo_mysql" pkgdesc="Mysql dependencies for $pkgname" mkdir -p "$subpkgdir" } _psql() { - depends=" firefly3 php8-pdo_pgsql php8-pgsql" + depends=" firefly3 php81-pdo_pgsql php81-pgsql" pkgdesc="Postgresql dependencies for $pkgname" mkdir -p "$subpkgdir" } _sqlite() { - depends="firefly3 php8-pdo_sqlite" + depends="firefly3 php81-pdo_sqlite" pkgdesc="Sqlite dependencies for $pkgname" mkdir -p "$subpkgdir" } @@ -85,11 +95,12 @@ _sqlite() { _nginx() { depends="firefly3" pkgdesc="nginx configuration for $pkgname" - install -Dm644 "$srcdir/firefly.nginx.conf" \ - "$subpkgdir"/etc/nginx/http.d/firefly.conf + install -Dm644 "$srcdir/$pkgname.nginx.conf" \ + "$subpkgdir"/etc/nginx/http.d/$pkgname.conf } sha512sums=" a59f89305eeb6cdb301ca86a6a3dfacd90497ce887b59b7c426bef341e7a070efc0d430c6e40277273e5aa56b86271c652f80e696cc53f0788b0624dd1b66a46 firefly3-5.7.13.tar.gz -9d32e8e8bd805b09cd429eacc42fe9e746570cdc867531ac47a0b31801378e5e0fc357ef88e8d5c14617ba1887a3789a9d2f7150111b497377380df7ccdd08a7 firefly.nginx.conf +9d32e8e8bd805b09cd429eacc42fe9e746570cdc867531ac47a0b31801378e5e0fc357ef88e8d5c14617ba1887a3789a9d2f7150111b497377380df7ccdd08a7 firefly3.nginx.conf +b778a4113b8d4d3465a5f80a72fe04497d68d718751e2b0ee43fdbd4379b6278bdff74c68e095668f03ef3a9969de41d734cb4f7e27fb26f1a4342f0c9e0f57e firefly3-env " diff --git a/apks/firefly3/firefly.nginx.conf b/apks/firefly3/firefly.nginx.conf deleted file mode 100644 index a95ebb1..0000000 --- a/apks/firefly3/firefly.nginx.conf +++ /dev/null @@ -1,16 +0,0 @@ -server { - listen 80; - server_name firefly.lan; - root /var/www/firefly3/public; - - location ~ \.php$ { - try_files $uri $uri/ =404; - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/run/php-fpm8/fpm.sock; - include fastcgi.conf; - } - - location / { - try_files $uri /index.php$is_args$args; - } -} diff --git a/apks/firefly3/firefly3-env b/apks/firefly3/firefly3-env new file mode 100644 index 0000000..201de19 --- /dev/null +++ b/apks/firefly3/firefly3-env @@ -0,0 +1,18 @@ +DB_CONNECTION= +DB_HOST= +DB_PORT= +DB_DATABASE= +DB_USERNAME= +DB_PASSWORD= + +APP_KEY= + +REDIS_SCHEME= +CACHE_DRIVER= +SESSION_DRIVER= +REDIS_HOST= +REDIS_PORT= +REDIS_PASSWORD= + +APP_DEBUG= +APP_LOG_LEVEL= diff --git a/apks/firefly3/firefly3.nginx.conf b/apks/firefly3/firefly3.nginx.conf new file mode 100644 index 0000000..a95ebb1 --- /dev/null +++ b/apks/firefly3/firefly3.nginx.conf @@ -0,0 +1,16 @@ +server { + listen 80; + server_name firefly.lan; + root /var/www/firefly3/public; + + location ~ \.php$ { + try_files $uri $uri/ =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/run/php-fpm8/fpm.sock; + include fastcgi.conf; + } + + location / { + try_files $uri /index.php$is_args$args; + } +} diff --git a/apks/firefly3/firefly3.post-install b/apks/firefly3/firefly3.post-install index 0c5d88a..c74ae13 100644 --- a/apks/firefly3/firefly3.post-install +++ b/apks/firefly3/firefly3.post-install @@ -1,6 +1,6 @@ #!/bin/sh -printf " *\n * Add the configration to '/var/www/firefly3/.env' \n" +printf " *\n * Add the configration to '/etc/firefly3/env' \n" printf " * Without it firefly3 won't run.\n *\n" exit 0 -- cgit v1.2.3