%define name gnump3d %define version 1.0 %define release 2mdk Summary: GNUMP3d is a streaming server for MP3's. Name: %{name} Version: %{version} Release: %{release} License: GPL Group: System/Servers Source0: %{name}-%{version}.tar.bz2 Source1: gnump3d.init.bz2 Source2: gnump3d.logrotate.bz2 Source3: gnump3d.conf.bz2 URL: http://gnump3d.sourceforge.net/ BuildRequires: libvorbis0-devel libogg0-devel libstdc++5-devel Requires: libvorbis0 libogg0 mpg321 libstdc++5 perl PreReq: rpm-helper Buildroot: %{_tmppath}/%{name}-%{version}-root %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 %build # Wierd..., have to put the templates in %%{_datadir}, # this might be fixed later on I hope %configure \ --bindir=%{_sbindir} \ --sbindir=%{_sbindir} \ --sysconfdir=%{_datadir} \ --libdir=%{_libdir}/gnump3d \ --with-vorbis \ --with-syslog \ --without-threads %make %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} make install DESTDIR=%{buildroot} install -d %{buildroot}%{_initrddir} install -d %{buildroot}%{_sysconfdir}/logrotate.d install -d %{buildroot}/var/log/gnump3d install -d %{buildroot}/var/lib/gnump3d bzcat %{SOURCE1} > %{buildroot}%{_initrddir}/gnump3d chmod 755 %{buildroot}%{_initrddir}/gnump3d bzcat %{SOURCE2} > %{buildroot}%{_sysconfdir}/logrotate.d/gnump3d chmod 644 %{buildroot}%{_sysconfdir}/logrotate.d/gnump3d bzcat %{SOURCE3} > %{buildroot}%{_sysconfdir}/gnump3d.conf chmod 644 %{buildroot}%{_sysconfdir}/gnump3d.conf echo "#" > %{buildroot}/var/log/gnump3d/access.log # clean up some... (we don't need these do we?) rm -f %{buildroot}%{_libdir}/gnump3d/*.a rm -f %{buildroot}%{_libdir}/gnump3d/*.la rm -f %{buildroot}%{_datadir}/gnump3d/gnump3d.conf # this one is debian stuff... rm -f %{buildroot}%{_sbindir}/gnump3d-config # fix locations... perl -pi -e "s|/etc/gnump3d/gnump3d.conf|/etc/gnump3d.conf|g" %{buildroot}%{_sbindir}/gnump3d-top %pre %_pre_useradd gnump3d /var/lib/gnump3d /bin/false %post %_post_service gnump3d %preun %_preun_service gnump3d %postun %_postun_userdel gnump3d %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc AUTHORS BUGS ChangeLog HACKING INSTALL NEWS README %config(noreplace) %attr(0755,root,root) %{_initrddir}/gnump3d %config(noreplace) %attr(0755,root,root) %{_sysconfdir}/logrotate.d/gnump3d %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/gnump3d.conf %attr(0755,root,root) %{_sbindir}/gnump3d %attr(0755,root,root) %{_sbindir}/gnump3d-top %attr(0755,root,root) %{_libdir}/gnump3d/*.so %attr(0644,root,root) %{_mandir}/man1/gnump3d* %{_datadir}/gnump3d/* %dir %attr(0755,gnump3d,gnump3d) /var/log/gnump3d %dir %attr(0755,gnump3d,gnump3d) /var/lib/gnump3d %attr(0644,gnump3d,gnump3d) /var/log/gnump3d/access.log %changelog * Thu Jan 16 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.0-2mdk - build release * Sun Dec 01 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 1.0-1mdk - initial cooker contrib, first attempt...