]> git.pld-linux.org Git - packages/apache1-mod_mp3.git/blob - apache1-mod_mp3.spec
- umask in scripts, other fixes/cosmetics where needed
[packages/apache1-mod_mp3.git] / apache1-mod_mp3.spec
1 %define         arname          mod_mp3
2 %define         mod_name        mp3
3 %define         apxs            /usr/sbin/apxs
4 Summary:        MP3 Apache module
5 Summary(pl):    Modu³ MP3 do Apache
6 Name:           apache-mod_mp3
7 Version:        0.39
8 Release:        1
9 License:        BSD
10 Group:          Networking/Daemons
11 Source0:        http://software.tangent.org/download/%{arname}-%{version}.tar.gz
12 Source1:        %{arname}.conf
13 URL:            http://media.tangent.org/
14 BuildRequires:  %{apxs}
15 BuildRequires:  apache(EAPI)-devel >= 1.3.12
16 BuildRequires:  expat-devel
17 PreReq:         apache(EAPI) >= 1.3.12
18 Requires(post,preun):   %{apxs}
19 Requires(post,preun):   grep
20 Requires(preun):        fileutils
21 Provides:       %{arname}
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _pkglibdir      %(%{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 %description -l pl
38 Ten pakiet zamienia Twojego Apache w znienawidzony przez RIAA, ale
39 uwielbiany przez studentów serwer strumieni MP3. Mo¿e odtwarzaæ listê
40 plików, w kolejno¶ci lub losowo. Mo¿e byæ tak¿e u¿yty do buforowania
41 plików mp3 w pamiêci, pozwalaj±c serwerowi operowaæ wy³±cznie na
42 pamiêci. Baw siê dobrze; pliki mp3 nie s± za³±czone.
43
44 %build
45 ./configure
46
47 %{__make} APXS=%{apxs}
48
49 %install
50 rm -rf $RPM_BUILD_ROOT
51 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
52
53 install src/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
54 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
55
56 %clean
57 rm -rf $RPM_BUILD_ROOT
58
59 %post
60 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
61 if [ -f %{_sysconfdir}/httpd.conf ] && \
62         ! grep -q "^Include.*/%{arname}.conf" %{_sysconfdir}/httpd.conf; then
63                 echo "Include %{_sysconfdir}/%{arname}.conf" >> %{_sysconfdir}/httpd.conf
64 fi
65 if [ -f /var/lock/subsys/httpd ]; then
66         /etc/rc.d/init.d/httpd restart 1>&2
67 fi
68
69 %preun
70 if [ "$1" = "0" ]; then
71         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
72         umask 027
73         grep -E -v "^Include.*%{arname}.conf" %{_sysconfdir}/httpd.conf > \
74                 %{_sysconfdir}/httpd.conf.tmp
75         mv -f %{_sysconfdir}/httpd.conf.tmp %{_sysconfdir}/httpd.conf
76         if [ -f /var/lock/subsys/httpd ]; then
77                 /etc/rc.d/init.d/httpd restart 1>&2
78         fi
79 fi
80
81 %files
82 %defattr(644,root,root,755)
83 %doc README ChangeLog LICENSE faq.html support
84 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mod_mp3.conf
85 %attr(755,root,root) %{_pkglibdir}/mod_mp3.so
This page took 0.044609 seconds and 3 git commands to generate.