diff options
-rw-r--r-- | testing/icecast/APKBUILD | 16 | ||||
-rw-r--r-- | testing/icecast/conf-change-owner.patch | 16 | ||||
-rw-r--r-- | testing/icecast/icecast.initd | 6 | ||||
-rw-r--r-- | testing/icecast/icecast.pre-install | 5 |
4 files changed, 39 insertions, 4 deletions
diff --git a/testing/icecast/APKBUILD b/testing/icecast/APKBUILD index 73135371a3..0e7c70e7d9 100644 --- a/testing/icecast/APKBUILD +++ b/testing/icecast/APKBUILD @@ -2,20 +2,30 @@ # Maintainer: pkgname=icecast pkgver=2.3.2 -pkgrel=0 +pkgrel=1 pkgdesc="Open source media server" url="http://www.icecast.org" license="GPL" depends= +install="$pkgname.pre-install" +pkgusers="icecast" +pkggroups="icecast" makedepends="libxslt-dev libxml2-dev libogg-dev libvorbis-dev libtheora-dev" subpackages="$pkgname-doc" source="http://downloads.xiph.org/releases/$pkgname/$pkgname-$pkgver.tar.gz + conf-change-owner.patch icecast.initd" +prepare() { + cd "$srcdir"/$pkgname-$pkgver + patch -p1 -i "$srcdir"/conf-change-owner.patch +} + build() { cd "$srcdir"/$pkgname-$pkgver ./configure --prefix=/usr \ + --localstatedir=/var \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info @@ -26,7 +36,9 @@ package() { cd "$srcdir"/$pkgname-$pkgver make DESTDIR="$pkgdir" install install -D -m755 ../icecast.initd "$pkgdir"/etc/init.d/icecast + install -d -D -o icecast -g icecast "$pkgdir"/var/log/icecast } md5sums="ff516b3ccd2bcc31e68f460cd316093f icecast-2.3.2.tar.gz -b6f2fc5eaada6e9389784ccf43f68684 icecast.initd" +d65fe756a3811e21fd8327ec599206c8 conf-change-owner.patch +0dc8432dbd5cba6a5ace22028adfe287 icecast.initd" diff --git a/testing/icecast/conf-change-owner.patch b/testing/icecast/conf-change-owner.patch new file mode 100644 index 0000000000..5c87c1f0d0 --- /dev/null +++ b/testing/icecast/conf-change-owner.patch @@ -0,0 +1,16 @@ +--- icecast-2.3.2/conf/icecast.xml.in.orig ++++ icecast-2.3.2/conf/icecast.xml.in +@@ -164,11 +164,9 @@ + + <security> + <chroot>0</chroot> +- <!-- + <changeowner> +- <user>nobody</user> +- <group>nogroup</group> ++ <user>icecast</user> ++ <group>icecast</group> + </changeowner> +- --> + </security> + </icecast> diff --git a/testing/icecast/icecast.initd b/testing/icecast/icecast.initd index b82e5cddf6..fbfc6a8432 100644 --- a/testing/icecast/icecast.initd +++ b/testing/icecast/icecast.initd @@ -7,12 +7,14 @@ depend() { start() { ebegin "Starting Icecast 2" - start-stop-daemon --background --start --make-pidfile --pidfile /var/run/icecast.pid --exec /usr/bin/icecast -- -c /etc/icecast.xml + start-stop-daemon --start --exec /usr/bin/icecast \ + -- \ + -b -c ${icecast_conf:-/etc/icecast.xml} > /dev/null eend $? } stop() { ebegin "Stopping Icecast 2" - start-stop-daemon --stop --pidfile /var/run/icecast.pid --name icecast + start-stop-daemon --stop --exec /usr/bin/icecast eend $? } diff --git a/testing/icecast/icecast.pre-install b/testing/icecast/icecast.pre-install new file mode 100644 index 0000000000..7149ba7232 --- /dev/null +++ b/testing/icecast/icecast.pre-install @@ -0,0 +1,5 @@ +#!/bin/sh + +adduser -h /var/log/icecast -s /bin/false -D icecast 2>/dev/null + +exit 0 |