]> git.sev.monster Git - aports.git/blame - testing/uptime-kuma/APKBUILD
uptime-kuma: fix initd, split openrc package
[aports.git] / testing / uptime-kuma / APKBUILD
CommitLineData
7503506a 1# Contributor: sev <alpine@sev.monster>
2# Maintainer: sev <alpine@sev.monster>
3pkgname=uptime-kuma
4pkgver=1.16.1
91d09f94 5pkgrel=3
7503506a 6pkgdesc="A fancy self-hosted monitoring tool"
7url="https://uptime.kuma.pet"
8arch="x86_64"
9license="MIT"
91d09f94 10depends="py3-apprise"
11depends_openrc="nodejs>=14"
7503506a 12makedepends="npm git"
13install="$pkgname.post-install"
91d09f94 14subpackages="$pkgname-openrc:openrc"
7503506a 15source="https://github.com/louislam/$pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz
16 $pkgname.initd
17 $pkgname.confd"
18builddir="$srcdir/$pkgname-$pkgver"
19
20prepare() {
21 default_prepare
22 npm ci
23}
24
25build() {
26 npm run build
27}
28
29check() {
30 npm test
31}
32
33package() {
34 npm prune --omit=dev
35 sharedir="$pkgdir/usr/share/$pkgname"
36 mkdir -pm755 "$sharedir"/src
37 cp -dR server db node_modules dist "$sharedir"
38 install -Dm755 src/util.js "$sharedir"/src
39 install -Dm755 extra/remove-2fa.js extra/reset-password.js \
40 extra/healthcheck.js "$sharedir"/extra
91d09f94 41}
42openrc() {
43 pkgdesc="NodeJS server for $pkgname"
7503506a 44 install -Dm755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
45 install -Dm755 "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname"
46}
91d09f94 47
7503506a 48sha512sums="
7503506a 49"
This page took 0.055402 seconds and 4 git commands to generate.