diff options
Diffstat (limited to 'apks/firefly3')
-rw-r--r-- | apks/firefly3/APKBUILD | 67 | ||||
-rw-r--r-- | apks/firefly3/firefly.nginx.conf | 16 | ||||
-rw-r--r-- | apks/firefly3/firefly3.post-install | 6 |
3 files changed, 82 insertions, 7 deletions
diff --git a/apks/firefly3/APKBUILD b/apks/firefly3/APKBUILD index a1b4f5e..3772133 100644 --- a/apks/firefly3/APKBUILD +++ b/apks/firefly3/APKBUILD @@ -7,12 +7,39 @@ url="https://firefly-iii.org" arch="noarch" license="AGPL-3.0-only" _php=php8 -_php_mods="-curl -zip -sodium -gd -xml -mbstring -bcmath -fileinfo -session - -tokenizer -xmlwriter -dom -shmop" +_php_mods=" + -curl + -zip + -sodium + -gd + -xml + -mbstring + -bcmath + -fileinfo + -session + -tokenizer + -xmlwriter + -dom + -shmop +" depends="$_php ${_php_mods//-/$_php-}" -_php_makemods="-intl -pdo -simplexml" +_php_makemods=" + -intl + -pdo + -simplexml +" makedepends="$_php ${_php_makemods//-/$_php-} composer" -source="${pkgname}-${pkgver}.tar.gz::https://github.com/firefly-iii/firefly-iii/archive/refs/tags/$pkgver.tar.gz" +subpackages=" + $pkgname-nginx:_nginx:noarch + $pkgname-mysql:_mysql + $pkgname-psql:_psql + $pkgname-sqlite:_sqlite +" +install="$pkgname.post-install" +source=" + ${pkgname}-${pkgver}.tar.gz::https://github.com/firefly-iii/firefly-iii/archive/refs/tags/$pkgver.tar.gz + firefly.nginx.conf +" options="!check" # no clue how to run test on this builddir="$srcdir/firefly-iii-$pkgver/" @@ -20,16 +47,42 @@ package() { local wwwdir="usr/share/webapps/$pkgname" mkdir -p "$pkgdir" - cd "$pkgdir" + cd "$pkgdir" - mkdir -p ./${wwwdir%/*} - cp -a "$builddir" ./$wwwdir + mkdir -p ./${wwwdir%/*} + cp -a "$builddir" ./$wwwdir chmod +x ./$wwwdir/artisan cd "$wwwdir" && composer install --prefer-dist --no-dev --no-scripts +} + +_mysql() { + depends="firefly3 php8-pdo_mysql" + pkgdesc="Mysql dependencies for $pkgname" + mkdir -p "$subpkgdir"/usr +} + +_psql() { + depends=" firefly3 php8-pdo_pgsql php8-pgsql" + pkgdesc="Postgresql dependencies for $pkgname" + mkdir -p "$subpkgdir"/usr +} +_sqlite() { + depends="firefly3 php8-pdo_sqlite" + pkgdesc="Sqlite dependencies for $pkgname" + mkdir -p "$subpkgdir"/usr } + +_nginx() { + depends="firefly3" + pkgdesc="nginx configuration for $pkgname" + install -Dm644 "$srcdir/firefly.nginx.conf" \ + "$subpkgdir"/etc/nginx/http.d/firefly.conf +} + sha512sums=" a59f89305eeb6cdb301ca86a6a3dfacd90497ce887b59b7c426bef341e7a070efc0d430c6e40277273e5aa56b86271c652f80e696cc53f0788b0624dd1b66a46 firefly3-5.7.13.tar.gz +9d32e8e8bd805b09cd429eacc42fe9e746570cdc867531ac47a0b31801378e5e0fc357ef88e8d5c14617ba1887a3789a9d2f7150111b497377380df7ccdd08a7 firefly.nginx.conf " diff --git a/apks/firefly3/firefly.nginx.conf b/apks/firefly3/firefly.nginx.conf new file mode 100644 index 0000000..a95ebb1 --- /dev/null +++ b/apks/firefly3/firefly.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 new file mode 100644 index 0000000..0c5d88a --- /dev/null +++ b/apks/firefly3/firefly3.post-install @@ -0,0 +1,6 @@ +#!/bin/sh + +printf " *\n * Add the configration to '/var/www/firefly3/.env' \n" +printf " * Without it firefly3 won't run.\n *\n" + +exit 0 |