2023-11-14 01:00:30 +00:00
|
|
|
# Maintainer: Luke T. Shumaker <lukeshu@umorpha.io>
|
|
|
|
# Maintainer (AUR): Martin Rys <rys.pw/contact>
|
2022-01-10 00:23:58 +00:00
|
|
|
|
2023-11-14 01:00:30 +00:00
|
|
|
_pkgname=BookStack
|
|
|
|
pkgname=${_pkgname,,}
|
2023-11-22 21:39:13 +00:00
|
|
|
pkgver=23.10.4
|
2023-12-13 22:45:18 +00:00
|
|
|
pkgrel=2
|
2020-03-27 00:11:03 +00:00
|
|
|
pkgdesc='A simple, self-hosted, easy-to-use platform for organising and storing information'
|
|
|
|
arch=('any')
|
2023-11-14 01:03:06 +00:00
|
|
|
url="https://www.bookstackapp.com/"
|
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'
|
2020-03-27 00:11:03 +00:00
|
|
|
)
|
|
|
|
makedepends=('composer')
|
2023-11-05 21:29:02 +00:00
|
|
|
source=(
|
2023-11-14 01:00:30 +00:00
|
|
|
"$_pkgname-$pkgver.tar.gz::https://github.com/BookStackApp/BookStack/archive/v${pkgver}.tar.gz"
|
2023-11-14 01:32:15 +00:00
|
|
|
'sysusers.conf'
|
|
|
|
'tmpfiles.conf'
|
2023-11-05 21:29:02 +00:00
|
|
|
)
|
2023-12-13 03:32:23 +00:00
|
|
|
sha256sums=('0a3cb6ea782c7f47305572bf580d7be7c97c27bd6ae60cb1587197abbc0c18e5'
|
2023-11-14 01:32:15 +00:00
|
|
|
'92b3d4326d383ce9f69757081ca21fbe2e9ac704ec948a84cec13a89b4aa5f03'
|
2023-12-13 22:45:18 +00:00
|
|
|
'adb74266a57d8163fb3548647d80a7d8ab3454f07e7bb1ecb90c02bb981477e2')
|
2023-11-14 01:32:48 +00:00
|
|
|
options=('!strip') # FIXME(lukeshu): stripping hangs, idk why
|
2020-03-27 00:11:03 +00:00
|
|
|
backup=("etc/webapps/$pkgname/config.env")
|
|
|
|
|
|
|
|
package() {
|
2023-11-14 01:00:30 +00:00
|
|
|
cd "$srcdir/$_pkgname-$pkgver"
|
2020-03-27 00:11:03 +00:00
|
|
|
|
2023-11-14 01:32:15 +00:00
|
|
|
# Download dependencies
|
|
|
|
# FIXME(lukeshu): Do this earlier
|
|
|
|
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --ignore-platform-reqs --no-interaction
|
2023-11-05 21:29:02 +00:00
|
|
|
|
2023-11-14 01:32:15 +00:00
|
|
|
# The main install
|
|
|
|
mkdir -p "$pkgdir/usr/share/webapps/$pkgname"
|
|
|
|
cp -r -t "$pkgdir/usr/share/webapps/$pkgname" -- * .env.example*
|
|
|
|
|
|
|
|
# License
|
|
|
|
mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
|
|
|
|
ln -sr "$pkgdir/usr/share/webapps/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
|
|
|
|
|
|
# Config
|
|
|
|
mkdir -p "$pkgdir/etc/webapps/$pkgname"
|
|
|
|
ln -sr "$pkgdir/usr/share/webapps/$pkgname/.env.example" "$pkgdir/etc/webapps/$pkgname/config.env.example"
|
|
|
|
ln -sr "$pkgdir/usr/share/webapps/$pkgname/.env.example.complete" "$pkgdir/etc/webapps/$pkgname/config.env.example.complete"
|
|
|
|
ln -sr "$pkgdir/etc/webapps/$pkgname/config.env" "$pkgdir/usr/share/webapps/$pkgname/.env"
|
|
|
|
|
|
|
|
# Move the 3 mutable directories
|
|
|
|
# https://www.bookstackapp.com/docs/admin/filesystem-permissions/
|
|
|
|
mkdir -p "$pkgdir/var/cache"
|
|
|
|
mv -T "$pkgdir/usr/share/webapps/$pkgname/bootstrap/cache" "$pkgdir/var/cache/$pkgname"
|
|
|
|
ln -sr "$pkgdir/var/cache/$pkgname" "$pkgdir/usr/share/webapps/$pkgname/bootstrap/cache"
|
|
|
|
mkdir -p "$pkgdir/var/lib/$pkgname"
|
|
|
|
mv -T "$pkgdir/usr/share/webapps/$pkgname/storage" "$pkgdir/var/lib/$pkgname/storage"
|
|
|
|
ln -sr "$pkgdir/var/lib/$pkgname/storage" "$pkgdir/usr/share/webapps/$pkgname/storage"
|
|
|
|
mv -T "$pkgdir/usr/share/webapps/$pkgname/public/uploads" "$pkgdir/var/lib/$pkgname/uploads"
|
|
|
|
ln -sr "$pkgdir/var/lib/$pkgname/uploads" "$pkgdir/usr/share/webapps/$pkgname/public/uploads"
|
|
|
|
|
|
|
|
# Set the permissions on the config and those 3 directories
|
|
|
|
install -Dm644 "${srcdir}/sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/$pkgname.conf"
|
|
|
|
install -Dm644 "${srcdir}/tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/$pkgname.conf"
|
2020-03-27 00:11:03 +00:00
|
|
|
}
|