From 73b024586fd0a5a90844b4e237aeffddc598756a Mon Sep 17 00:00:00 2001 From: Thomas Liske Date: Fri, 16 Feb 2024 12:38:45 +0100 Subject: [PATCH] testing/birdwatcher: new aport --- testing/birdwatcher/APKBUILD | 37 +++++++++++++++++++++++++++ testing/birdwatcher/birdwatcher.initd | 17 ++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 testing/birdwatcher/APKBUILD create mode 100644 testing/birdwatcher/birdwatcher.initd diff --git a/testing/birdwatcher/APKBUILD b/testing/birdwatcher/APKBUILD new file mode 100644 index 00000000000..ae532a74824 --- /dev/null +++ b/testing/birdwatcher/APKBUILD @@ -0,0 +1,37 @@ +# Maintainer: Thomas Liske +pkgname=birdwatcher +pkgver=2.2.5 +pkgrel=0 +pkgdesc="A JSON API for BIRD" +url="https://github.com/alice-lg/birdwatcher" +arch="all" +license="BSD-3-Clause" +makedepends="go" +options="net" +source="birdwatcher-$pkgver.tar.gz::https://github.com/alice-lg/birdwatcher/archive/refs/tags/$pkgver.tar.gz + birdwatcher.initd + " +subpackages="$pkgname-openrc" + +export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" +export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" +export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" + +build() { + go build -o birdwatcher +} + +check() { + go test -v +} + +package() { + install -Dm755 birdwatcher "$pkgdir"/usr/bin/birdwatcher + install -Dm644 etc/birdwatcher/birdwatcher.conf "$pkgdir"/etc/birdwatcher/birdwatcher.conf + install -Dm755 "$srcdir"/birdwatcher.initd "$pkgdir"/etc/init.d/birdwatcher +} + +sha512sums=" +1e0292635b5eedb987ed0da2f077f94730039274bc194c5686246c83fbd329f59809ffb55d32fe1810fd06d69f86a648daf7facecb93aba572b6e12a1cc4440e birdwatcher-2.2.5.tar.gz +dee2578304990ce464833c099accf99219853811af86fc6cbb39886441f3f3e7104076ff8cc9d507cb348000c2db9de6223428784a36605ba63e05807cdcfec9 birdwatcher.initd +" diff --git a/testing/birdwatcher/birdwatcher.initd b/testing/birdwatcher/birdwatcher.initd new file mode 100644 index 00000000000..1c43f2ddb37 --- /dev/null +++ b/testing/birdwatcher/birdwatcher.initd @@ -0,0 +1,17 @@ +#!/sbin/openrc-run + +description="A JSON API for BIRD" +name=birdwatcher +command=/usr/bin/birdwatcher +command_background=yes +pidfile=/run/birdwatcher/birdwatcher.pid + +depend() { + need bird + use logger + after firewall +} + +start_pre() { + checkpath --directory --mode 0775 $(dirname $pidfile) +}