60 lines
1.9 KiB
Text
60 lines
1.9 KiB
Text
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
|
|
|
pkgname=wikijs
|
|
pkgver=2.5.303
|
|
pkgrel=0
|
|
pkgdesc="Wiki.js | A modern, lightweight and powerful wiki app built on Node.js"
|
|
license="AGPL-3.0"
|
|
arch="!armv7 x86_64"
|
|
options="!check" # No test suite
|
|
depends="
|
|
libcap-setcap
|
|
nodejs>=10.12.0
|
|
postgresql
|
|
python3
|
|
"
|
|
makedepends="
|
|
yarn
|
|
npm
|
|
"
|
|
url="https://github.com/Requarks/wiki"
|
|
subpackages="$pkgname-openrc"
|
|
install="$pkgname.post-install $pkgname.pre-install"
|
|
builddir="$srcdir"/wiki-$pkgver
|
|
pkgusers="wikijs"
|
|
pkggroups="wikijs"
|
|
source="
|
|
$pkgname-$pkgver.tar.gz::https://github.com/requarks/wiki/archive/refs/tags/v$pkgver.tar.gz
|
|
wikijs.initd
|
|
config.sample.yml.patch
|
|
"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
sed -i "s|\"version.*|\"version\": \"$pkgver\",|" "$builddir"/package.json
|
|
sed -i 's|"dev": true.*|"dev": "false",|' "$builddir"/package.json
|
|
}
|
|
build() {
|
|
yarn --frozen-lockfile --non-interactive
|
|
yarn build
|
|
rm -rf node_modules
|
|
yarn --production --frozen-lockfile --non-interactive
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 "$srcdir"/wikijs.initd "$pkgdir"/etc/init.d/wikijs
|
|
|
|
install -Dm644 -o 5494 -g 5494 "$builddir"/config.sample.yml "$pkgdir"/etc/wikijs/config.yml
|
|
|
|
install -Dm644 "$builddir"/package.json -t "$pkgdir"/usr/lib/bundles/wikijs
|
|
cp -aR "$builddir"/assets "$builddir"/server "$builddir"/node_modules "$pkgdir"/usr/lib/bundles/wikijs
|
|
|
|
mkdir -p "$pkgdir"/var/lib/wikijs
|
|
chown 5494:5494 "$pkgdir"/var/lib/wikijs
|
|
}
|
|
sha512sums="
|
|
a463d79ad0d8ff15dbe568b839094d697c6de0b2e991b77a4944e2a82f9789de6840e504a4673e4e0900d61596e880ca276008de86dac4f05f5823dc0427d2fc wikijs-2.5.303.tar.gz
|
|
355131ee5617348b82681cb8543c784eea59689990a268ecd3b77d44fe9abcca9c86fb8b047f0a8faeba079c650faa7790c5dd65418d313cd7561f38bb590c03 wikijs.initd
|
|
07b536c20e370d2a926038165f0e953283259c213a80a8648419565f5359ab05f528ac310e81606914013da212270df6feddb22e514cbcb2464c8274c956e4af config.sample.yml.patch
|
|
"
|