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