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