]> git.pld-linux.org Git - packages/apache1-mod_become.git/blobdiff - apache1-mod_become.spec
- rel 3 (R: apache1(EAPI) instead of apache1)
[packages/apache1-mod_become.git] / apache1-mod_become.spec
index d5fe4ce87985f6eb051fedc987888018ad43ef98..9a9b0564e771d8f909d17474050e91df9fa9ed85 100644 (file)
@@ -1,60 +1,79 @@
 %define                mod_name        become
-%define        apxs            %{_sbindir}/apxs
+%define        apxs            /usr/sbin/apxs1
 Summary:       Apache module: Become Somebody
-Name:          apache-mod_%{mod_name}
+Summary(pl):   Modu³ Apache'a: stawanie siê kim¶
+Name:          apache1-mod_%{mod_name}
 Version:       1.3
-Release:       1
+Release:       3
 License:       ?
 Group:         Networking/Daemons
 Source0:       http://www.snert.com/Software/mod_become/mod_become103.tgz
 # Source0-md5: 7bb1607587687dabc711b3b1903947e5
 URL:           http://www.snert.com/Software/mod_become/
-BuildRequires: apache(EAPI)-devel
-Requires(post,preun):  %{apxs}
-Requires(post,preun):  grep
-Requires(preun):       fileutils
-Requires:      apache(EAPI)
+BuildRequires: %{apxs}
+BuildRequires: apache1-devel >= 1.3.33-2
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires(triggerpostun):       %{apxs}
+Requires:      apache1(EAPI)
+Obsoletes:     apache-mod_become <= 1.3
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
-%define         _sysconfdir     /etc/httpd
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
 
 %description
 This module enables the web server to take on the access rights of a
-user & group, so that ~users can make available files to the web
+user & group, so that users can make available files to the web
 without having to make them readable by the world on the local file
 system. This can be useful for sites with a large number of users who
 want to apply file access controls among themselves. This module can
 also be applied to virtual hosts, directories, and locations.
 
+%description -l pl
+Ten modu³ pozwala serwerowi WWW przej±æ prawa dostêpu u¿ytkownika i
+grupy, dziêki czemu u¿ytkownicy mog± udostêpniæ pliki na WWW bez
+czynienia ich globalnie czytelnymi w lokalnym systemie plików. Mo¿e to
+byæ przydatne na dla serwerów z du¿± liczb± u¿ytkowników, którzy chc±
+kontrolowaæ dostêp do plików miêdzy sob±. Ten modu³ mo¿e byæ u¿ywany
+tak¿e z serwerami wirtualnymi, katalogami i miejscami.
+
 %prep
 %setup -q -n mod_%{mod_name}-%{version}
 
 %build
 PATH=$PATH:%{_sbindir}
-%{__make} build-dynamic
+%{__make} build-dynamic \
+       APXS=%{apxs}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d}
 
 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
 
+echo '#LoadModule %{mod_name}_module   modules/mod_%{mod_name}.so' > \
+       $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-%{apxs} -e -a -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
+echo "mod_%{mod_name}: This module is not turned on by default; if you're sure,"
+echo "mod_%{mod_name}: uncomment the appropriate line in Apache's config file."
 
-%preun
+%postun
 if [ "$1" = "0" ]; then
+       %service -q apache restart
+fi
+
+%triggerpostun -- apache1-mod_%{mod_name} < 1.3-1.1
+# check that they're not using old apache.conf
+if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
        %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc CHANGES.txt LICENSE.txt SECURITY.txt index.shtml notes-conf.txt
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.02884 seconds and 4 git commands to generate.