# # spec file for package icecast # # Parts of this file taken from original SUSE and Fedora packaging # %define version_archive _VERSION_ARCHIVE_ Summary: Streaming media server Name: icecast Version: 2.4.99.2 Release: 1%{?dist} Group: Applications/Multimedia #because one way to say this is not enough... %if 0%{?suse_version} > 1 License: GPL-2.0 %else License: GPLv2 %endif URL: http://www.icecast.org/ #Source0: http://downloads.xiph.org/releases/icecast/icecast-%{version}.tar.gz Source0: icecast2_%{version}.orig.tar.gz Source1: icecast2_%{version}-1.debian.tar.gz Source2: icecast.init Source3: icecast.logrotate Source4: icecast.xml Source5: icecast.init.suse %if 0%{?suse_version} > 1 Suggests: logrotate PreReq: %fillup_prereq PreReq: %insserv_prereq PreReq: /usr/sbin/groupadd PreReq: /usr/sbin/useradd %endif BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Provides: streaming-server BuildRequires: automake, pkgconfig 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 BuildRequires: libtheora-devel >= 1.0, openssl-devel # From suse packaging BuildRequires: libtool, Requires(pre): /usr/sbin/useradd Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service %description This is an official icecast.org package of Icecast. Icecast is a streaming media server which currently supports Ogg Vorbis and Opus audio streams, with MP3 known to work. 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 -n icecast-%{version_archive} find -name "*.html" -or -name "*.jpg" -or -name "*.png" -or -name "*.css" | xargs chmod 644 tar -xzf %{SOURCE1} %{__sed} -i -e 's/icecast2/icecast/g' debian/icecast2.1 %build # quick and dirty fix for update-alternatives being broken in some OBS targets if [ ! -e /usr/bin/ld ] then if [ -e /usr/bin/ld.gold ] then export PATH=$PATH:$HOME/bin mkdir $HOME/bin ln -s /usr/bin/ld.gold $HOME/bin/ld fi fi # LD=/usr/bin/ld.gold %if 0%{?suse_version} > 1 autoreconf -fiv %endif %configure %{__make} %{?_smp_mflags} %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} %if 0%{?suse_version} > 1 rm -rf %{buildroot}%{_datadir}/doc/%{name} # init script install -d -m 0755 %{buildroot}%{_sbindir} install -D -m 0755 %{SOURCE5} %{buildroot}%{_sysconfdir}/init.d/%{name} ln -s -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name} # create missing dirs install -d -m 0755 %{buildroot}%{_localstatedir}/{lib,log}/%{name} %else rm -rf %{buildroot}%{_datadir}/icecast/doc rm -rf %{buildroot}%{_docdir}/icecast install -D -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/icecast install -D -m 640 %{SOURCE4} %{buildroot}%{_sysconfdir}/icecast.xml %endif install -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/icecast install -D -m 644 debian/icecast2.1 %{buildroot}%{_mandir}/man1/icecast.1 mkdir -p %{buildroot}%{_localstatedir}/log/icecast %if 0%{?suse_version} > 1 %else mkdir -p %{buildroot}%{_localstatedir}/run/icecast %endif find doc -iname "Makefile*" | xargs rm -f %clean %if 0%{?suse_version} > 1 [ %{buildroot} != "/" -a -d %{buildroot} ] && rm -rf %{buildroot} %else rm -rf %{buildroot} %endif %pre %if 0%{?suse_version} > 1 /usr/sbin/groupadd -r %{name} &>/dev/null || : /usr/sbin/useradd -g %{name} -s /bin/false -r -c "Icecast streaming server" -d %{_localstatedir}/lib/%{name} %{name} &>/dev/null || : %else /usr/sbin/useradd -M -r -d /usr/share/icecast -s /sbin/nologin \ -c "icecast streaming server" icecast > /dev/null 2>&1 || : %endif %post %if 0%{?suse_version} > 1 %fillup_and_insserv %{name} %else /sbin/chkconfig --add icecast %endif %preun %if 0%{?suse_version} > 1 %stop_on_removal %{name} %else if [ $1 = 0 ]; then /sbin/service icecast stop >/dev/null 2>&1 /sbin/chkconfig --del icecast fi %endif %postun %if 0%{?suse_version} > 1 %restart_on_update %{name} %insserv_cleanup %else 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 %endif %files %defattr(-,root,root) %doc README.md AUTHORS COPYING NEWS ChangeLog %doc doc/ %doc conf/*.dist %config(noreplace) %attr(-,root,%{name}) %{_sysconfdir}/icecast.xml %{_sysconfdir}/logrotate.d/icecast %if 0%{?suse_version} > 1 %{_sysconfdir}/init.d/%{name} %{_localstatedir}/lib/%{name} %{_sbindir}/rc%{name} %config(noreplace) %attr(640,root,root) %{_sysconfdir}/logrotate.d/%{name} %else %{_initrddir}/icecast %dir %attr(-,%{name},%{name}) %{_localstatedir}/run/icecast %endif %{_bindir}/icecast %{_datadir}/icecast %{_mandir}/man1/icecast.1.gz %dir %attr(-,%{name},%{name}) %{_localstatedir}/log/icecast %changelog * Fri May 11 2018 Thomas B. Ruecker - 2.4.2.99-1 - 2.5 Beta 2 * Wed Apr 08 2015 Thomas B. Ruecker - 2.4.2-1 - security fix for remote DoS vulnerability * Sun Dec 14 2014 Thomas B. Ruecker - 2.4.1-2 - Packaging fix for docdir problem, as patched upstream - Adjusted %%doc to reflect subdirectories * Sun Nov 23 2014 Thomas B. Ruecker - 2.4.1-1 - Initial packaging of 2.4.1 - SECURITY FIX - See ChangeLog for details * Sun May 25 2014 Thomas B. Ruecker - 2.4.0-1 - SECURITY FIX - Override supplementary groups if - Added