Summary: The GNU Streaming MP3 / OGG Vorbis Server Name: gnump3d Version: 3.0 Release: 4%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.gnu.org/software/gnump3d/ Source0: http://savannah.gnu.org/download/gnump3d/%{name}-%{version}.tar.bz2 Source1: gnump3d.init Source2: gnump3d.logrotate Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Provides: perl(gnump3d::readtags) Requires(pre): shadow-utils Requires(post): /sbin/chkconfig Requires(post): /sbin/service Requires(preun): /sbin/chkconfig Requires(preun): /sbin/service %description GNUMP3d is a streaming server for MP3's, OGG vorbis, and other streamable audio files. It is designed to be: * Small, stable, self-contained, and secure. * Simple to install, configure, and use. * Portable across different varieties of Unix. %prep %setup -q cat %{SOURCE1} > %{name}.init cat %{SOURCE2} > %{name}.logrotate # fix locations... perl -pi \ -e 's|PLUGINDIR|%{perl_vendorlib}|;' \ -e 's|nobody|gnump3d|;' \ etc/gnump3d.conf %build %install rm -rf %{buildroot} make install PREFIX=%{buildroot} MANDIR=%{_mandir}/man1 LIBDIR=%{perl_vendorlib} pushd %{buildroot}%{_bindir} ln -sf gnump3d2 gnump3d popd install -D -m 755 %{name}.init %{buildroot}%{_initrddir}/%{name} install -D -m 644 %{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name} chmod 644 %{buildroot}%{perl_vendorlib}/gnump3d/mp4info.pm # create log files touch %{buildroot}%{_localstatedir}/cache/gnump3d/song.tags touch %{buildroot}%{_localstatedir}/log/gnump3d/access.log touch %{buildroot}%{_localstatedir}/log/gnump3d/error.log %pre getent group %{name} >/dev/null || groupadd -r %{name} getent passwd %{name} >/dev/null || \ /usr/sbin/useradd -r -g %{name} -d / -s /sbin/nologin \ -c "gnump3d Streaming Server" %{name} exit 0 %post # installing rpm - add service if [ $1 = 1 ]; then /sbin/chkconfig --add %{name} fi %preun # removing rpm - stop and remove service if [ $1 = 0 ]; then /sbin/service %{name} stop >/dev/null 2>&1 /sbin/chkconfig --del %{name} fi %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc AUTHORS DOWNSAMPLING README SUPPORT COPYING INSTALL TODO ChangeLog %{_bindir}/%{name}* %{perl_vendorlib}/%{name} %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/gnump3d %{_initrddir}/gnump3d %config(noreplace) %{_sysconfdir}/%{name}/* %{_mandir}/man1/* %{_datadir}/gnump3d %dir %attr(755,gnump3d,gnump3d) %{_localstatedir}/log/gnump3d %dir %attr(755,gnump3d,gnump3d) %{_localstatedir}/cache/gnump3d %dir %attr(755,gnump3d,gnump3d) %{_localstatedir}/cache/gnump3d/serving %attr (644, gnump3d, gnump3d) %ghost %{_localstatedir}/cache/gnump3d/song.tags %attr (640, gnump3d, gnump3d) %ghost %{_localstatedir}/log/gnump3d/access.log %attr (640, gnump3d, gnump3d) %ghost %{_localstatedir}/log/gnump3d/error.log %changelog * Sat Nov 20 2010 Paulo Roma 3.0-4 - fixed user and group creation. - removed Req perl and made logrotate.d/gnump3d config(noreplace). - changed license to GPLv2+. * Sat Apr 24 2010 Paulo Roma 3.0-3 - simplified spec. - fixed service-default-enabled warning. * Sun Feb 10 2008 Paulo Roma 3.0-2 - updated to 3.0 - added Provides perl(gnump3d::readtags). - Touching log files and installing them as ghost. * Mon Jan 15 2007 Paulo Roma 2.9.9.9-1 - updated to 2.9.9.9 - rebuilt for Fedora 6. * Wed May 19 2004 Guillaume Rousse 2.8-3mdk - fixed url (Eskild Hustvedt (Zero_Dogg) ) * Tue May 18 2004 Guillaume Rousse 2.8-2mdk - remove mpg321 dependency - create various files at install * Tue May 18 2004 Guillaume Rousse 2.8-1mdk - new release - spec cleanup * Sun May 16 2004 Oden Eriksson 1.0-3mdk - build release - fix deps * Thu Jan 16 2003 Oden Eriksson 1.0-2mdk - build release * Sun Dec 01 2002 Oden Eriksson 1.0-1mdk - initial cooker contrib, first attempt...