ayaports/user/uptime-kuma/APKBUILD

49 lines
1.6 KiB
Text

# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=uptime-kuma
pkgver=1.23.13
pkgrel=0
pkgdesc='A fancy self-hosted monitoring tool'
arch="all"
url="https://github.com/louislam/uptime-kuma"
license="MIT"
depends="nodejs"
makedepends="npm"
source="
uptime-kuma-$pkgver.tar.gz::https://github.com/louislam/uptime-kuma/archive/refs/tags/$pkgver.tar.gz
uptime-kuma.openrc
uptime-kuma.conf
"
subpackages="$pkgname-doc $pkgname-openrc"
install="$pkgname.pre-install"
build() {
npm ci
npm run build
rm -Rf "$builddir"/node_modules
npm ci --omit=dev
}
package() {
install -dm 755 \
"$pkgdir"/usr/share/webapps \
"$pkgdir"/usr/share/doc \
"$pkgdir"/usr/share/licenses/uptime-kuma \
"$pkgdir"/etc/init.d \
"$pkgdir"/etc/conf.d
# install
cp -a "$builddir" "$pkgdir/usr/share/webapps/uptime-kuma"
# openrc
install -Dm755 "$srcdir"/uptime-kuma.openrc "$pkgdir"/etc/init.d/uptime-kuma
install -Dm755 "$srcdir"/uptime-kuma.conf "$pkgdir"/etc/conf.d/uptime-kuma
# docs and licenses
mv "$pkgdir"/usr/share/webapps/uptime-kuma/LICENSE "$pkgdir"/usr/share/licenses/uptime-kuma/.
}
sha512sums="
9045cdc69d46ce34011f7866844a8d1866eee21850be6eede3226e77b9c0d3ecc0190481671f04f25da40345b29cc2d13de07bcc27e7baeff7901b4bd9c8b93f uptime-kuma-1.23.13.tar.gz
0ceddb98a6f318029b8bd8b5a49b55c883e77a5f8fffe2b9b271c9abf0ac52dc7a6ea4dbb4a881124a7857f1e43040f18755c1c2a034479e6a94d2b65a73d847 uptime-kuma.openrc
1dbae536b23e3624e139155abbff383bba3209ff2219983da2616b4376b1a5041df812d1e5164716fc6e967a8446d94baae3b96ee575d400813cc6fdc2cc274e uptime-kuma.conf
"