]> git.pld-linux.org Git - packages/apache1-mod_mp3.git/blob - apache1-mod_mp3.spec
fc75ca3508041ce8c599c82521c656130a4c4e58
[packages/apache1-mod_mp3.git] / apache1-mod_mp3.spec
1 # TODO
2 #  - with mysql and pgsql?
3 %define         mod_name        mp3
4 %define         apxs            /usr/sbin/apxs1
5 Summary:        MP3 Apache module
6 Summary(pl):    Modu³ MP3 do Apache
7 Name:           apache1-mod_%{mod_name}
8 Version:        0.40
9 Release:        2.2
10 License:        BSD
11 Group:          Networking/Daemons
12 Source0:        http://www.tangent.org/download/mod_%{mod_name}-%{version}.tar.gz
13 # Source0-md5:  a36b25ee4db268df45a03231993e718d
14 Source1:        %{name}.conf
15 URL:            http://media.tangent.org/
16 BuildRequires:  %{apxs}
17 BuildRequires:  apache1-devel >= 1.3.33-2
18 BuildRequires:  libghttp-devel
19 Requires:       apache1 >= 1.3.33-2
20 Requires(triggerpostun):        %{apxs}
21 Requires(triggerpostun):        grep
22 Requires(triggerpostun):        sed >= 4.0
23 Obsoletes:      apache-mod_%{mod_name} <= %{version}
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
27 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
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 %description -l pl
37 Ten pakiet zamienia Twojego Apache w znienawidzony przez RIAA, ale
38 uwielbiany przez studentów serwer strumieni MP3. Mo¿e odtwarzaæ listê
39 plików, w kolejno¶ci lub losowo. Mo¿e byæ tak¿e u¿yty do buforowania
40 plików MP3 w pamiêci, pozwalaj±c serwerowi operowaæ wy³±cznie na
41 pamiêci. Baw siê dobrze; pliki MP3 nie s± za³±czone.
42
43 %prep
44 %setup -q -n mod_%{mod_name}-%{version}
45
46 %build
47 ./configure \
48         --with-apxs=%{apxs} \
49         %{?debug:--with-debug}
50
51 %{__make} \
52         APXS=%{apxs} \
53         ACINCLUDEDIR="-I$(%{apxs} -q INCLUDEDIR) $(%{apxs} -q CFLAGS) %{rpmcflags} -fPIC"
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
58
59 install src/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
60 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %post
66 if [ -f /var/lock/subsys/apache ]; then
67         /etc/rc.d/init.d/apache restart 1>&2
68 fi
69
70 %preun
71 if [ "$1" = "0" ]; then
72         if [ -f /var/lock/subsys/apache ]; then
73                 /etc/rc.d/init.d/apache restart 1>&2
74         fi
75 fi
76
77 %triggerpostun -- %{name} < 0.40-2.1
78 if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
79         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
80         sed -i -e '
81                 /^Include.*mod_%{mod_name}\.conf/d
82         ' /etc/apache/apache.conf
83 else
84         # they're still using old apache.conf
85         sed -i -e '
86                 s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf,
87         ' /etc/apache/apache.conf
88 fi
89 if [ -f /var/lock/subsys/apache ]; then
90         /etc/rc.d/init.d/apache restart 1>&2
91 fi
92
93 %files
94 %defattr(644,root,root,755)
95 %doc README ChangeLog LICENSE faq.html support CONTRIBUTORS TODO utils/*
96 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
97 %attr(755,root,root) %{_pkglibdir}/mod_mp3.so
This page took 0.073093 seconds and 2 git commands to generate.