# Contributor: Alex McGrath # Maintainer: Alex McGrath pkgname=ntfy pkgver=2.6.2 pkgrel=0 pkgdesc="A simple HTTP-based pub-sub notification service" url="https://ntfy.sh/" # riscv64: fails to build arch="all !riscv64" license="GPL-2.0-only AND Apache-2.0" subpackages="$pkgname-openrc" makedepends="go nodejs npm mkdocs mkdocs-material sqlite-dev" install="$pkgname.pre-install" source="$pkgname-$pkgver.tar.gz::https://github.com/binwiederhier/ntfy/archive/refs/tags/v$pkgver.tar.gz ntfy.initd ntfy.confd " # random network errors options="net !check" export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" build() { make web mkdir -p dist/ntfy_linux_server server/docs touch server/docs/index.html server/site/app.html CGO_ENABLED=1 go build \ -o dist/ntfy_linux_server/ntfy \ -tags sqlite_omit_load_extension,osusergo,netgo,libsqlite3 \ -ldflags \ "-linkmode=external -extldflags '$LDFLAGS' -X main.version=$pkgver -X main.commit=release -X main.date=alpine-package" } check() { make test } package() { install -m755 -D "$srcdir"/$pkgname.initd \ "$pkgdir"/etc/init.d/$pkgname install -m644 -D "$srcdir"/$pkgname.confd \ "$pkgdir"/etc/conf.d/$pkgname install -Dm755 "$builddir"/dist/"$pkgname"_linux_server/"$pkgname" \ "$pkgdir"/usr/bin/"$pkgname" } sha512sums=" 6653d94caf882988f343369ca8eb8bb17d24c2e0cdd8feb10d38c0383b19eabcd498527a7203dffaa8159c72c6ef7fd55dfb6586bdbee62c940e336f4c3dd0b2 ntfy-2.6.2.tar.gz 5de3242dded5b9f47ee23063ba43e02f5ffc7cd17cee6953c0bb24609d7030a2a2dd7c386f07416e6dbe68698232c7096ff9407f7d3ebedc00a7207f6796f7d9 ntfy.initd 0e016b9f62ba3b0c555757abeb8152e7fb77825ff6451bda820173750fa3ddd449fbc1330ddd7d77db98cff39dc6ab897bc046004469688bf7289be8049890a9 ntfy.confd "