X-Git-Url: http://git.pld-linux.org/?p=packages%2Fapache1-mod_become.git;a=blobdiff_plain;f=apache1-mod_become.spec;h=9a9b0564e771d8f909d17474050e91df9fa9ed85;hp=1721dc97b9e1c59329b3258487f4dcd6259120fa;hb=076f2385951f6dd81077ea2f26b9e5673ad0330f;hpb=28abe21dd3cf01b766330771f1d5fa9f7130ad46 diff --git a/apache1-mod_become.spec b/apache1-mod_become.spec index 1721dc9..9a9b056 100644 --- a/apache1-mod_become.spec +++ b/apache1-mod_become.spec @@ -1,24 +1,25 @@ %define mod_name become -%define apxs %{_sbindir}/apxs +%define apxs /usr/sbin/apxs1 Summary: Apache module: Become Somebody Summary(pl): Modu³ Apache'a: stawanie siê kim¶ -Name: apache-mod_%{mod_name} +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 @@ -41,29 +42,38 @@ tak %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}/*