]> git.pld-linux.org Git - packages/apache1-mod_mp3.git/blob - apache1-mod_mp3.spec
- added %%verify(not size mtime md5) to %%{_sysconfdir}/mod_mp3.conf
[packages/apache1-mod_mp3.git] / apache1-mod_mp3.spec
1 %define         arname          mod_mp3
2 %define         mod_name        mp3
3 Summary:        MP3 Apache module
4 Summary(pl):    Modu³ MP3 do Apache
5 Name:           apache-mod_mp3
6 Version:        0.25
7 Release:        1
8 License:        Distributable
9 Group:          Networking/Daemons
10 Group(de):      Netzwerkwesen/Server
11 Group(pl):      Sieciowe/Serwery
12 Source0:        ftp://ftp.tangent.org/pub/apache/%{arname}-%{version}.tar.gz
13 Source1:        %{arname}.conf
14 URL:            http://media.tangent.org/
15 Requires:       apache >= 1.3.12
16 Prereq:         grep
17 Prereq:         apache(EAPI) >= 1.3.12
18 Provides:       %{arname}
19 BuildRequires:  apache(EAPI) >= 1.3.12
20 BuildRequires:  apache(EAPI)-devel >= 1.3.12
21 BuildRequires:  expat-devel
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _pkglibdir      %(%{_sbindir}/apxs -q LIBEXECDIR)
25 %define         _sysconfdir     /etc/httpd
26
27 %prep
28 %setup -q -n %{arname}-%{version}
29
30 %description
31 This turns apache into your basic RIAA hating, but every college
32 student loving mp3 streaming server. It can play from a list of files,
33 either straight through or randomly. It can also be used to cache
34 mp3's into memory and have the server operate entirely from memory.
35 Enjoy, groove, mp3s not included.
36
37 %build
38 %{__make} APXS=/usr/sbin/apxs
39
40 %install
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
43
44 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
45 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
46
47 gzip -9nf README ChangeLog LICENSE
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %post
53 /usr/sbin/apxs -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
54 if [ -f %{_sysconfdir}/httpd.conf ] && \
55         ! grep -q "^Include.*/%{arname}.conf" %{_sysconfdir}/httpd.conf; then
56                 echo "Include %{_sysconfdir}/%{arname}.conf" >> %{_sysconfdir}/httpd.conf
57 fi
58 if [ -f /var/lock/subsys/httpd ]; then
59         /etc/rc.d/init.d/httpd restart 1>&2
60 fi
61         
62 %preun
63 if [ "$1" = "0" ]; then
64         /usr/sbin/apxs -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
65         grep -E -v "^Include.*%{arname}.conf" %{_sysconfdir}/httpd.conf > \
66         %{_sysconfdir}/httpd.conf.tmp
67         mv -f %{_sysconfdir}/httpd.conf.tmp %{_sysconfdir}/httpd.conf
68         if [ -f /var/lock/subsys/httpd ]; then
69                 /etc/rc.d/init.d/httpd restart 1>&2
70         fi
71 fi
72
73 %files
74 %defattr(644,root,root,755)
75 %doc *.gz faq.html
76 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mod_mp3.conf
77 %attr(755,root,root) %{_pkglibdir}/mod_mp3.so
This page took 0.031988 seconds and 4 git commands to generate.