ayaports/apk/v3.13/main/firefly-iii/APKBUILD
build@apk-groulx 2f099a9745 update
2021-07-14 03:56:39 +00:00

45 lines
1.8 KiB
Text

# Maintainer: Antoine Martin <dev@ayakael.net>
pkgname=firefly-iii
pkgver=5.5.12
pkgrel=1
pkgdesc='PHP personal finances manager'
pkgusers='firefly'
arch='noarch'
url="https://github.com/${pkgname}/${pkgname}"
license='custom'
options=!check
depends='php7-intl'
makedepends='composer'
source="$pkgname-$pkgver.tar.gz::https://github.com/${pkgname}/${pkgname}/archive/${pkgver}.tar.gz"
package() {
cd "$srcdir/$pkgname-$pkgver"
composer install --no-scripts --no-dev --ignore-platform-reqs
install -d "$pkgdir/usr/share/webapps/$pkgname" "$pkgdir/usr/share/licenses/$pkgname" "$pkgdir/etc/webapps/$pkgname"
cp -rv * "$pkgdir/usr/share/webapps/$pkgname"
install -D "$srcdir/$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
cp -v .env.example "$pkgdir/etc/webapps/$pkgname/.env"
cp -v .deploy/*/.env* "$pkgdir/etc/webapps/$pkgname"
for i in '' '.heroku' ; do
mv -v "$pkgdir/etc/webapps/$pkgname/.env$i" "$pkgdir/etc/webapps/$pkgname/config.env$i"
done
ln -s "/etc/webapps/$pkgname/config.env" "$pkgdir/usr/share/webapps/$pkgname/.env"
rm -rf "$pkgdir/usr/share/webapps/$pkgname/bootstrap/cache"
mkdir -p "$pkgdir/var/cache/$pkgname"
chown firefly:www-data "$pkgdir/var/cache/$pkgname"
ln -s "/var/cache/$pkgname" "$pkgdir/usr/share/webapps/$pkgname/bootstrap/cache"
mkdir -p "$pkgdir/var/lib"
mv "$pkgdir/usr/share/webapps/$pkgname/storage" "$pkgdir/var/lib/firefly-iii"
chown -R firefly:www-data "$pkgdir/var/lib/firefly-iii"
chmod 775 "$pkgdir/var/lib/firefly-iii"
ln -s "/var/lib/firefly-iii" "$pkgdir/usr/share/webapps/$pkgname/storage"
}
# vim:ts=4:sw=4:expandtab
sha512sums="157ec94b6df4a7247cd4f666115a34eeea40d138176818d964aac9a2676640896e25cf7d8adc5936bc4d0aa1f0e76865f0fe9257cd99b8cdeaa063a4004c1b08 firefly-iii-5.5.12.tar.gz"