2021-11-29 08:41:21 +00:00
|
|
|
# Maintainer: Martin Rys <rys.pw/contact>
|
2022-01-10 00:23:58 +00:00
|
|
|
|
2020-03-27 00:11:03 +00:00
|
|
|
pkgname=bookstack
|
|
|
|
_camelname=BookStack
|
2023-09-12 12:41:14 +00:00
|
|
|
pkgver=23.08.02
|
2022-12-01 20:30:21 +00:00
|
|
|
pkgrel=1
|
2020-03-27 00:11:03 +00:00
|
|
|
pkgdesc='A simple, self-hosted, easy-to-use platform for organising and storing information'
|
|
|
|
arch=('any')
|
|
|
|
url="https://github.com/BookStackApp/BookStack"
|
2021-03-22 23:10:36 +00:00
|
|
|
license=('MIT')
|
2020-03-27 00:11:03 +00:00
|
|
|
depends=(
|
2023-02-28 15:08:15 +00:00
|
|
|
'php'
|
|
|
|
'php-gd'
|
|
|
|
'php-fpm'
|
2020-03-27 00:11:03 +00:00
|
|
|
)
|
|
|
|
makedepends=('composer')
|
|
|
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/BookStackApp/BookStack/archive/v${pkgver}.tar.gz")
|
2023-09-12 12:41:14 +00:00
|
|
|
sha256sums=('e367751d4337bd0105c1ace6f0f425a0cf04aa86636c9c43e4784ab95fc37446')
|
2021-02-20 19:29:12 +00:00
|
|
|
options=('!strip')
|
2020-03-27 00:11:03 +00:00
|
|
|
backup=("etc/webapps/$pkgname/config.env")
|
|
|
|
|
|
|
|
package() {
|
2023-02-28 15:08:15 +00:00
|
|
|
cd "$srcdir/$_camelname-$pkgver"
|
|
|
|
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --ignore-platform-reqs --no-interaction
|
2020-03-27 00:11:03 +00:00
|
|
|
|
2023-02-28 15:08:15 +00:00
|
|
|
install -d "$pkgdir/usr/share/webapps/$pkgname" "$pkgdir/usr/share/licenses/$pkgname" "$pkgdir/etc/webapps/$pkgname"
|
|
|
|
cp -r * "$pkgdir/usr/share/webapps/$pkgname"
|
|
|
|
install -D "$srcdir/$_camelname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
|
2020-03-27 00:11:03 +00:00
|
|
|
|
2023-02-28 15:08:15 +00:00
|
|
|
cp .env.example "$pkgdir/etc/webapps/$pkgname/config.env"
|
2020-03-27 00:11:03 +00:00
|
|
|
|
2023-02-28 15:08:15 +00:00
|
|
|
ln -s "/etc/webapps/$pkgname/config.env" "$pkgdir/usr/share/webapps/$pkgname/.env"
|
|
|
|
rm -rf "$pkgdir/usr/share/webapps/$pkgname/bootstrap/cache"
|
2020-03-27 00:11:03 +00:00
|
|
|
|
2023-02-28 15:08:15 +00:00
|
|
|
mkdir -p "$pkgdir/var/cache/$pkgname"
|
|
|
|
chown http:http "$pkgdir/var/cache/$pkgname"
|
|
|
|
ln -s "/var/cache/$pkgname" "$pkgdir/usr/share/webapps/$pkgname/bootstrap/cache"
|
2020-03-27 00:11:03 +00:00
|
|
|
|
2023-02-28 15:08:15 +00:00
|
|
|
mkdir -p "$pkgdir/var/lib"
|
|
|
|
mv "$pkgdir/usr/share/webapps/$pkgname/storage" "$pkgdir/var/lib/$pkgname"
|
|
|
|
chown -R http:http "$pkgdir/var/lib/$pkgname"
|
|
|
|
chmod 775 "$pkgdir/var/lib/$pkgname"
|
|
|
|
ln -s "/var/lib/$pkgname" "$pkgdir/usr/share/webapps/$pkgname/storage"
|
2020-03-27 00:11:03 +00:00
|
|
|
}
|