testing/apollo: new aport

This ties together a coventry phone system with a web management
front-end.
This commit is contained in:
David Sugar 2024-02-25 08:26:55 -05:00 committed by omni
parent a8dcfbafe3
commit c6d64b50e5
2 changed files with 59 additions and 0 deletions

33
testing/apollo/APKBUILD Normal file
View File

@ -0,0 +1,33 @@
# Maintainer: David Sugar <tychosoft@gmail.com>
# Contributor: David Sugar <tychosoft@gmail.com>
pkgname=apollo
pkgver=0.2.1
pkgrel=0
pkgdesc="Web management and api services for Coventry"
url="https://www.tychosoft.com/tychosoft/apollo/wiki"
arch="all"
license="GPL-3.0-or-later"
makedepends="make musl-dev go"
subpackages="$pkgname-doc $pkgname-openrc"
source="https://www.tychosoft.com/api/packages/tychosoft/generic/apollo/$pkgver/apollo-$pkgver.tar.gz apollo.initd"
build() {
make PREFIX=/usr SYSCONFDIR=/etc LOCALSTATEDIR=/var release
}
check() {
make test
}
package() {
make DESTDIR="$pkgdir" PREFIX=/usr SYSCONFDIR=/etc LOCALSTATEDIR=/var install
install -D -m 755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -Dm644 LICENSE.md "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.md
install -Dm644 README.md "$pkgdir"/usr/share/doc/$pkgname/README.md
install -Dm644 FEATURES.md "$pkgdir"/usr/share/doc/$pkgname/FEATURES.md
}
sha512sums="
86627bda730a5d0734f12de5b64ad37916c36803de61391edf8ef241a5e96859b07db7eae68890d4e98e7f5d142a55646215f8404c06bfcba7d5ba3f8f20b4d8 apollo-0.2.1.tar.gz
110cb34c47d2ea9f887b393e24393a2f3224989bc9f659983eaa7fdc678f46ca34f412018a016be331eb53a886b1ca39e8479571fb6c2a0ed6f5294c3a99c16c apollo.initd
"

View File

@ -0,0 +1,26 @@
#!/sbin/openrc-run
supervisor=supervise-daemon
name=apollo
command="/usr/sbin/apollo"
pidfile="/run/apollo.pid"
extra_started_commands="reload"
depend() {
use logger dns
need net
after coventry
}
stop() {
ebegin "Stopping ${RC_SVCNAME}"
start-stop-daemon --signal INT --pidfile "${pidfile}"
eend $? "Failed to stop ${RC_SVCNAME}"
}
reload() {
ebegin "Reloading ${RC_SVCNAME}"
start-stop-daemon --signal HUP --pidfile "${pidfile}"
eend $?
}