From 368ea8be3d8a3d29e618baba3cde1c2a11362812 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Sat, 31 Aug 2013 12:16:03 +0200 Subject: [PATCH] icecast: New package. --- icecast/icecast.nm | 118 ++++++++++++++++++++++ icecast/icecast.tmpfiles | 1 + icecast/icecast.xml | 172 ++++++++++++++++++++++++++++++++ icecast/status3.xsl | 12 +++ icecast/systemd/icecast.service | 10 ++ 5 files changed, 313 insertions(+) create mode 100644 icecast/icecast.nm create mode 100644 icecast/icecast.tmpfiles create mode 100644 icecast/icecast.xml create mode 100644 icecast/status3.xsl create mode 100644 icecast/systemd/icecast.service diff --git a/icecast/icecast.nm b/icecast/icecast.nm new file mode 100644 index 000000000..0eda30e4b --- /dev/null +++ b/icecast/icecast.nm @@ -0,0 +1,118 @@ +############################################################################### +# IPFire.org - An Open Source Firewall Solution # +# Copyright (C) - IPFire Development Team # +############################################################################### + +name = icecast +version = 2.3.3 +release = 1 + +groups = Network/Daemons +url = http://www.icecast.org +license = GPLv2 +summary = A ShoutCast compatible streaming media server. + +description + Icecast is a streaming media server which currently supports Ogg Vorbis + and MP3 audio streams. It can be used to create an Internet radio + station or a privately running jukebox and many things in between. +end + +source_dl = http://downloads.xiph.org/releases/%{name} + +build + requires + curl-devel + libogg-devel + libvorbis-devel + libxml2-devel + libxslt-devel + openssl-devel + zlib-devel + end + + configure_options += \ + --disable-static \ + --with-curl \ + --with-openssl \ + --with-ogg + + prepare_cmds + # Create minidlna user and group. + %{create_user} + + # Fix icecast version on manpage. + sed -i -e 's/icecast2/icecast/g' debian/icecast2.1 + end + + install_cmds + # Create missing folder. + mkdir -pv %{BUILDROOT}/run/%{name} + mkdir -pv %{BUILDROOT}%{localstatedir}/log/%{name} + + # Install manpage. + install -D -m 644 debian/icecast2.1 %{BUILDROOT}%{mandir}/man1/icecast.1 + + # Install icecast xsl file. + install -D -m 644 %{DIR_SOURCE}/status3.xsl \ + %{BUILDROOT}%{datadir}/%{name}/web/status3.xsl + + # Install icecast config file. + install -D -m640 %{DIR_SOURCE}/icecast.xml \ + %{BUILDROOT}%{sysconfdir}/icecast.xml + + # Fix ownerships. + chown -Rv icecast.icecast %{BUILDROOT}%{localstatedir}/log/%{name} + chown -Rv icecast.icecast %{BUILDROOT}%{datadir}/%{name} + end +end + +create_user + getent group icecast >/dev/null || groupadd -r icecast + getent passwd icecast >/dev/null || \ + useradd -r -g icecast -d %{datadir}/icecast -s /sbin/nologin \ + -c "icecast user account" icecast +end + +packages + package %{name} + prerequires + shadow-utils + systemd-units + end + + configfiles + %{sysconfdir}/icecast.xml + end + + datafiles + %{localstatedir}/log/%{name} + end + + script prein + %{create_user} + end + + script postin + systemctl daemon-reload >/dev/null 2>&1 || : + end + + script preun + systemctl --no-reload disable icecast.service >/dev/null 2>&1 || : + systemctl stop icecast.service >/dev/null 2>&1 || : + end + + script postun + systemctl daemon-reload >/dev/null 2>&1 || : + end + + script postup + systemctl daemon-reload >/dev/null 2>&1 || : + systemctl try-restart icecast.service >/dev/null 2>&1 || : + end + end + + package %{name}-debuginfo + template DEBUGINFO + end +end diff --git a/icecast/icecast.tmpfiles b/icecast/icecast.tmpfiles new file mode 100644 index 000000000..43bb6ed8a --- /dev/null +++ b/icecast/icecast.tmpfiles @@ -0,0 +1 @@ +d /run/icecast 755 icecast icecast diff --git a/icecast/icecast.xml b/icecast/icecast.xml new file mode 100644 index 000000000..e8b7faccd --- /dev/null +++ b/icecast/icecast.xml @@ -0,0 +1,172 @@ + + + 100 + 2 + 5 + 524288 + 30 + 15 + 10 + + 1 + + 65535 + + + + + hackme + + hackme + + + admin + hackme + + + + + + + + + localhost + + + + 8000 + 127.0.0.1 + + + + + + + + + + + + + + + + + 1 + + + + /usr/share/icecast + + + /var/log/icecast + /usr/share/icecast/web + /usr/share/icecast/admin + /var/run/icecast/icecast.pid + + + + + + + + + access.log + error.log + + 3 + 10000 + + + + + + 0 + + icecast + icecast + + + diff --git a/icecast/status3.xsl b/icecast/status3.xsl new file mode 100644 index 000000000..aac0d8d97 --- /dev/null +++ b/icecast/status3.xsl @@ -0,0 +1,12 @@ + + + +
+MountPoint,Connections,Stream Name,Current Listeners,Description,Currently Playing,Stream URL 
+Global,Client: Source: ##
+
+#######
+
+
+
+
diff --git a/icecast/systemd/icecast.service b/icecast/systemd/icecast.service new file mode 100644 index 000000000..de7407a1d --- /dev/null +++ b/icecast/systemd/icecast.service @@ -0,0 +1,10 @@ +[Unit] +Description=Icecast Network Audio Streaming Server +After=network.target + +[Service] +ExecStart=/usr/bin/icecast -c /etc/icecast.xml +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target -- 2.47.3