]> git.pld-linux.org Git - packages/apache1-mod_mp3.git/blob - apache1-mod_mp3.spec
667950289dce0164dab8dd9b60cf014f7193bb03
[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.UTF-8):      Moduł MP3 do Apache
7 Name:           apache1-mod_%{mod_name}
8 Version:        0.40
9 Release:        4
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 BuildRequires:  rpmbuild(macros) >= 1.268
20 Requires(triggerpostun):        %{apxs}
21 Requires(triggerpostun):        grep
22 Requires(triggerpostun):        sed >= 4.0
23 Requires:       apache1(EAPI)
24 Obsoletes:      apache-mod_mp3 <= 0.40
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
28 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
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.UTF-8
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 %prep
45 %setup -q -n mod_%{mod_name}-%{version}
46
47 %build
48 ./configure \
49         --with-apxs=%{apxs} \
50         %{?debug:--with-debug}
51
52 %{__make} \
53         APXS=%{apxs} \
54         AINCLUDEDIR="-I$(%{apxs} -q INCLUDEDIR) $(%{apxs} -q CFLAGS) %{rpmcflags} -fPIC"
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
59
60 install src/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
61 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
62
63 %clean
64 rm -rf $RPM_BUILD_ROOT
65
66 %post
67 %service -q apache restart
68
69 %postun
70 if [ "$1" = "0" ]; then
71         %service -q apache restart
72 fi
73
74 %triggerpostun -- %{name} < 0.40-2.1
75 if grep -q '^Include conf\.d/\*\.conf' /etc/apache/apache.conf; then
76         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
77         sed -i -e '
78                 /^Include.*mod_%{mod_name}\.conf/d
79         ' /etc/apache/apache.conf
80 else
81         # they're still using old apache.conf
82         sed -i -e '
83                 s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf,
84         ' /etc/apache/apache.conf
85 fi
86 %service -q apache restart
87
88 %files
89 %defattr(644,root,root,755)
90 %doc README ChangeLog LICENSE faq.html support CONTRIBUTORS TODO utils/*
91 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
92 %attr(755,root,root) %{_pkglibdir}/mod_mp3.so
This page took 0.081417 seconds and 2 git commands to generate.