add bookstack
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
nyyu 2022-12-31 10:09:44 +01:00
parent 004dedbb15
commit 66b80a9316
4 changed files with 78 additions and 0 deletions

18
bookstack/.SRCINFO Normal file
View File

@ -0,0 +1,18 @@
pkgbase = bookstack
pkgdesc = A simple, self-hosted, easy-to-use platform for organising and storing information
pkgver = 22.11.1
pkgrel = 1
url = https://github.com/BookStackApp/BookStack
install = bookstack.install
arch = any
license = MIT
makedepends = composer
depends = php
depends = php-gd
depends = php-fpm
options = !strip
backup = etc/webapps/bookstack/config.env
source = bookstack-22.11.1.tar.gz::https://github.com/BookStackApp/BookStack/archive/v22.11.1.tar.gz
sha256sums = b5110588684e8a0fdcca5bb08d7ae0558a73a2a3bf8abbbad2b947e6d2f3bc4c
pkgname = bookstack

5
bookstack/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
*
!PKGBUILD
!.SRCINFO
!.gitignore
!bookstack.install

50
bookstack/PKGBUILD Normal file
View File

@ -0,0 +1,50 @@
# Maintainer: Martin Rys <rys.pw/contact>
pkgname=bookstack
_camelname=BookStack
pkgver=22.11.1
pkgrel=1
pkgdesc='A simple, self-hosted, easy-to-use platform for organising and storing information'
arch=('any')
url="https://github.com/BookStackApp/BookStack"
license=('MIT')
depends=(
'php'
'php-gd'
'php-fpm'
)
makedepends=('composer')
source=("$pkgname-$pkgver.tar.gz::https://github.com/BookStackApp/BookStack/archive/v${pkgver}.tar.gz")
sha256sums=('b5110588684e8a0fdcca5bb08d7ae0558a73a2a3bf8abbbad2b947e6d2f3bc4c')
options=('!strip')
backup=("etc/webapps/$pkgname/config.env")
install=bookstack.install
build() {
cd "$srcdir/$_camelname-$pkgver"
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --ignore-platform-reqs --no-interaction --optimize-autoloader
}
package() {
cd "$srcdir/$_camelname-$pkgver"
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"
cp .env.example "$pkgdir/etc/webapps/$pkgname/config.env"
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 http:http "$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/$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"
}

View File

@ -0,0 +1,5 @@
post_upgrade() {
echo "You should run 'sudo -u http /usr/share/webapps/bookstack/artisan migrate' to upgrade database"
}