summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pazdziora <jpazdziora@redhat.com>2014-06-25 10:26:11 +0200
committerJan Pazdziora <jpazdziora@redhat.com>2014-06-27 16:10:44 +0200
commit64f75e30b41406debbff5633b17708c4d1993d90 (patch)
treecb621a12f59eaf3032aced9b733a2f382e8deeed
parente2ab65bcd478e9c8449591f4dbd86aaa11ebfb3d (diff)
downloadmod_lookup_identity-64f75e30b41406debbff5633b17708c4d1993d90.tar.gz
mod_lookup_identity-64f75e30b41406debbff5633b17708c4d1993d90.tar.xz
mod_lookup_identity-64f75e30b41406debbff5633b17708c4d1993d90.zip
For Apache 2.4, separate module loading from configuration.
-rw-r--r--lookup_identity.conf2
-rw-r--r--lookup_identity.module3
-rw-r--r--mod_lookup_identity.spec17
3 files changed, 14 insertions, 8 deletions
diff --git a/lookup_identity.conf b/lookup_identity.conf
index 2dc46d3..d7f9740 100644
--- a/lookup_identity.conf
+++ b/lookup_identity.conf
@@ -1,6 +1,4 @@
-# LoadModule lookup_identity_module modules/mod_lookup_identity.so
-#
# <Location /login>
# LookupUserAttr mail REMOTE_USER_EMAIL " "
# LookupUserAttr givenname REMOTE_USER_FIRSTNAME
diff --git a/lookup_identity.module b/lookup_identity.module
new file mode 100644
index 0000000..d19aaa8
--- /dev/null
+++ b/lookup_identity.module
@@ -0,0 +1,3 @@
+
+# LoadModule lookup_identity_module modules/mod_lookup_identity.so
+
diff --git a/mod_lookup_identity.spec b/mod_lookup_identity.spec
index ec9ad33..fc5f853 100644
--- a/mod_lookup_identity.spec
+++ b/mod_lookup_identity.spec
@@ -35,6 +35,14 @@ Use of REMOTE_USER_* environment variables is recommended.
%build
%{_httpd_apxs} -c -Wc,"%{optflags} -Wall -pedantic -std=c99 $(pkg-config --cflags dbus-1)" $(pkg-config --libs dbus-1) mod_lookup_identity.c
+%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
+echo > lookup_identity.confx
+echo "# Load the module in %{_httpd_modconfdir}/55-lookup_identity.conf" >> lookup_identity.confx
+cat lookup_identity.conf >> lookup_identity.confx
+%else
+cat lookup_identity.module > lookup_identity.confx
+cat lookup_identity.conf >> lookup_identity.confx
+%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -42,19 +50,16 @@ install -Dm 755 .libs/mod_lookup_identity.so $RPM_BUILD_ROOT%{_httpd_moddir}/mod
%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
# httpd >= 2.4.x
-install -Dp -m 0644 lookup_identity.conf $RPM_BUILD_ROOT%{_httpd_modconfdir}/55-lookup_identity.conf
-%else
-# httpd <= 2.2.x
-install -Dp -m 0644 lookup_identity.conf $RPM_BUILD_ROOT%{_httpd_confdir}/lookup_identity.conf
+install -Dp -m 0644 lookup_identity.module $RPM_BUILD_ROOT%{_httpd_modconfdir}/55-lookup_identity.conf
%endif
+install -Dp -m 0644 lookup_identity.confx $RPM_BUILD_ROOT%{_httpd_confdir}/lookup_identity.conf
%files
%doc README LICENSE
%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
%config(noreplace) %{_httpd_modconfdir}/55-lookup_identity.conf
-%else
-%config(noreplace) %{_httpd_confdir}/lookup_identity.conf
%endif
+%config(noreplace) %{_httpd_confdir}/lookup_identity.conf
%{_httpd_moddir}/*.so
%changelog