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