]>
Commit | Line | Data |
---|---|---|
30f6cf88 | 1 | # Contributor: sev <alpine@sev.monster> |
2 | # Maintainer: sev <alpine@sev.monster> | |
3 | pkgname=uptime-kuma | |
f2ba549e | 4 | pkgver=1.19.0 |
5d5588bf | 5 | pkgrel=0 |
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" | |
f2ba549e | 14 | subpackages="$pkgname-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" | |
5d5588bf | 36 | mkdir -pm755 "$sharedir" |
30f6cf88 | 37 | cp -dR server db node_modules dist "$sharedir" |
5d5588bf | 38 | install -Dm755 -t"$sharedir"/src src/util.js |
39 | install -Dm755 -t"$sharedir"/extra extra/remove-2fa.js \ | |
40 | extra/reset-password.js extra/healthcheck.js | |
f2ba549e | 41 | install -Dm755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname" |
42 | install -Dm755 "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname" | |
107c93dd | 43 | } |
44 | openrc() { | |
45 | pkgdesc="NodeJS server for $pkgname" | |
f2ba549e | 46 | default_openrc |
30f6cf88 | 47 | } |
107c93dd | 48 | |
30f6cf88 | 49 | sha512sums=" |
f2ba549e | 50 | cc05e7d74c63c8bfdb9dd24bcfb1e2759af116d119f8f3bcbc3b8b752dd642f70e68d2d91efa9f1043e7c28cf69b1769830eb1c063b6d18cfc2cd35866725008 uptime-kuma-1.19.0.tar.gz |
5d5588bf | 51 | 8ca2a3e455a3c156385d7e8de037c458045dec75383511ac48341f6f34d9fe6be5e677c238136bde0f83b90c71f10cdd4fb9fa0a9a59982214ddf6c160e7bedd uptime-kuma.initd |
52 | 59a5760ccc530428d28b71df46fad79869c1e9c628ed9c173e996768d1d8079bbc7feaea85b5d43fd45caf5a41b03a193b88e4d82ac7e1add6a7a2ff14ec8b9c uptime-kuma.confd | |
30f6cf88 | 53 | " |