]> git.pld-linux.org Git - packages/apache1-mod_mp3.git/blobdiff - apache1-mod_mp3.spec
- "MP3" unification
[packages/apache1-mod_mp3.git] / apache1-mod_mp3.spec
index 01af0bd84fc6b868b9a98771e46e7650ba2d1314..2898c9f46afe0a9870efc9c957b28a14d746f26c 100644 (file)
@@ -1,77 +1,87 @@
-%define                arname          mod_mp3
 %define                mod_name        mp3
+%define        apxs            /usr/sbin/apxs1
 Summary:       MP3 Apache module
 Summary(pl):   Modu³ MP3 do Apache
-Name:          apache-mod_mp3
-Version:       0.25
-Release:       1
-License:       Distributable
+Name:          apache1-mod_%{mod_name}
+Version:       0.40
+Release:       2
+License:       BSD
 Group:         Networking/Daemons
-Group(de):     Netzwerkwesen/Server
-Group(pl):     Sieciowe/Serwery
-Source0:       ftp://ftp.tangent.org/pub/apache/%{arname}-%{version}.tar.gz
-Source1:       %{arname}.conf
+Source0:       http://www.tangent.org/download/mod_%{mod_name}-%{version}.tar.gz
+# Source0-md5: a36b25ee4db268df45a03231993e718d
+Source1:       %{name}.conf
 URL:           http://media.tangent.org/
-Requires:      apache >= 1.3.12
-Prereq:                grep
-Prereq:         apache(EAPI) >= 1.3.12
-Provides:      %{arname}
-BuildRequires: apache(EAPI) >= 1.3.12
-BuildRequires: apache(EAPI)-devel >= 1.3.12
-BuildRequires: expat-devel
+BuildRequires: %{apxs}
+BuildRequires: apache1-devel >= 1.3.12
+BuildRequires: libghttp-devel
+PreReq:                apache1 >= 1.3.12
+Requires(post,preun):  %{apxs}
+Requires(post,preun):  grep
+Requires(preun):       fileutils
+Obsoletes:     apache-mod_%{mod_name} <= %{version}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define         _pkglibdir      %(%{_sbindir}/apxs -q LIBEXECDIR)
-%define         _sysconfdir     /etc/httpd
-
-%prep
-%setup -q -n %{arname}-%{version}
+%define        _pkglibdir      %(%{apxs} -q LIBEXECDIR)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR)
 
 %description
 This turns apache into your basic RIAA hating, but every college
-student loving mp3 streaming server. It can play from a list of files,
+student loving MP3 streaming server. It can play from a list of files,
 either straight through or randomly. It can also be used to cache
-mp3's into memory and have the server operate entirely from memory.
-Enjoy, groove, mp3s not included.
+MP3's into memory and have the server operate entirely from memory.
+Enjoy, groove, MP3s not included.
+
+%description -l pl
+Ten pakiet zamienia Twojego Apache w znienawidzony przez RIAA, ale
+uwielbiany przez studentów serwer strumieni MP3. Mo¿e odtwarzaæ listê
+plików, w kolejno¶ci lub losowo. Mo¿e byæ tak¿e u¿yty do buforowania
+plików MP3 w pamiêci, pozwalaj±c serwerowi operowaæ wy³±cznie na
+pamiêci. Baw siê dobrze; pliki MP3 nie s± za³±czone.
+
+%prep
+%setup -q -n mod_%{mod_name}-%{version}
 
 %build
-%{__make} APXS=/usr/sbin/apxs
+./configure
+
+%{__make} \
+       APXS=%{apxs} \
+       ACINCLUDEDIR="-I`%{apxs} -q INCLUDEDIR` `%{apxs} -q CFLAGS` %{rpmcflags} -fPIC"
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
 
-install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+install src/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
 
-gzip -9nf README ChangeLog LICENSE
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-/usr/sbin/apxs -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
-if [ -f %{_sysconfdir}/httpd.conf ] && \
-       ! grep -q "^Include.*/%{arname}.conf" %{_sysconfdir}/httpd.conf; then
-               echo "Include %{_sysconfdir}/%{arname}.conf" >> %{_sysconfdir}/httpd.conf
+%{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
+if [ -f %{_sysconfdir}/apache.conf ] && \
+       ! grep -q "^Include.*/mod_%{mod_name}.conf" %{_sysconfdir}/apache.conf; then
+               echo "Include %{_sysconfdir}/mod_%{mod_name}.conf" >> %{_sysconfdir}/apache.conf
 fi
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
+if [ -f /var/lock/subsys/apache ]; then
+       /etc/rc.d/init.d/apache restart 1>&2
 fi
-       
+
 %preun
 if [ "$1" = "0" ]; then
-       /usr/sbin/apxs -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
-       grep -E -v "^Include.*%{arname}.conf" %{_sysconfdir}/httpd.conf > \
-       %{_sysconfdir}/httpd.conf.tmp
-       mv -f %{_sysconfdir}/httpd.conf.tmp %{_sysconfdir}/httpd.conf
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
+       %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
+       umask 027
+       grep -E -v "^Include.*mod_%{mod_name}.conf" %{_sysconfdir}/apache.conf > \
+               %{_sysconfdir}/apache.conf.tmp
+       mv -f %{_sysconfdir}/apache.conf.tmp %{_sysconfdir}/apache.conf
+       if [ -f /var/lock/subsys/apache ]; then
+               /etc/rc.d/init.d/apache restart 1>&2
        fi
 fi
 
 %files
 %defattr(644,root,root,755)
-%doc *.gz faq.html
-%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mod_mp3.conf
+%doc README ChangeLog LICENSE faq.html support CONTRIBUTORS TODO utils/*
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.conf
 %attr(755,root,root) %{_pkglibdir}/mod_mp3.so
This page took 0.057359 seconds and 4 git commands to generate.