%define realname ices %define mainver 0.4 %define svnver svn12258 Name: ices0 Version: %{mainver} Release: 18.%{svnver}%{?dist} Summary: MP3 source streaming for Icecast Group: System Environment/Daemons License: GPL URL: http://www.icecast.org # We are using an unreleased version of the source, from IceS0 repo Source0: ices-%{mainver}.%{svnver}.tar.gz Source1: ices0.init Source2: ices0.logrotate Source3: README.multistream Patch0: %{name}.exit0.patch Patch1: %{name}.die-dreaded-daemon-message.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libxml2-devel, libshout-devel >= 2.0, libvorbis-devel, lame-devel, libmp4v2-devel, flac-devel, python-devel #Provides: %realname = %version-%release Requires(post): /sbin/chkconfig Requires(post): /sbin/service Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service %description IceS is a source client for a streaming server. The purpose of this client is to provide an audio stream to a streaming server such that one or more listeners can access the stream. With this layout, this source client can be situated remotely from the icecast server. The primary example of a streaming server used is Icecast 2, although others could be used if certain conditions are met. This specific version of IceS (pre-2.0) is capable of sending (and reencoding) also MP3 streams. IceS 2.0+ can only send Ogg streams. Use this ices0 package (along with icecast) for MP3 streaming. Use regular newer ices package for patent-free Ogg-only streaming. This package provides an improved init script that is capable of managing multiple simultaneous different streams (processes) of ices0, resembling the way the newer ices work. %prep %setup -q -n %realname-%{mainver} %patch0 -p0 %patch1 -p1 cp %SOURCE3 . perl -pi -e 's!.*!%_var/log/%name/default!' conf/ices.conf.dist.in %build %configure \ --with-lame \ --with-vorbis \ --with-flac \ --with-faad \ --with-moddir=%{_sysconfdir}/%{name} \ --with-python-includes=%{_includedir}/python%{py_ver} # --without-faad \ %{__make} %{?_smp_mflags} %install rm -rf %{buildroot} make DESTDIR=$RPM_BUILD_ROOT install mv $RPM_BUILD_ROOT%_bindir/%realname $RPM_BUILD_ROOT%_bindir/%name strip $RPM_BUILD_ROOT%_bindir/%name mv $RPM_BUILD_ROOT%{_sysconfdir}/ices.conf.dist $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/default.conf mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/ices.pm.dist $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/dynamic-playlist.pm mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/ices.py.dist $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/dynamic-playlist.py mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/ices.sh.dist $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/dynamic-playlist.sh iconv -f latin1 -t utf8 < $RPM_BUILD_ROOT%{_mandir}/man1/ices.1 > $RPM_BUILD_ROOT%{_mandir}/man1/ices0.1 rm $RPM_BUILD_ROOT%{_mandir}/man1/ices.1 rm -rf $RPM_BUILD_ROOT/usr/doc # We don't want libshout here ! rm -fr $RPM_BUILD_ROOT/%_includedir/shout rm -f $RPM_BUILD_ROOT/%_libdir/libshout* install -d -m 755 $RPM_BUILD_ROOT%{_var}/log/%{name} install -d -m 755 $RPM_BUILD_ROOT%_sysconfdir/logrotate.d install -d -m 755 $RPM_BUILD_ROOT%{_initrddir} cp %SOURCE1 $RPM_BUILD_ROOT%{_initrddir}/%{name} cp %SOURCE2 $RPM_BUILD_ROOT%_sysconfdir/logrotate.d/%{name} %clean rm -rf %{buildroot} %pre /usr/sbin/useradd -c "IceS0 Shoutcast source" -s /sbin/nologin -r -d %{_var}/log/%{name} %{name} 2> /dev/null || : #%post #if [ $1 = 1 ]; then # /sbin/chkconfig --add %{name} #fi %preun if [ $1 = 0 ]; then /sbin/service %{name} stop >/dev/null 2>&1 /sbin/chkconfig --del %{name} fi # % postun #if [ "$1" -ge "1" ]; then # /sbin/service %{name} condrestart >/dev/null 2>&1 #fi %files %defattr(-,root,root) %doc AUTHORS BUGS COPYING INSTALL NEWS README README.playlist README.multistream TODO %doc doc/icesmanual.html %{_bindir}/%{name} %config(noreplace) %_sysconfdir/logrotate.d/%{name} %{_mandir}/man1/%{name}.1.gz %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/* %attr(755,root,root) %{_initrddir}/%{name} %attr(-,%{name},%{name}) %{_var}/log/%{name} %changelog * Mon Jan 01 2007 Avi Alkalay - 0.4-18.svn12258 - Based on improved version from SVN - Improved init script to handle multiple streams and ices0 instances - Renamed the dynamic playlist scripts to be more explicit - Included the README.multistream file - Patch to simply remove the useless "dreaded daemon" message * Fri Dec 29 2006 Avi Alkalay - 0.4 - Used this spec as a base to build IceS0 - MP3 streaming - based on Mandriva's PLF Ices0 spec - Fedora 6 build * Fri Sep 08 2006 Andreas Thienemann - 2.0.1-3 - FE6 Rebuild * Tue Mar 28 2006 Andreas Thienemann 2.0.1-2 - Cleaned up the specfile for FE * Thu Nov 17 2005 Matt Domsch 2.0.1-1 - add dist tag - rebuild for FC4 * Mon Jan 31 2005 Ignacio Vazquez-Abrams 0:2.0.1-0.iva.0 - Upstream update * Fri Jan 7 2005 Ignacio Vazquez-Abrams 0:2.0.0-0.iva.0 - Retooled for Fedora Core 3