Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 97cd007f7e22c8990a89a6f00e80aa0e > files > 4

gnump3d-2.9.9.9-1mdv2007.1.src.rpm

%define name	gnump3d
%define version	2.9.9.9
%define release %mkrel 1

Name:		        %{name}
Version:	        %{version}
Release:	        %{release}
License:	        GPL
Group:		        System/Servers
Summary:	        GNUMP3d is a streaming server for MP3's
URL:		        http://www.gnu.org/software/gnump3d/
Source0:	        http://savannah.gnu.org/download/gnump3d/%{name}-%{version}.tar.bz2
Source1:	        gnump3d.init.bz2
Source2:	        gnump3d.logrotate.bz2
Requires(post):     rpm-helper
Requires(preun):    rpm-helper
Requires(pre):      rpm-helper
Requires(preun):    rpm-helper
BuildArch:	        noarch
Buildroot:	        %{_tmppath}/%{name}-%{version}

%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/*.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}/var/log/gnump3d
install -d -m 755 %{buildroot}/var/cache/gnump3d
install -d -m 755 %{buildroot}/var/cache/gnump3d/serving

%pre
%_pre_useradd gnump3d /var/cache/gnump3d /bin/false

%post
%_post_service gnump3d

if [ $1 = 1 ]; then
  # create various files
  %create_ghostfile /var/cache/gnump3d/song.tags gnump3d gnump3d 640
  %create_ghostfile /var/log/gnump3d/access.log gnump3d gnump3d 640
  %create_ghostfile /var/log/gnump3d/error.log gnump3d gnump3d 640
fi

%preun
%_preun_service gnump3d

%postun
%_postun_userdel gnump3d

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc AUTHORS DOWNSAMPLING README SUPPORT COPYING INSTALL TODO ChangeLog
%dir %{_sysconfdir}/%{name}
%attr(0755,root,root) %{_initrddir}/gnump3d
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/*
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/gnump3d
%{_bindir}/*
%{perl_vendorlib}/%{name}
%{_mandir}/man1/*
%{_datadir}/gnump3d
%dir %attr(-,gnump3d,gnump3d) /var/log/gnump3d
%dir %attr(-,gnump3d,gnump3d) /var/cache/gnump3d
%dir %attr(-,gnump3d,gnump3d) /var/cache/gnump3d/serving


%changelog
* Thu Dec 14 2006 Guillaume Rousse <guillomovitch@mandriva.org> 2.9.9.9-1mdv2007.0
+ Revision: 96790
- new version

* Wed Nov 15 2006 Olivier Blin <oblin@mandriva.com> 2.9.9-2mdv2007.1
+ Revision: 84512
- add forgotten file.types by using a more general pattern
- Import gnump3d



* Tue Sep 05 2006 Guillaume Rousse <guillomovitch@mandriva.org> 2.9.9-1mdv2007.0
- New version 2.9.9

* Tue Aug 29 2006 Guillaume Rousse <guillomovitch@mandriva.org> 2.9.8-2mdv2007.0
- Rebuild

* Thu Nov 24 2005 Guillaume Rousse <guillomovitch@mandriva.org> 2.9.8-1mdk
- 2.9.8 

* Mon Oct 17 2005 Olivier Thauvin <nanardon@mandriva.org> 2.9.5-1mdk
- 2.9.5

* Thu Jul 07 2005 Guillaume Rousse <guillomovitch@mandriva.org> 2.9.4-1mdk 
- new version

* Mon Jul 04 2005 Oden Eriksson <oeriksson@mandriva.com> 2.8-4mdk
- rebuild
- misc spec file fixes

* Wed May 19 2004 Guillaume Rousse <guillomovitch@mandrake.org> 2.8-3mdk
- fixed url (Eskild Hustvedt (Zero_Dogg) <eskild@mandrakehelp.com>)

* Tue May 18 2004 Guillaume Rousse <guillomovitch@mandrake.org> 2.8-2mdk
- remove mpg321 dependency
- create various files at install

* Tue May 18 2004 Guillaume Rousse <guillomovitch@mandrake.org> 2.8-1mdk
- new release
- spec cleanup

* Sun May 16 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 1.0-3mdk
- build release
- fix deps

* 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...