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