]>
Commit | Line | Data |
---|---|---|
38a329ae ER |
1 | # TODO |
2 | # - with mysql and pgsql? | |
f2fb9b0b | 3 | %define mod_name mp3 |
2e8b6ebd | 4 | %define apxs /usr/sbin/apxs1 |
f2fb9b0b | 5 | Summary: MP3 Apache module |
76b7f2d5 | 6 | Summary(pl.UTF-8): Moduł MP3 do Apache |
2e8b6ebd | 7 | Name: apache1-mod_%{mod_name} |
2e4922fd | 8 | Version: 0.40 |
1f38adc9 | 9 | Release: 4 |
16e1b4e1 | 10 | License: BSD |
f2fb9b0b | 11 | Group: Networking/Daemons |
2e8b6ebd | 12 | Source0: http://www.tangent.org/download/mod_%{mod_name}-%{version}.tar.gz |
2e4922fd | 13 | # Source0-md5: a36b25ee4db268df45a03231993e718d |
2e8b6ebd | 14 | Source1: %{name}.conf |
f2fb9b0b | 15 | URL: http://media.tangent.org/ |
e0bcbbfa | 16 | BuildRequires: apache1-devel >= 1.3.39 |
2e4922fd | 17 | BuildRequires: libghttp-devel |
700b5a6b | 18 | BuildRequires: rpmbuild(macros) >= 1.268 |
38a329ae ER |
19 | Requires(triggerpostun): %{apxs} |
20 | Requires(triggerpostun): grep | |
21 | Requires(triggerpostun): sed >= 4.0 | |
1f38adc9 | 22 | Requires: apache1(EAPI) |
700b5a6b | 23 | Obsoletes: apache-mod_mp3 <= 0.40 |
f2fb9b0b GS |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
38a329ae ER |
26 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
27 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
f2fb9b0b | 28 | |
f2fb9b0b GS |
29 | %description |
30 | This turns apache into your basic RIAA hating, but every college | |
6590e53d | 31 | student loving MP3 streaming server. It can play from a list of files, |
f2fb9b0b | 32 | either straight through or randomly. It can also be used to cache |
6590e53d | 33 | MP3's into memory and have the server operate entirely from memory. |
34 | Enjoy, groove, MP3s not included. | |
f2fb9b0b | 35 | |
a0e1de1f | 36 | %description -l pl.UTF-8 |
f4af974e | 37 | Ten pakiet zamienia Twojego Apache w znienawidzony przez RIAA, ale |
a0e1de1f JR |
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. | |
f4af974e | 42 | |
370deb90 | 43 | %prep |
2e8b6ebd | 44 | %setup -q -n mod_%{mod_name}-%{version} |
370deb90 | 45 | |
f2fb9b0b | 46 | %build |
38a329ae ER |
47 | ./configure \ |
48 | --with-apxs=%{apxs} \ | |
49 | %{?debug:--with-debug} | |
3a8b60a0 | 50 | |
2e4922fd JB |
51 | %{__make} \ |
52 | APXS=%{apxs} \ | |
49b74c43 | 53 | AINCLUDEDIR="-I$(%{apxs} -q INCLUDEDIR) $(%{apxs} -q CFLAGS) %{rpmcflags} -fPIC" |
f2fb9b0b GS |
54 | |
55 | %install | |
56 | rm -rf $RPM_BUILD_ROOT | |
38a329ae | 57 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} |
f2fb9b0b | 58 | |
c7c0bbef | 59 | install src/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} |
38a329ae | 60 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf |
f2fb9b0b | 61 | |
f2fb9b0b GS |
62 | %clean |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %post | |
700b5a6b | 66 | %service -q apache restart |
059cdc96 | 67 | |
3ffd9cc1 | 68 | %postun |
f2fb9b0b | 69 | if [ "$1" = "0" ]; then |
700b5a6b | 70 | %service -q apache restart |
f2fb9b0b GS |
71 | fi |
72 | ||
38a329ae | 73 | %triggerpostun -- %{name} < 0.40-2.1 |
927491ea | 74 | if grep -q '^Include conf\.d/\*\.conf' /etc/apache/apache.conf; then |
38a329ae ER |
75 | %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 |
76 | sed -i -e ' | |
77 | /^Include.*mod_%{mod_name}\.conf/d | |
78 | ' /etc/apache/apache.conf | |
79 | else | |
80 | # they're still using old apache.conf | |
81 | sed -i -e ' | |
82 | s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf, | |
83 | ' /etc/apache/apache.conf | |
84 | fi | |
700b5a6b | 85 | %service -q apache restart |
38a329ae | 86 | |
f2fb9b0b GS |
87 | %files |
88 | %defattr(644,root,root,755) | |
8a8beadd | 89 | %doc README ChangeLog LICENSE faq.html support CONTRIBUTORS TODO utils/* |
f0aa5796 | 90 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf |
f2fb9b0b | 91 | %attr(755,root,root) %{_pkglibdir}/mod_mp3.so |