rpms/icecast/devel icecast.init, NONE, 1.1 icecast.logrotate, NONE, 1.1 icecast.spec, NONE, 1.1 icecast.xml, NONE, 1.1 status3.xsl, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Andreas Thienemann (ixs) fedora-extras-commits at redhat.com
Thu Feb 16 07:23:05 UTC 2006


Author: ixs

Update of /cvs/extras/rpms/icecast/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15898/devel

Modified Files:
	.cvsignore sources 
Added Files:
	icecast.init icecast.logrotate icecast.spec icecast.xml 
	status3.xsl 
Log Message:
auto-import icecast-2.3.1-1 on branch devel from icecast-2.3.1-1.src.rpm


--- NEW FILE icecast.init ---
#!/bin/sh
#
# icecast      This shell script takes care of starting and stopping
#              the icecast multimedia streaming systen.
#
# chkconfig: - 85 15
# description: icecast is a multimedia streaming daemon. It is used to \
#              relay and offer multimedia streaming content.
# processname: icecast
# pidfile: /var/run/icecast/icecast.pid
# config: /etc/icecast.xml

# Source function library.
. /etc/rc.d/init.d/functions

[ -x /usr/bin/icecast ] || exit 0

# See how we were called.
case "$1" in
  start)
	# Start daemon.
	echo -n $"Starting icecast streaming daemon: "
	daemon /usr/bin/icecast -b -c /etc/icecast.xml
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/icecast
	;;
  stop)
	# Stop daemon.
	echo -n $"Shutting icecast streaming daemon: "
	killproc icecast
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/icecast
	;;
  status)
	status icecast
	RETVAL=$?
	;;
  restart)
	$0 stop
	$0 start
	;;
  reload)
	echo -n $"Reloading icecast: "
	killproc icecast -HUP
	RETVAL=$?
	echo
	;;
  condrestart)
        [ -f /var/lock/subsys/icecast ] && restart || :
        ;;
  *)
	echo $"Usage: $0 {start|stop|status|restart|reload}"
	RETVAL=1
	;;
esac

exit $RETVAL


--- NEW FILE icecast.logrotate ---
/var/log/icecast/*log {
    missingok
    notifempty
    sharedscripts
    postrotate
	/bin/kill -HUP `cat /var/run/icecast/icecast.pid 2>/dev/null` 2> /dev/null || true
    endscript
}


--- NEW FILE icecast.spec ---
Summary: ShoutCast compatible streaming media server
Name: icecast
Version: 2.3.1
Release: 1%{?dist}
Group: Applications/Multimedia
License: GPL
URL: http://www.icecast.org/
Source0: http://downloads.xiph.org/releases/icecast/icecast-%{version}.tar.gz
Source1: status3.xsl
Source2: icecast.init
Source3: icecast.logrotate
Source4: icecast.xml
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Provides: streaming-server

BuildRequires: automake
BuildRequires: libvorbis-devel >= 1.0, libogg-devel >= 1.0, curl-devel >= 7.10.0
BuildRequires: libxml2-devel, libxslt-devel, speex-devel
# To be enabled as soon as Fedora's libtheora supports ogg_stream_init
# BuidRequires: libtheora-devel >= 1.0

Requires(pre): /usr/sbin/useradd
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service


%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.  It
is very versatile in that new formats can be added relatively easily and
supports open standards for commuincation and interaction.


%prep
%setup -q
find -name "*.html" -or -name "*.jpg" -or -name "*.css" | xargs chmod 644
%{__sed} -i -e 's/icecast2/icecast/g' debian/icecast2.1


%build
# theora support is to be enabled as soon as Fedora's libtheora supports
# ogg_stream_init
%configure --disable-theora
%{__make} %{?_smp_mflags}


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
rm -rf %{buildroot}%{_datadir}/icecast/doc
rm -rf %{buildroot}%{_docdir}/icecast
install -D -m 644 %{SOURCE1} %{buildroot}%{_datadir}/icecast/web/status3.xsl
install -D -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/icecast
install -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/icecast
install -D -m 640 %{SOURCE4} %{buildroot}%{_sysconfdir}/icecast.xml
install -D -m 644 debian/icecast2.1 %{buildroot}%{_mandir}/man1/icecast.1
mkdir -p %{buildroot}%{_localstatedir}/log/icecast
mkdir -p %{buildroot}%{_localstatedir}/run/icecast


%clean 
rm -rf %{buildroot}


%pre
/usr/sbin/useradd -M -r -d /usr/share/icecast -s /sbin/nologin \
	-c "icecast streaming server" icecast > /dev/null 2>&1 || :


%post
/sbin/chkconfig --add icecast


%preun
if [ $1 = 0 ]; then
        /sbin/service icecast stop >/dev/null 2>&1
        /sbin/chkconfig --del icecast
fi


%postun
if [ "$1" -ge "1" ]; then
        /sbin/service icecast condrestart >/dev/null 2>&1
fi
if [ $1 = 0 ] ; then
	userdel icecast >/dev/null 2>&1 || :
fi

%files
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS ChangeLog
%doc doc/*.html
%doc doc/*.jpg
%doc doc/*.css
%config(noreplace) %{_sysconfdir}/icecast.xml
%{_sysconfdir}/logrotate.d/icecast
%{_initrddir}/icecast
%{_bindir}/icecast
%{_datadir}/icecast
%{_mandir}/man1/icecast.1.gz
%dir %attr(-,icecast,icecast) %{_localstatedir}/log/icecast
%dir %attr(-,icecast,icecast) %{_localstatedir}/run/icecast

%changelog
* Fri Feb 03 2006 Andreas Thienemann <andreas at bawue.net> 2.3.1-1
- Updated to icecast 2.3.1-1

* Wed Aug 03 2005 Andreas Thienemann <andreas at bawue.net> 2.2.0-1
- Initial specfile


--- NEW FILE icecast.xml ---
<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>
        <!-- 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>

    <!-- 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>
    <directory>
        <yp-url-timeout>15</yp-url-timeout>
        <yp-url>http://www.oddsock.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 can use these two if you only want a single listener -->
    <!--<port>8000</port> -->
    <!--<bind-address>127.0.0.1</bind-address>-->

    <!-- You may have multiple <listener> elements -->
    <listen-socket>
        <port>8000</port>
        <!-- <bind-address>127.0.0.1</bind-address> -->
    </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>-->
    <!--<master-relay-auth>1</master-relay-auth>-->

    <!-- 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>-->


    <!-- Report <hostname> and this port to master server for redirecting
         clients to this slave -->
    <!--<master-redirect-port>8000</master-redirect-port>-->

    <!-- Relays. State connection information, and by default 
         request inline metadata for mp3 streams if available.
         An on-demand relay will only retrieve the stream if
         there are listeners connected -->
    <!--
    <relay>
        <server>127.0.0.1</server>
        <port>8001</port>
        <mount>/example.ogg</mount>
        <local-mount>/different.ogg</local-mount>
        <on-demand>1</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>/path/to/stream-intro.ogg</intro>
        <hidden>1</hidden>
        <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>
    -->
    <!-- other auth possibilities include running a command
         to do the auth, mount, user and pass are passed via
         stdin to the program
    <mount>
    ....
        <authentication type="command">
             <option name="filename" value="auth_verify"/>
        </authentication>
        
        or 

        for url auth, the add url needs to return a "icecast-auth-user: 1" http
        header for a user to authenicate. Both urls are sent params via POST,
        add is sent id, mount, user, pass, ip, useragent
        remove is passed id, mount, user, pass, duration

        <authentication type="url">

             state username/password if url requires it

             <option name="username" value="admin"/>
             <option name="password" value="hackme"/>
             <option name="add"    value="http://myauthserver.com/scripts/add_listener.php"/>
             <option name="remove" value="http://myauthserver.com/scripts/del_listener.php"/>
        </authentication>
    </mount -->


    <fileserve>1</fileserve>

    <!-- 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>
    -->

    <paths>
        <!-- basedir is only used if chroot is enabled -->
        <basedir>/usr/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/log/icecast</logdir>
        <webroot>/usr/share/icecast/web</webroot>
        <adminroot>/usr/share/icecast/admin</adminroot>
        <pidfile>/var/run/icecast/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>4</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
    </logging>

    <security>
        <chroot>0</chroot>
        <changeowner>
            <user>icecast</user>
            <group>icecast</group>
        </changeowner>
    </security>
</icecast>


--- NEW FILE status3.xsl ---
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
<xsl:output omit-xml-declaration="no" method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes" encoding="UTF-8" />
<xsl:template match = "/icestats" >
<pre>
MountPoint,Connections,Stream Name,Current Listeners,Description,Currently Playing,Stream URL 
Global,Client:<xsl:value-of select="connections" /> Source: <xsl:value-of select="source_connections" />#<xsl:value-of select="listeners" />#
<xsl:for-each select="source">
<xsl:value-of select="server_name" />#<xsl:value-of select="@mount" />#<xsl:value-of select="name" />#<xsl:value-of select="listeners" />#<xsl:value-of select="description" />#<xsl:value-of select="artist" />#<xsl:value-of select="title" />#<xsl:value-of select="url" />
</xsl:for-each>
</pre>
</xsl:template>
</xsl:stylesheet>


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/icecast/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	16 Feb 2006 07:20:52 -0000	1.1
+++ .cvsignore	16 Feb 2006 07:23:04 -0000	1.2
@@ -0,0 +1 @@
+icecast-2.3.1.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/icecast/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	16 Feb 2006 07:20:52 -0000	1.1
+++ sources	16 Feb 2006 07:23:04 -0000	1.2
@@ -0,0 +1 @@
+2d80a249fa8529f82d018c6216108ea8  icecast-2.3.1.tar.gz




More information about the fedora-extras-commits mailing list