[csw-devel] SF.net SVN: gar:[18504] csw/mgar/pkg/icecast/trunk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Fri Jun 22 14:56:24 CEST 2012


Revision: 18504
          http://gar.svn.sourceforge.net/gar/?rev=18504&view=rev
Author:   dmichelsen
Date:     2012-06-22 12:56:24 +0000 (Fri, 22 Jun 2012)
Log Message:
-----------
icecast/trunk: Update to 2.3.3, still open issues

Modified Paths:
--------------
    csw/mgar/pkg/icecast/trunk/Makefile
    csw/mgar/pkg/icecast/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/icecast/trunk/files/cswicecast
    csw/mgar/pkg/icecast/trunk/files/icecast.xml

Modified: csw/mgar/pkg/icecast/trunk/Makefile
===================================================================
--- csw/mgar/pkg/icecast/trunk/Makefile	2012-06-22 12:11:11 UTC (rev 18503)
+++ csw/mgar/pkg/icecast/trunk/Makefile	2012-06-22 12:56:24 UTC (rev 18504)
@@ -1,31 +1,67 @@
+# TBD:
+# - SMF manifest missing
+# - user and group for icecast server, make config in icecast.xml
+
 NAME = icecast
-VERSION = 2.3.2
+VERSION = 2.3.3
 CATEGORIES = apps
-GARTYPE = v2
 
 DESCRIPTION = A free server software for streaming multimedia
 define BLURB
 endef
 
 MASTER_SITES = http://downloads.xiph.org/releases/icecast/
-DISTFILES  = $(NAME)-$(VERSION).tar.gz
+DISTFILES += $(NAME)-$(VERSION).tar.gz
 
-# We define upstream file regex so we can be notifed of new upstream software release
-UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.gz
+VENDOR_URL = http://www.icecast.org/
 
-SPKG_SOURCEURL = http://www.icecast.org/
+PACKAGING_PLATFORMS = solaris10-sparc solaris10-i386
 
-RUNTIME_DEP_PKGS = CSWlibogg CSWosslrt CSWtheora CSWvorbis CSWzlib
-RUNTIME_DEP_PKGS += CSWcurlrt CSWlibidn CSWoldaprt CSWspeex
-RUNTIME_DEP_PKGS += CSWiconv CSWlibnet CSWlibxml2 CSWlibxslt CSWsasl
+PACKAGES += CSWicecast
+SPKG_DESC_CSWicecast = A free server software for streaming multimedia
+# PKGFILES is catchall
+RUNTIME_DEP_PKGS_CSWicecast += CSWlibiconv2
+RUNTIME_DEP_PKGS_CSWicecast += CSWlibssl1-0-0
+RUNTIME_DEP_PKGS_CSWicecast += CSWlibz1
+RUNTIME_DEP_PKGS_CSWicecast += CSWlibogg0
+RUNTIME_DEP_PKGS_CSWicecast += CSWlibcurl4
+RUNTIME_DEP_PKGS_CSWicecast += CSWlibidn11
+RUNTIME_DEP_PKGS_CSWicecast += CSWlibvorbis0
+RUNTIME_DEP_PKGS_CSWicecast += CSWlibxslt1
+RUNTIME_DEP_PKGS_CSWicecast += CSWlibxml2-2
+RUNTIME_DEP_PKGS_CSWicecast += CSWliboggkate1
+RUNTIME_DEP_PKGS_CSWicecast += CSWlibtheora0
+RUNTIME_DEP_PKGS_CSWicecast += CSWlibspeex1
+RUNTIME_DEP_PKGS_CSWicecast += CSWlibkate1
 
-BUILD_DEP_PKGS = $(RUNTIME_DEP_PKGS)
 
-sysconfdir = /etc/opt/csw
-localstatedir = /var/opt/csw
+# These are just docs, override for now
+CHECKPKG_OVERRIDES_CSWicecast += file-with-bad-content|/usr/local|root/opt/csw/share/doc/icecast/index.html
+CHECKPKG_OVERRIDES_CSWicecast += file-with-bad-content|/usr/local|root/opt/csw/share/doc/icecast/README
+
+REINPLACEMENTS += cfglogs
+REINPLACE_MATCH_cfglogs = /usr/local/icecast/logs
+REINPLACE_WITH_cfglogs = $(localstatedir)/log/icecast
+REINPLACE_FILES_cfglogs += src/cfgfile.c
+
+REINPLACEMENTS += cfgadmin
+REINPLACE_MATCH_cfgadmin = /usr/local/icecast/admin
+REINPLACE_WITH_cfgadmin = $(sharedstatedir)/icecast/admin
+REINPLACE_FILES_cfgadmin += src/cfgfile.c
+
+REINPLACEMENTS += cfgweb
+REINPLACE_MATCH_cfgweb = /usr/local/icecast/webroot
+REINPLACE_WITH_cfgweb = $(sharedstatedir)/icecast/web
+REINPLACE_FILES_cfgweb += src/cfgfile.c
+
+REINPLACEMENTS += cfg
+REINPLACE_MATCH_cfg = /usr/local/icecast
+REINPLACE_WITH_cfg = $(sharedstatedir)/icecast
+REINPLACE_FILES_cfg += src/cfgfile.c
+
 PRESERVECONF = $(sysconfdir)/icecast.xml
 
-CONFIGURE_ARGS = $(DIRPATHS)
+# CSWicecast_usergroup = icecast:icecast:Icecast Server:/var/opt/csw/log/icecast:
 
 include gar/category.mk
 

Modified: csw/mgar/pkg/icecast/trunk/checksums
===================================================================
--- csw/mgar/pkg/icecast/trunk/checksums	2012-06-22 12:11:11 UTC (rev 18503)
+++ csw/mgar/pkg/icecast/trunk/checksums	2012-06-22 12:56:24 UTC (rev 18504)
@@ -1 +1 @@
-ff516b3ccd2bcc31e68f460cd316093f  icecast-2.3.2.tar.gz
+2b5d1b40778922e5f6431b7758c359ad  icecast-2.3.3.tar.gz

Added: csw/mgar/pkg/icecast/trunk/files/cswicecast
===================================================================
--- csw/mgar/pkg/icecast/trunk/files/cswicecast	                        (rev 0)
+++ csw/mgar/pkg/icecast/trunk/files/cswicecast	2012-06-22 12:56:24 UTC (rev 18504)
@@ -0,0 +1,172 @@
+#!/bin/sh
+#
+# SMF Method file for icecast
+#
+
+ICECAST=/opt/csw/bin/icecast
+CFGFILE=/etc/opt/csw/icecast.xml
+VARRUNX=/var/run
+PIDFILE=${VARRUNX}/icecast.pid
+PIDFILO=${VARRUNX}/icecast.pid.oldbin
+
+[ ! -f ${ICECAST} ] && exit 255
+[ ! -f ${CFGFILE} ] && exit 254
+
+RETVAL=0
+
+start() {
+	$ICECAST -c $CFGFILE -b
+	RETVAL=$?
+	return $RETVAL
+}
+
+stop() {
+	killpidf -TERM $PIDFILO
+	killpidf -TERM
+}
+
+check() {
+	MSG=`$ICECAST -t 2>&1`
+	RETVAL=$?
+	[ $RETVAL -ne 0 ] && echo $MSG
+	return $RETVAL
+}
+
+killpidf() {
+	if [ "$2" != "" ]; then
+		PIDF=$2
+	else
+		PIDF=$PIDFILE
+	fi
+	if [ -s "$PIDF" ]; then
+		/bin/kill $1 `/usr/bin/cat $PIDF`
+		RETVAL=$?
+	else
+		RETVAL=1
+	fi
+	return $RETVAL
+}
+
+reload() {
+	killpidf -HUP
+	return $RETVAL
+}
+
+restart() {
+	stop
+	start
+	return $RETVAL
+}
+
+rotate() {
+	killpidf -USR1
+	return $RETVAL
+}
+
+status() {
+	if [ -s "$PIDFILE" ]; then
+		FPID=`/bin/cat $PIDFILE`
+	else
+		echo "not running"
+		RETVAL=1
+		return $RETVAL
+	fi
+	PIDP=`/bin/ps -o pid= -p $FPID`
+	if [ "$PIDP" = "" ]; then
+		echo "not running"
+		RETVAL=1
+		return $RETVAL
+	fi
+	COMM=`/bin/ps -o comm= -p $FPID`
+	if [ "$ICECAST" = "$COMM" ]; then
+		echo "running"
+		RETVAL=0
+		return $RETVAL
+	else
+		echo "running, but it is not a CSW package"
+		RETVAL=1
+		return $RETVAL
+	fi
+}
+
+upgrade()
+{
+	killpidf -USR2
+	[ $RETVAL -ne 0 ] && return $RETVAL
+	OLDBINPID=0
+	for i in 1 2 3 4 5; do
+		if [ -f $PIDFILO ]; then
+			 OLDBINPID=1
+			 break
+		else
+			 sleep 1
+		fi
+	done
+	if [ $OLDBINPID -eq 1 ]; then
+		status >/dev/null
+		if [ $RETVAL -eq 0 ]; then
+			 killpidf -WINCH $PIDFILO
+		fi
+	else
+		RETVAL=1
+	fi
+	return $RETVAL
+}
+
+upgrade_commit()
+{
+	killpidf -QUIT $PIDFILO
+	return $RETVAL
+}
+
+upgrade_rollback()
+{
+	killpidf -HUP $PIDFILO
+	if [ $RETVAL -eq 0 ]; then
+		killpidf -QUIT $PIDFILE
+	fi
+	return $RETVAL
+}
+
+
+case "$1" in
+start)
+	[ ! -d $VARRUNX ] && /bin/mkdir -p $VARRUNX ||:
+	check
+	[ $RETVAL -eq 0 ] && start ||:
+	;;
+stop)
+	stop
+	;;
+refresh|reload)
+	check
+	[ $RETVAL -eq 0 ] && reload ||:
+	;;
+restart)
+	check
+	[ $RETVAL -eq 0 ] && restart ||:
+	;;
+rotate)
+	rotate
+	;;
+status)
+	status
+	;;
+upgrade)
+	check
+	[ $RETVAL -eq 0 ] && upgrade ||:
+	;;
+upgrade-commit)
+	upgrade_commit
+	;;
+upgrade-rollback)
+	upgrade_rollback
+	;;
+*)
+	echo "Usage:" `basename $0` "{start|stop|refresh|reload|restart|rotate|status|upgrade|upgrade-commit|upgrade-rollback}"
+	exit 1
+	;;
+esac
+
+exit $RETVAL
+

Added: csw/mgar/pkg/icecast/trunk/files/icecast.xml
===================================================================
--- csw/mgar/pkg/icecast/trunk/files/icecast.xml	                        (rev 0)
+++ csw/mgar/pkg/icecast/trunk/files/icecast.xml	2012-06-22 12:56:24 UTC (rev 18504)
@@ -0,0 +1,172 @@
+<icecast>
+    <limits>
+        <clients>100</clients>
+        <sources>2</sources>
+        <threadpool>5</threadpool>
+        <queue-size>524288</queue-size>
+        <client-timeout>30</client-timeout>
+        <header-timeout>15</header-timeout>
+        <source-timeout>10</source-timeout>
+        <!-- If enabled, this will provide a burst of data when a client 
+             first connects, thereby significantly reducing the startup 
+             time for listeners that do substantial buffering. However,
+             it also significantly increases latency between the source
+             client and listening client.  For low-latency setups, you
+             might want to disable this. -->
+        <burst-on-connect>1</burst-on-connect>
+        <!-- same as burst-on-connect, but this allows for being more
+             specific on how much to burst. Most people won't need to
+             change from the default 64k. Applies to all mountpoints  -->
+        <burst-size>65535</burst-size>
+    </limits>
+
+    <authentication>
+        <!-- Sources log in with username 'source' -->
+        <source-password>hackme</source-password>
+        <!-- Relays log in username 'relay' -->
+        <relay-password>hackme</relay-password>
+
+        <!-- Admin logs in with the username given below -->
+        <admin-user>admin</admin-user>
+        <admin-password>hackme</admin-password>
+    </authentication>
+
+    <!-- set the mountpoint for a shoutcast source to use, the default if not
+         specified is /stream but you can change it here if an alternative is
+         wanted or an extension is required
+    <shoutcast-mount>/live.nsv</shoutcast-mount>
+    -->
+
+    <!-- Uncomment this if you want directory listings -->
+    <!--
+    <directory>
+        <yp-url-timeout>15</yp-url-timeout>
+        <yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
+    </directory>
+     -->
+
+    <!-- This is the hostname other people will use to connect to your server.
+    It affects mainly the urls generated by Icecast for playlists and yp
+    listings. -->
+    <hostname>localhost</hostname>
+
+    <!-- You may have multiple <listener> elements -->
+    <listen-socket>
+        <port>8000</port>
+        <!-- <bind-address>127.0.0.1</bind-address> -->
+        <!-- <shoutcast-mount>/stream</shoutcast-mount> -->
+    </listen-socket>
+    <!--
+    <listen-socket>
+        <port>8001</port>
+    </listen-socket>
+    -->
+
+    <!--<master-server>127.0.0.1</master-server>-->
+    <!--<master-server-port>8001</master-server-port>-->
+    <!--<master-update-interval>120</master-update-interval>-->
+    <!--<master-password>hackme</master-password>-->
+
+    <!-- setting this makes all relays on-demand unless overridden, this is
+         useful for master relays which do not have <relay> definitions here.
+         The default is 0 -->
+    <!--<relays-on-demand>1</relays-on-demand>-->
+
+    <!--
+    <relay>
+        <server>127.0.0.1</server>
+        <port>8001</port>
+        <mount>/example.ogg</mount>
+        <local-mount>/different.ogg</local-mount>
+        <on-demand>0</on-demand>
+
+        <relay-shoutcast-metadata>0</relay-shoutcast-metadata>
+    </relay>
+    -->
+
+    <!-- Only define a <mount> section if you want to use advanced options,
+         like alternative usernames or passwords
+    <mount>
+        <mount-name>/example-complex.ogg</mount-name>
+
+        <username>othersource</username>
+        <password>hackmemore</password>
+
+        <max-listeners>1</max-listeners>
+        <dump-file>/tmp/dump-example1.ogg</dump-file>
+        <burst-size>65536</burst-size>
+        <fallback-mount>/example2.ogg</fallback-mount>
+        <fallback-override>1</fallback-override>
+        <fallback-when-full>1</fallback-when-full>
+        <intro>/example_intro.ogg</intro>
+        <hidden>1</hidden>
+        <no-yp>1</no-yp>
+        <authentication type="htpasswd">
+                <option name="filename" value="myauth"/>
+                <option name="allow_duplicate_users" value="0"/>
+        </authentication>
+        <on-connect>/home/icecast/bin/stream-start</on-connect>
+        <on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
+    </mount>
+
+    <mount>
+        <mount-name>/auth_example.ogg</mount-name>
+        <authentication type="url">
+            <option name="mount_add"       value="http://myauthserver.net/notify_mount.php"/>
+            <option name="mount_remove"    value="http://myauthserver.net/notify_mount.php"/>
+            <option name="listener_add"    value="http://myauthserver.net/notify_listener.php"/>
+            <option name="listener_remove" value="http://myauthserver.net/notify_listener.php"/>
+        </authentication>
+    </mount>
+
+    -->
+
+    <fileserve>1</fileserve>
+
+    <paths>
+		<!-- basedir is only used if chroot is enabled -->
+        <basedir>/opt/csw/share/icecast</basedir>
+
+        <!-- Note that if <chroot> is turned on below, these paths must both
+             be relative to the new root, not the original root -->
+        <logdir>/var/opt/csw/icecast/log</logdir>
+        <webroot>/opt/csw/share/icecast/web</webroot>
+        <adminroot>/opt/csw/share/icecast/admin</adminroot>
+        <pidfile>/var/run/icecast.pid</pidfile> -->
+
+        <!-- Aliases: treat requests for 'source' path as being for 'dest' path
+             May be made specific to a port or bound address using the "port"
+             and "bind-address" attributes.
+          -->
+        <!--
+        <alias source="/foo" dest="/bar"/>
+          -->
+        <!-- Aliases: can also be used for simple redirections as well,
+             this example will redirect all requests for http://server:port/ to
+             the status page
+          -->
+        <alias source="/" dest="/status.xsl"/>
+    </paths>
+
+    <logging>
+        <accesslog>access.log</accesslog>
+        <errorlog>error.log</errorlog>
+        <!-- <playlistlog>playlist.log</playlistlog> -->
+      	<loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
+      	<logsize>10000</logsize> <!-- Max size of a logfile -->
+        <!-- If logarchive is enabled (1), then when logsize is reached
+             the logfile will be moved to [error|access|playlist].log.DATESTAMP,
+             otherwise it will be moved to [error|access|playlist].log.old.
+             Default is non-archive mode (i.e. overwrite)
+        -->
+        <!-- <logarchive>1</logarchive> -->
+    </logging>
+
+    <security>
+        <chroot>0</chroot>
+        <changeowner>
+            <user>nobody</user>
+            <group>nogroup</group>
+        </changeowner>
+    </security>
+</icecast>

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list