[mod_auth_cas] update packaging (#803065)

jorton jorton at fedoraproject.org
Wed May 2 08:13:30 UTC 2012


commit 5d0c90136f6ccd21d4e0723e683e03fe66239879
Author: Joe Orton <jorton at redhat.com>
Date:   Wed May 2 09:13:20 2012 +0100

    update packaging (#803065)
    
    Resolves: rhbz#803065

 mod_auth_cas-1.0.8.1-fixbuild.patch |   12 ++++++++++++
 mod_auth_cas.spec                   |   32 ++++++++++++++++++++++++--------
 2 files changed, 36 insertions(+), 8 deletions(-)
---
diff --git a/mod_auth_cas-1.0.8.1-fixbuild.patch b/mod_auth_cas-1.0.8.1-fixbuild.patch
new file mode 100644
index 0000000..6fa5544
--- /dev/null
+++ b/mod_auth_cas-1.0.8.1-fixbuild.patch
@@ -0,0 +1,12 @@
+--- mod_auth_cas-1.0.8.1/Makefile.in.fixbuild
++++ mod_auth_cas-1.0.8.1/Makefile.in
+@@ -1,7 +1,7 @@
+-APXS_LIBEXECDIR:=$(shell /usr/bin/apxs2 -q LIBEXECDIR)
++APXS_LIBEXECDIR:=$(shell @APXS@ -q LIBEXECDIR)
+ 
+ all:
+-	@APXS@ -c src/mod_auth_cas.c
++	@APXS@ -c src/mod_auth_cas.c -lssl -lcrypto
+ 
+ install:
+ 	if test ! -d ${DESTDIR}${APXS_LIBEXECDIR}; then mkdir -p ${DESTDIR}${APXS_LIBEXECDIR}; fi
diff --git a/mod_auth_cas.spec b/mod_auth_cas.spec
index c924fa6..31aed52 100644
--- a/mod_auth_cas.spec
+++ b/mod_auth_cas.spec
@@ -1,6 +1,14 @@
+%{!?_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}}
+%{!?_httpd_moddir:    %{expand: %%global _httpd_moddir    %%{_libdir}/httpd/modules}}
+
+
 Name:           mod_auth_cas
 Version:        1.0.8.1
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Apache 2.0/2.2 compliant module that supports the CASv1 and CASv2 protocols
 
 Group:          System Environment/Daemons
@@ -15,6 +23,7 @@ URL:            http://www.ja-sig.org/wiki/display/CASC/mod_auth_cas
 Source0:        mod_auth_cas-1.0.8.1.tar.gz
 Source1:        auth_cas.conf
 
+Patch0:         mod_auth_cas-1.0.8.1-fixbuild.patch
 BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
 BuildRequires:  openssl-devel
@@ -29,20 +38,24 @@ and CASv2 protocols
 %prep
 %setup -q
 
+%patch0 -p1 -b .fixbuild
 
 %build
-%configure --with-apxs=%{_sbindir}/apxs
+%configure --with-apxs=%{_httpd_apxs}
 make %{?_smp_mflags}
 
 
 
 %install
 rm -rf %{buildroot}
-make install DESTDIR=%{buildroot}/%{_libdir}/httpd/modules/
-
-mkdir -p %{buildroot}/%{_sysconfdir}/httpd/conf.d
-install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d/auth_cas.conf
-
+make install DESTDIR=%{buildroot} LIBEXECDIR=%{_httpd_moddir}
+%if "%{_httpd_modconfdir}" == "%{_httpd_confdir}"
+# httpd <= 2.2.x
+install -Dp -m 644 %{SOURCE1} %{buildroot}%{_httpd_modconfdir}/auth_cas.conf
+%else
+# httpd >= 2.4.x
+install -Dp -m 644 %{SOURCE1} %{buildroot}%{_httpd_modconfdir}/10-auth_cas.conf
+%endif
 
 %clean
 rm -rf %{buildroot}
@@ -52,9 +65,12 @@ rm -rf %{buildroot}
 %defattr(-,root,root,-)
 %doc README
 %{_libdir}/httpd/modules/*.so
-%config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
+%config(noreplace) %{_httpd_modconfdir}/*.conf
 
 %changelog
+* Wed May  2 2012 Joe Orton <jorton at redhat.com> - 1.0.8.1-5
+- update packaging (#803065)
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.8.1-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list