# Maintainer: Antoine Martin (ayakael) # Contributor: Antoine Martin (ayakael) pkgname=firefly-iii pkgver=5.7.12 pkgrel=0 pkgdesc="PHP personal finances manager" arch="noarch" url="https://github.com/firefly-iii/firefly-iii" license="AGPL-3.0-only" options="!check" # No testsuite _php=php81 _php_mods="-intl -curl -bcmath -zip -gd -xml -mbstring -ldap -session -fileinfo -simplexml -sodium -tokenizer -xmlwriter -dom -pdo" depends="$_php ${_php_mods//-/$_php-}" makedepends="composer" source="$pkgname-$pkgver.tar.gz::https://github.com/firefly-iii/firefly-iii/archive/$pkgver.tar.gz" pkgusers="firefly" pkggroups="www-data" prepare() { default_prepare composer install --no-scripts --no-dev } package() { local datadir="/var/lib/$pkgname" local cachedir="/var/cache/$pkgname" local wwwdir="/usr/share/webapps/$pkgname" local confdir="/etc/$pkgname" install -dm 755 "$pkgdir"/$datadir "$pkgdir"/$wwwdir "$pkgdir"/$confdir "$pkgdir"/$cachedir cp -rv "$builddir"/. "$pkgdir"/$wwwdir// cp -v "$pkgdir"/$wwwdir/.env.example "$pkgdir"/$confdir/.env cp -v "$pkgdir"/$wwwdir/.deploy/*/.env* "$pkgdir"/$confdir for i in '' '.heroku' ; do mv -v "$pkgdir"/$confdir/.env$i "$pkgdir"/$confdir/config.env$i done mv "$pkgdir"/$wwwdir/storage/* "$pkgdir"/$datadir rm -rf $pkgdir/$wwwdir/storage rm -rf "$pkgdir"/$wwwdir/bootstrap/cache ln -s $confdir/config.env "$pkgdir"/$wwwdir/.env ln -s $cachedir "$pkgdir"/$wwwdir/bootstrap/cache ln -s $datadir "$pkgdir"/usr/share/webapps/$pkgname/storage } sha512sums=" 16b4fb3107b0d10adf9207c2bcafea4db2da46f214d8122c11b82590b8b3bdb465d0b523d478db92e0f9b434c1d8a23220c611d720d2c9b5e0757af5eb170649 firefly-iii-5.7.12.tar.gz "