]> git.pld-linux.org Git - packages/apache1-mod_roaming.git/blobdiff - apache1-mod_roaming.spec
- adapterized (sorted %verify attrs)
[packages/apache1-mod_roaming.git] / apache1-mod_roaming.spec
index 17fabd904cee4da9efcd94d6b028e973a18f6588..9d22badd6d2652daeb3a3ab23dc0e34306dea1bc 100644 (file)
@@ -1,26 +1,40 @@
-%define        apxs    /usr/sbin/apxs
+# TODO
+# - mod_roaming.conf points to htpasswd file in /var, shouldn't it be in /etc
+#   (and don't forget trigger to move old possibly existing htpasswd in /var when fixing it)
+%define                mod_name        roaming
+%define        apxs            /usr/sbin/apxs1
 Summary:       Enables Netscape Communicator roaming profiles with Apache
 Summary(cs):   Modul podpory roamingových profilù Netscape Communicatora pro Apache
 Summary(da):   Et apachemodul som lader webtjeneren håndtere profiler for Netscape Communicator
 Summary(de):   Aktiviert den Netscape Communicator für das Profilroaming mit Apache
+Summary(es):   Módulo de acceso roaming para navegación en red para Apache
 Summary(fr):   Permet l'itinérance de profils Netscape Communicator avec Apache
 Summary(it):   Abilita i profili di roaming di Netscape Communicator con Apache
-Summary(no):   En apachemodul som lar webtjeneren håndtere profiler for Netscape Communicator
+Summary(nb):   En apachemodul som lar webtjeneren håndtere profiler for Netscape Communicator
 Summary(pl):   Modu³ Apache obs³uguj±cy przechodnie profile Netscape Communicatora
+Summary(pt_BR):        Modulo "Netscape Roaming Access" para o Apache
 Summary(sk):   WWW prehliadaè Netscape Navigator
 Summary(sv):   Möjliggör Netscape Communicator reseprofiler med Apache
-Name:          mod_roaming
+Name:          apache1-mod_%{mod_name}
 Version:       1.0.2
-Release:       6
+Release:       2
 License:       BSD-like
 Group:         Networking/Daemons
-Source0:       http://www.klomp.org/mod_roaming/%{name}-%{version}.tar.gz
-Source1:       roaming.conf
+Source0:       http://www.klomp.org/mod_roaming/mod_%{mod_name}-%{version}.tar.gz
+# Source0-md5: 226c0ce2daf276072079590b5560f022
+Source1:       %{name}.conf
 URL:           http://www.klomp.org/mod_roaming/
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-BuildRequires: apache-devel
 BuildRequires: %{apxs}
-Requires:      webserver
+BuildRequires: apache1-devel >= 1.3.33-2
+Requires(triggerpostun):       %{apxs}
+Requires(triggerpostun):       grep
+Requires(triggerpostun):       sed >= 4.0
+Requires:      apache1 >= 1.3.33-2
+Obsoletes:     apache-mod_roaming <= %{version}
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
 
 %description
 With mod_roaming you can use your Apache web server as a Netscape
@@ -84,6 +98,14 @@ serwerze, dzi
 ustawieñ z dowolnego Netscape Communicatora >= 4.5, który ma dostêp do
 serwera.
 
+%description -l pt_BR
+Com o mod_roaming você pode usar o Apache como um servidor de "Roaming
+Access" para o Netscape. Isto permite que você armazene preferências,
+bookmarks, livros de acessos, cookies, etc, do Netscape Communicator
+4.5 no servidor, sendo que com isso, você pode usar as mesmas
+configurações para qualquer Netscape 4.5 que possa acessar este
+servidor.
+
 %description -l sv
 Med mod_roaming kan du använda din webbserver Apache som en server för
 Netscape reseprofiler. Detta låter dig lagra dina Netscape
@@ -92,26 +114,52 @@ servern s
 Netscape Communicator 4.5 som kan komma åt servern.
 
 %prep
-%setup -q
+%setup -q -n mod_%{mod_name}-%{version}
 
 %build
 %{apxs} -c -o mod_roaming.so -lc mod_roaming.c
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_libdir}/apache,%{_sysconfdir}/httpd,%{_var}/lib/mod_roaming}
-
-install mod_roaming.so $RPM_BUILD_ROOT%{_libdir}/apache
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d,%{_var}/lib/mod_roaming}
 
-gzip -9nf CHANGES INSTALL LICENSE README
+install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+if [ -f /var/lock/subsys/apache ]; then
+       /etc/rc.d/init.d/apache restart 1>&2
+fi
+
+%postun
+if [ "$1" = "0" ]; then
+       if [ -f /var/lock/subsys/apache ]; then
+               /etc/rc.d/init.d/apache restart 1>&2
+       fi
+fi
+
+%triggerpostun -- %{name} < 1.0.2-1.1
+if grep -q '^Include conf\.d/\*\.conf' /etc/apache/apache.conf; then
+       %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
+       sed -i -e '
+               /^Include.*mod_%{mod_name}\.conf/d
+       ' /etc/apache/apache.conf
+else
+       # they're still using old apache.conf
+       sed -i -e '
+               s,^Include.*mod_%{mod_name}\.conf,Include %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf,
+       ' /etc/apache/apache.conf
+fi
+if [ -f /var/lock/subsys/apache ]; then
+       /etc/rc.d/init.d/apache restart 1>&2
+fi
+
 %files
 %defattr(644,root,root,755)
-%doc CHANGES* INSTALL* LICENSE* README*
-%attr(755,root,root) %{_libdir}/apache/mod_roaming.so
-%attr(660,root,http) %dir %{_var}/lib/mod_roaming
-%config %{_sysconfdir}/httpd/roaming.conf
+%doc CHANGES INSTALL LICENSE README
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
+%attr(755,root,root) %{_pkglibdir}/*
+%attr(770,root,http) %dir %{_var}/lib/mod_roaming
This page took 0.087099 seconds and 4 git commands to generate.