diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2022-11-07 20:25:24 +0000 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2022-11-07 21:27:46 +0000 |
commit | 8bfb6b9bd5333085c5cccbffdb298fd1c37997a5 (patch) | |
tree | 4a62a768f69eddfe185a447d50581881c53df589 | |
parent | 400ba1808f11f8e4814df6bdb17861d856efb107 (diff) | |
download | apkbuilds-8bfb6b9bd5333085c5cccbffdb298fd1c37997a5.tar.gz apkbuilds-8bfb6b9bd5333085c5cccbffdb298fd1c37997a5.tar.bz2 apkbuilds-8bfb6b9bd5333085c5cccbffdb298fd1c37997a5.zip |
fix: Fix firefly location and permission
Firefly was being copied into the wrong folder with root permission.
Now it is on `www` which is what I use for it.
-rw-r--r-- | apks/firefly3/APKBUILD | 21 | ||||
-rw-r--r-- | apks/firefly3/firefly3.pre-install | 9 |
2 files changed, 23 insertions, 7 deletions
diff --git a/apks/firefly3/APKBUILD b/apks/firefly3/APKBUILD index 3772133..68bf67b 100644 --- a/apks/firefly3/APKBUILD +++ b/apks/firefly3/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Gabriel Arakaki Giovanini <mail@gabrielgio.me> pkgname=firefly3 pkgver=5.7.13 -pkgrel=0 +pkgrel=2 pkgdesc="A free and open source personal finance manager" url="https://firefly-iii.org" arch="noarch" @@ -35,7 +35,10 @@ subpackages=" $pkgname-psql:_psql $pkgname-sqlite:_sqlite " -install="$pkgname.post-install" +install=" + $pkgname.pre-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 @@ -44,7 +47,7 @@ options="!check" # no clue how to run test on this builddir="$srcdir/firefly-iii-$pkgver/" package() { - local wwwdir="usr/share/webapps/$pkgname" + local wwwdir="var/www/$pkgname" mkdir -p "$pkgdir" cd "$pkgdir" @@ -54,25 +57,29 @@ package() { chmod +x ./$wwwdir/artisan - cd "$wwwdir" && composer install --prefer-dist --no-dev --no-scripts + cd ./$wwwdir + composer install --prefer-dist --no-dev --no-scripts + cd .. + + install -m 755 -o www-data -g www-data -d "$wwwdir" } _mysql() { depends="firefly3 php8-pdo_mysql" pkgdesc="Mysql dependencies for $pkgname" - mkdir -p "$subpkgdir"/usr + mkdir -p "$subpkgdir" } _psql() { depends=" firefly3 php8-pdo_pgsql php8-pgsql" pkgdesc="Postgresql dependencies for $pkgname" - mkdir -p "$subpkgdir"/usr + mkdir -p "$subpkgdir" } _sqlite() { depends="firefly3 php8-pdo_sqlite" pkgdesc="Sqlite dependencies for $pkgname" - mkdir -p "$subpkgdir"/usr + mkdir -p "$subpkgdir" } _nginx() { diff --git a/apks/firefly3/firefly3.pre-install b/apks/firefly3/firefly3.pre-install new file mode 100644 index 0000000..74f1b59 --- /dev/null +++ b/apks/firefly3/firefly3.pre-install @@ -0,0 +1,9 @@ +#!/bin/sh + +user=www-data +group=www-data + +addgroup -S $group 2>/dev/null +adduser -S -D -h /var/lib/$user -s /sbin/nologin -G $group -g $user $user 2>/dev/null + +exit 0 |