%define name gnump3d %define version 3.0 Summary: GNUMP3d is a streaming server for MP3's Name: %{name} Version: %{version} Release: 2%{?dist} License: GPL Group: Applications/Multimedia Source0: %{name}-%{version}.tar.bz2 Source1: gnump3d.init.bz2 Source2: gnump3d.logrotate.bz2 URL: http://www.gnu.org/software/gnump3d/ Requires: perl BuildArch: noarch Buildroot: %{_tmppath}/%{name}-%{version}-root Provides: perl(gnump3d::readtags) %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 bzcat %{SOURCE1} > %{name}.init bzcat %{SOURCE2} > %{name}.logrotate # fix locations... perl -pi \ -e 's|PLUGINDIR|%{perl_vendorlib}|;' \ -e 's|nobody|gnump3d|;' \ etc/gnump3d.conf %build %install rm -rf %{buildroot} install -d -m 755 %{buildroot}%{_sysconfdir}/%{name} install -m 644 etc/gnump3d.conf %{buildroot}%{_sysconfdir}/%{name} install -m 644 etc/mime.types %{buildroot}%{_sysconfdir}/%{name} install -m 644 etc/*.types %{buildroot}%{_sysconfdir}/%{name} install -d %{buildroot}%{_bindir} install -m 755 bin/gnump3d2 %{buildroot}%{_bindir}/gnump3d install -m 755 bin/gnump3d-top %{buildroot}%{_bindir} install -m 755 bin/gnump3d-index %{buildroot}%{_bindir} install -d -m 755 %{buildroot}%{_datadir}/%{name} cp -R templates/* %{buildroot}%{_datadir}/%{name} install -d -m 755 %{buildroot}%{_mandir}/man1 install -m 644 man/gnump3d-top.1 %{buildroot}%{_mandir}/man1 install -m 644 man/gnump3d-index.1 %{buildroot}%{_mandir}/man1 install -m 644 man/gnump3d.1 %{buildroot}%{_mandir}/man1 install -m 644 man/gnump3d.conf.1 %{buildroot}%{_mandir}/man1 install -d -m 755 %{buildroot}%{perl_vendorlib}/%{name} install -d -m 755 %{buildroot}%{perl_vendorlib}/%{name}/plugins install -d -m 755 %{buildroot}%{perl_vendorlib}/%{name}/lang install -m 644 lib/gnump3d/*.pm %{buildroot}%{perl_vendorlib}/%{name} install -m 644 lib/gnump3d/plugins/*.pm %{buildroot}%{perl_vendorlib}/%{name}/plugins install -m 644 lib/gnump3d/lang/*.pm %{buildroot}%{perl_vendorlib}/%{name}/lang install -d -m 755 %{buildroot}%{_initrddir} install -m 755 %{name}.init %{buildroot}%{_initrddir}/%{name} install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d install -m 644 %{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name} install -d -m 755 %{buildroot}%{_localstatedir}/log/gnump3d install -d -m 755 %{buildroot}%{_localstatedir}/cache/gnump3d install -d -m 755 %{buildroot}%{_localstatedir}/cache/gnump3d/serving # 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 /usr/sbin/useradd -c "gnump3d Streaming Server" \ -s /sbin/nologin -r -d / %{name} 2> /dev/null || : %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 %dir %{_sysconfdir}/%{name} %{_initrddir}/gnump3d %{_sysconfdir}/logrotate.d/gnump3d %config(noreplace) %{_sysconfdir}/%{name}/* %{_bindir}/* %{perl_vendorlib}/%{name} %{_mandir}/man1/* %{_datadir}/gnump3d %dir %attr(-,gnump3d,gnump3d) %{_localstatedir}/log/gnump3d %dir %attr(-,gnump3d,gnump3d) %{_localstatedir}/cache/gnump3d %dir %attr(-,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 * 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...