From bd102ff4002addf80f411790247673ea969bd10e Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Apr 18 2012 14:55:12 +0000 Subject: update for httpd 2.4.x - drop httpd restart on post/postun --- diff --git a/libapreq2.spec b/libapreq2.spec index 1c8b200..510d4e6 100644 --- a/libapreq2.spec +++ b/libapreq2.spec @@ -1,8 +1,12 @@ -%{!?apxs: %{expand:%%define apxs %{_sbindir}/apxs}} +%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}} +%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel)}} +%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}} +# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4 +%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}} Name: libapreq2 Version: 2.13 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Apache HTTP request library Group: System Environment/Libraries @@ -25,7 +29,7 @@ BuildRequires: perl(ExtUtils::XSBuilder) BuildRequires: perl(Apache::Test) BuildRequires: perl-devel BuildRequires: mod_perl-devel >= 2.0.0-0.rc5 -Requires: httpd-mmn = %(cat $(%{apxs} -q INCLUDEDIR)/.mmn || echo ERROR) +Requires: httpd-mmn = %{_httpd_mmn} Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig Provides: libapreq = %{version}-%{release} @@ -101,7 +105,7 @@ CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ %configure \ --disable-dependency-tracking \ --disable-static \ - --with-apache2-apxs=%{apxs} \ + --with-apache2-apxs=%{_httpd_apxs} \ --enable-perl-glue \ --with-mm-opts=INSTALLDIRS=vendor make %{?_smp_mflags} @@ -120,7 +124,7 @@ mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig install -m 644 %{name}.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig PKG_CONFIG_PATH=$RPM_BUILD_ROOT%{_libdir}/pkgconfig make install DESTDIR=$RPM_BUILD_ROOT install -Dpm 644 %{SOURCE1} \ - $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/apreq.conf + $RPM_BUILD_ROOT%{_httpd_modconfdir}/apreq.conf cp -pR docs/html __docs ; rm __docs/installdox find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';' @@ -137,19 +141,14 @@ chmod -R u+w $RPM_BUILD_ROOT/* rm -rf $RPM_BUILD_ROOT -%post -/sbin/ldconfig -[ $1 -eq 1 ] && %{_initrddir}/httpd condrestart >/dev/null || : - -%postun -/sbin/ldconfig -%{_initrddir}/httpd condrestart >/dev/null || : +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc CHANGES LICENSE NOTICE README -%config(noreplace) %{_sysconfdir}/httpd/conf.d/apreq.conf +%config(noreplace) %{_httpd_modconfdir}/apreq.conf %{_libdir}/libapreq2.so.* %{_libdir}/httpd/modules/mod_apreq2.so @@ -172,6 +171,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Apr 18 2012 Joe Orton - 2.13-8 +- update for httpd 2.4.x +- drop httpd restart on post/postun + * Wed Mar 28 2012 Bojan Smojver - 2.13-7 - rebuild for Apache 2.4.1