aboutsummaryrefslogtreecommitdiffstats
path: root/community/darkice
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-03-27 13:46:11 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-03-27 21:27:33 +0000
commitdcceafedf3726a7d6379d0c6b199439a4fe45bee (patch)
treef740174f7cc61af5469434273eb24a4696d4dac7 /community/darkice
parent79efe41c443a38440fe77b0ad982118bbc91986e (diff)
downloadaports-dcceafedf3726a7d6379d0c6b199439a4fe45bee.tar.bz2
aports-dcceafedf3726a7d6379d0c6b199439a4fe45bee.tar.xz
community/darkice: move from main
Diffstat (limited to 'community/darkice')
-rw-r--r--community/darkice/APKBUILD42
-rw-r--r--community/darkice/darkice.confd2
-rwxr-xr-xcommunity/darkice/darkice.initd20
3 files changed, 64 insertions, 0 deletions
diff --git a/community/darkice/APKBUILD b/community/darkice/APKBUILD
new file mode 100644
index 0000000000..3a3a444e07
--- /dev/null
+++ b/community/darkice/APKBUILD
@@ -0,0 +1,42 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=darkice
+pkgver=1.3
+pkgrel=0
+pkgdesc="Live audio streamer. Records audio from an audio interface, encodes it and sends it to a streaming server"
+url="http://www.darkice.org/"
+arch="all"
+license="GPL-3.0"
+depends=
+makedepends="alsa-lib-dev faac-dev lame-dev libvorbis-dev"
+install=""
+subpackages="$pkgname-doc"
+source="https://sourceforge.net/projects/$pkgname/files/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz
+ darkice.initd
+ darkice.confd"
+
+builddir=$srcdir/$pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+ CPPFLAGS="$CPPFLAGS -fpermissive" \
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc/darkice \
+ --without-aacplus \
+ --without-twolame
+ make
+}
+package() {
+ mkdir -p "$pkgdir"/etc/$pkgname
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+}
+
+sha512sums="710dde580005e999e9b11981affdefab6c01868710e9de29d93fb0f40db3321dfe3ab6ed2dc1887bb22ac9a0789fe1648d948f4453c92feb312f7af97c253674 darkice-1.3.tar.gz
+743f4e24bf4bfa57a46f643dc000cd40f24e382e50c657bb6bb2a13492e337bbec5b1c03e0824046e30725737bdf81ce838bc61cd4b3b383b013e6bcad9475c6 darkice.initd
+9491c3d0ff34750a60cec93eeaa7442714209fdb085e4d4d47a15b991850c861f0003d446d1a3205b452c9badc68b34beafd6c37798a3744098a3665f7f34f34 darkice.confd"
diff --git a/community/darkice/darkice.confd b/community/darkice/darkice.confd
new file mode 100644
index 0000000000..1a610d0f4e
--- /dev/null
+++ b/community/darkice/darkice.confd
@@ -0,0 +1,2 @@
+DARKICE_OPTS="-c /etc/darkice/darkice.cfg"
+DARKICE_BIN="/usr/bin/darkice"
diff --git a/community/darkice/darkice.initd b/community/darkice/darkice.initd
new file mode 100755
index 0000000000..4d7b728e82
--- /dev/null
+++ b/community/darkice/darkice.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+
+depend() {
+ need net icecast
+ after firewall
+}
+
+start() {
+ ebegin "Starting DarkIce"
+ start-stop-daemon --start --quiet --background \
+ --exec ${DARKICE_BIN} -- ${DARKICE_OPTS}
+ eend $?
+}
+
+
+stop() {
+ ebegin "Stopping DarkIce"
+ start-stop-daemon --stop --exec $DARKICE_BIN
+ eend $?
+}