]> git.pld-linux.org Git - packages/apache1-mod_mp3.git/blob - apache1-mod_mp3.spec
131148642a0684a3ac770d701399a110812175f4
[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.40
8 Release:        1
9 License:        BSD
10 Group:          Networking/Daemons
11 Source0:        http://software.tangent.org/download/%{arname}-%{version}.tar.gz
12 # Source0-md5:  a36b25ee4db268df45a03231993e718d
13 Source1:        %{arname}.conf
14 URL:            http://media.tangent.org/
15 BuildRequires:  %{apxs}
16 BuildRequires:  apache(EAPI)-devel >= 1.3.12
17 BuildRequires:  libghttp-devel
18 PreReq:         apache(EAPI) >= 1.3.12
19 Requires(post,preun):   %{apxs}
20 Requires(post,preun):   grep
21 Requires(preun):        fileutils
22 Provides:       %{arname}
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
26 %define         _sysconfdir     /etc/httpd
27
28 %description
29 This turns apache into your basic RIAA hating, but every college
30 student loving mp3 streaming server. It can play from a list of files,
31 either straight through or randomly. It can also be used to cache
32 mp3's into memory and have the server operate entirely from memory.
33 Enjoy, groove, mp3s not included.
34
35 %description -l pl
36 Ten pakiet zamienia Twojego Apache w znienawidzony przez RIAA, ale
37 uwielbiany przez studentów serwer strumieni MP3. Mo¿e odtwarzaæ listê
38 plików, w kolejno¶ci lub losowo. Mo¿e byæ tak¿e u¿yty do buforowania
39 plików mp3 w pamiêci, pozwalaj±c serwerowi operowaæ wy³±cznie na
40 pamiêci. Baw siê dobrze; pliki mp3 nie s± za³±czone.
41
42 %prep
43 %setup -q -n %{arname}-%{version}
44
45 %build
46 ./configure
47
48 %{__make} \
49         APXS=%{apxs} \
50         ACINCLUDEDIR="-I`%{apxs} -q INCLUDEDIR` `%{apxs} -q CFLAGS` %{rpmcflags}"
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
55
56 install src/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
57 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
58
59 %clean
60 rm -rf $RPM_BUILD_ROOT
61
62 %post
63 %{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
64 if [ -f %{_sysconfdir}/httpd.conf ] && \
65         ! grep -q "^Include.*/%{arname}.conf" %{_sysconfdir}/httpd.conf; then
66                 echo "Include %{_sysconfdir}/%{arname}.conf" >> %{_sysconfdir}/httpd.conf
67 fi
68 if [ -f /var/lock/subsys/httpd ]; then
69         /etc/rc.d/init.d/httpd restart 1>&2
70 fi
71
72 %preun
73 if [ "$1" = "0" ]; then
74         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
75         umask 027
76         grep -E -v "^Include.*%{arname}.conf" %{_sysconfdir}/httpd.conf > \
77                 %{_sysconfdir}/httpd.conf.tmp
78         mv -f %{_sysconfdir}/httpd.conf.tmp %{_sysconfdir}/httpd.conf
79         if [ -f /var/lock/subsys/httpd ]; then
80                 /etc/rc.d/init.d/httpd restart 1>&2
81         fi
82 fi
83
84 %files
85 %defattr(644,root,root,755)
86 %doc README ChangeLog LICENSE faq.html support
87 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mod_mp3.conf
88 %attr(755,root,root) %{_pkglibdir}/mod_mp3.so
This page took 0.032587 seconds and 2 git commands to generate.