]>
Commit | Line | Data |
---|---|---|
30f6cf88 | 1 | # Contributor: sev <alpine@sev.monster> |
2 | # Maintainer: sev <alpine@sev.monster> | |
3 | pkgname=uptime-kuma | |
4 | pkgver=1.16.1 | |
107c93dd | 5 | pkgrel=3 |
30f6cf88 | 6 | pkgdesc="A fancy self-hosted monitoring tool" |
7 | url="https://uptime.kuma.pet" | |
8 | arch="x86_64" | |
9 | license="MIT" | |
107c93dd | 10 | depends="py3-apprise" |
11 | depends_openrc="nodejs>=14" | |
30f6cf88 | 12 | makedepends="npm git" |
13 | install="$pkgname.post-install" | |
107c93dd | 14 | subpackages="$pkgname-openrc:openrc" |
30f6cf88 | 15 | source="https://github.com/louislam/$pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz |
16 | $pkgname.initd | |
17 | $pkgname.confd" | |
18 | builddir="$srcdir/$pkgname-$pkgver" | |
19 | ||
20 | prepare() { | |
21 | default_prepare | |
22 | npm ci | |
23 | } | |
24 | ||
25 | build() { | |
26 | npm run build | |
27 | } | |
28 | ||
29 | check() { | |
30 | npm test | |
31 | } | |
32 | ||
33 | package() { | |
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 | |
107c93dd | 41 | } |
42 | openrc() { | |
43 | pkgdesc="NodeJS server for $pkgname" | |
30f6cf88 | 44 | install -Dm755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname" |
45 | install -Dm755 "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname" | |
46 | } | |
107c93dd | 47 | |
30f6cf88 | 48 | sha512sums=" |
30f6cf88 | 49 | " |