summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2008-01-29 18:15:52 +0000
committerBenedikt Boehm <hollow@gentoo.org>2008-01-29 18:15:52 +0000
commitfb645c911a0bd15739e3edc0ccb5eea91caab6ba (patch)
treeaac0302c2741d82223003660398c4edb5f32f089 /www-apache/mod_vhost_ldap
parentalpha/ia64/sparc stable wrt #207634 (diff)
downloadhistorical-fb645c911a0bd15739e3edc0ccb5eea91caab6ba.tar.gz
historical-fb645c911a0bd15739e3edc0ccb5eea91caab6ba.tar.bz2
historical-fb645c911a0bd15739e3edc0ccb5eea91caab6ba.zip
add apache 2.2 compatibility patch; fix depend.apache usage wrt #208033
Package-Manager: portage-2.1.4
Diffstat (limited to 'www-apache/mod_vhost_ldap')
-rw-r--r--www-apache/mod_vhost_ldap/ChangeLog11
-rw-r--r--www-apache/mod_vhost_ldap/Manifest43
-rw-r--r--www-apache/mod_vhost_ldap/files/99_mod_vhost_ldap.conf16
-rw-r--r--www-apache/mod_vhost_ldap/files/digest-mod_vhost_ldap-1.0.0-r13
-rw-r--r--www-apache/mod_vhost_ldap/files/mod_vhost_ldap-1.0.0-apache22.patch158
-rw-r--r--www-apache/mod_vhost_ldap/mod_vhost_ldap-1.0.0-r1.ebuild64
-rw-r--r--www-apache/mod_vhost_ldap/mod_vhost_ldap-1.0.0.ebuild6
7 files changed, 271 insertions, 30 deletions
diff --git a/www-apache/mod_vhost_ldap/ChangeLog b/www-apache/mod_vhost_ldap/ChangeLog
index 2d4828d7e223..a3c26cd902e2 100644
--- a/www-apache/mod_vhost_ldap/ChangeLog
+++ b/www-apache/mod_vhost_ldap/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for www-apache/mod_vhost_ldap
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_vhost_ldap/ChangeLog,v 1.4 2007/07/29 17:11:08 phreak Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_vhost_ldap/ChangeLog,v 1.5 2008/01/29 18:15:51 hollow Exp $
+
+*mod_vhost_ldap-1.0.0-r1 (29 Jan 2008)
+
+ 29 Jan 2008; Benedikt Böhm <hollow@gentoo.org>
+ files/99_mod_vhost_ldap.conf, +files/mod_vhost_ldap-1.0.0-apache22.patch,
+ mod_vhost_ldap-1.0.0.ebuild, +mod_vhost_ldap-1.0.0-r1.ebuild:
+ add apache 2.2 compatibility patch; fix depend.apache usage wrt #208033
29 Jul 2007; Christian Heim <phreak@gentoo.org>
mod_vhost_ldap-1.0.0.ebuild:
diff --git a/www-apache/mod_vhost_ldap/Manifest b/www-apache/mod_vhost_ldap/Manifest
index 633a539f1ff7..74fe1e8d3ef0 100644
--- a/www-apache/mod_vhost_ldap/Manifest
+++ b/www-apache/mod_vhost_ldap/Manifest
@@ -1,19 +1,27 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-AUX 99_mod_vhost_ldap.conf 354 RMD160 8c0596ac410f00c2ea6305ad674c867a2d5e465e SHA1 1f171a9bdd842bb4d9a5086f5a7c4c74c74533f6 SHA256 b52fe0dd41801e25b84aed5ba406402e9934bc19612f14d2d07001ea338f7126
-MD5 02f8594edec937fb5c5cf8ac06ad1952 files/99_mod_vhost_ldap.conf 354
-RMD160 8c0596ac410f00c2ea6305ad674c867a2d5e465e files/99_mod_vhost_ldap.conf 354
-SHA256 b52fe0dd41801e25b84aed5ba406402e9934bc19612f14d2d07001ea338f7126 files/99_mod_vhost_ldap.conf 354
+AUX 99_mod_vhost_ldap.conf 274 RMD160 ee739d5165cf05b479ddf5c32587657a80ff1798 SHA1 feb6409f2bec59e6a6d8198578ee7a300c05206f SHA256 78d719363e3be8f17e83ef3af56fc5fb58e25a13d28e60c78ccddbcfee66fd46
+MD5 8d78a27621ce64bc35d0512b71cb6c1c files/99_mod_vhost_ldap.conf 274
+RMD160 ee739d5165cf05b479ddf5c32587657a80ff1798 files/99_mod_vhost_ldap.conf 274
+SHA256 78d719363e3be8f17e83ef3af56fc5fb58e25a13d28e60c78ccddbcfee66fd46 files/99_mod_vhost_ldap.conf 274
+AUX mod_vhost_ldap-1.0.0-apache22.patch 6251 RMD160 743379f34b16f76e9bffd13e9b4af8d7ef666724 SHA1 f75401c66ff83c4532cac6d00447fd0366f0312f SHA256 3a921212c905a5e2139ecf9f2c5a05a985a8e4af83b8730fa05b04b174a052c2
+MD5 4200ea57e08d6951ca6f43f784407ab9 files/mod_vhost_ldap-1.0.0-apache22.patch 6251
+RMD160 743379f34b16f76e9bffd13e9b4af8d7ef666724 files/mod_vhost_ldap-1.0.0-apache22.patch 6251
+SHA256 3a921212c905a5e2139ecf9f2c5a05a985a8e4af83b8730fa05b04b174a052c2 files/mod_vhost_ldap-1.0.0-apache22.patch 6251
DIST mod_vhost_ldap-1.0.0.tar.bz2 7862 RMD160 da38548074175faab2c232e1e7b5cb88610405b1 SHA1 9e25626265707512798f134d2c371bf6ba6136da SHA256 e14713d736e79ca7760b8ca8bd32fd01e97ef0f14396bdea9373d7bfd8dd1f87
-EBUILD mod_vhost_ldap-1.0.0.ebuild 1679 RMD160 11c79a269b7445f73b0e2abe947fd4b22a0d1592 SHA1 cff7fb558e8737dc78ee713b206a1cecfd1f3f91 SHA256 64c01cee985243a37112236953d43e4f69c2442415c0c94db7d6f973c85c4278
-MD5 c7895ac24ecccbe440502f8c8489cf9a mod_vhost_ldap-1.0.0.ebuild 1679
-RMD160 11c79a269b7445f73b0e2abe947fd4b22a0d1592 mod_vhost_ldap-1.0.0.ebuild 1679
-SHA256 64c01cee985243a37112236953d43e4f69c2442415c0c94db7d6f973c85c4278 mod_vhost_ldap-1.0.0.ebuild 1679
-MISC ChangeLog 862 RMD160 175df413c4ab9705ec925b86a4d79d1b5e1fe7f1 SHA1 c325cbaed977af7e23ee71b4f74fee16cc57ff1a SHA256 eeba2d11b2c613457cf33ded7a122feafb93110f0a8b4f76d2a33008d2d6e491
-MD5 319889893c81cb28a5e2d2ad5b4e9fe3 ChangeLog 862
-RMD160 175df413c4ab9705ec925b86a4d79d1b5e1fe7f1 ChangeLog 862
-SHA256 eeba2d11b2c613457cf33ded7a122feafb93110f0a8b4f76d2a33008d2d6e491 ChangeLog 862
+EBUILD mod_vhost_ldap-1.0.0-r1.ebuild 1767 RMD160 3cfab0fb6cf004031d99bcfcdce8fd8184de970d SHA1 0f3a3fcdbbd2ea000514769e7da4a774fd68a12c SHA256 bd13dab00911b38a38e4771d81dd089fae2f2a40dae6f301483a378333e166fe
+MD5 0f6b92e71d63441490517781bd1d6025 mod_vhost_ldap-1.0.0-r1.ebuild 1767
+RMD160 3cfab0fb6cf004031d99bcfcdce8fd8184de970d mod_vhost_ldap-1.0.0-r1.ebuild 1767
+SHA256 bd13dab00911b38a38e4771d81dd089fae2f2a40dae6f301483a378333e166fe mod_vhost_ldap-1.0.0-r1.ebuild 1767
+EBUILD mod_vhost_ldap-1.0.0.ebuild 1678 RMD160 25e471b4dcb7a5b2f41c0f2ebe28accc235177b1 SHA1 eaa0cb19d61641367d505131de637bc7fce2c3ef SHA256 1ff8da27488d1425a8c832ae2d3e95522454f91ce77f1c04075d561a3cf3170b
+MD5 8566871ff3571b3a40c6460a9b1c0748 mod_vhost_ldap-1.0.0.ebuild 1678
+RMD160 25e471b4dcb7a5b2f41c0f2ebe28accc235177b1 mod_vhost_ldap-1.0.0.ebuild 1678
+SHA256 1ff8da27488d1425a8c832ae2d3e95522454f91ce77f1c04075d561a3cf3170b mod_vhost_ldap-1.0.0.ebuild 1678
+MISC ChangeLog 1167 RMD160 b504009dec91d1b1e18534c5ee793416d0342157 SHA1 b9f91fa298987b5a7084276abc5d31673fc22152 SHA256 cf74b10f4d4a65a527bd9e67680881d0357258eb16f88a2349bbb3fe323d2882
+MD5 6edc955946cd1ce271fb6548d9da4415 ChangeLog 1167
+RMD160 b504009dec91d1b1e18534c5ee793416d0342157 ChangeLog 1167
+SHA256 cf74b10f4d4a65a527bd9e67680881d0357258eb16f88a2349bbb3fe323d2882 ChangeLog 1167
MISC metadata.xml 223 RMD160 30a6cfa82f214e7bf80161132835a25e0d3d41aa SHA1 24d1f9b12898fd70d331de23cac69b98c48ab540 SHA256 e376668f5da97bd367108a34582eb43368d4c6a591692d0f1324f5b3a0e9f2b2
MD5 41a14961c9fd95fc52e4225e42d8dde7 metadata.xml 223
RMD160 30a6cfa82f214e7bf80161132835a25e0d3d41aa metadata.xml 223
@@ -21,10 +29,13 @@ SHA256 e376668f5da97bd367108a34582eb43368d4c6a591692d0f1324f5b3a0e9f2b2 metadata
MD5 c4b48d46101a41cb773b4bcb439f4a0c files/digest-mod_vhost_ldap-1.0.0 259
RMD160 4f150385bb6de9bc274044a810160c914e943876 files/digest-mod_vhost_ldap-1.0.0 259
SHA256 f979b03a58aaee0033272280acaf52f9fae7d820eb091d2379375c963e53bcfe files/digest-mod_vhost_ldap-1.0.0 259
+MD5 c4b48d46101a41cb773b4bcb439f4a0c files/digest-mod_vhost_ldap-1.0.0-r1 259
+RMD160 4f150385bb6de9bc274044a810160c914e943876 files/digest-mod_vhost_ldap-1.0.0-r1 259
+SHA256 f979b03a58aaee0033272280acaf52f9fae7d820eb091d2379375c963e53bcfe files/digest-mod_vhost_ldap-1.0.0-r1 259
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.5 (GNU/Linux)
+Version: GnuPG v2.0.8 (GNU/Linux)
-iD8DBQFGrMo4yuNVb5qfaOYRArfOAJ9x+Rj2FztOp6XybUikiC7emM1HWgCgn5CZ
-u9GxDjbaLmRowcQsLxeoBSE=
-=4VCq
+iEYEARECAAYFAkefbWEACgkQmPFBzbX68WHaZwCfWvcU8hlMa6XcVN+nKRvTRsgb
+wscAnii1m22z1VYuHRKi2iS4argboLDb
+=Gtf7
-----END PGP SIGNATURE-----
diff --git a/www-apache/mod_vhost_ldap/files/99_mod_vhost_ldap.conf b/www-apache/mod_vhost_ldap/files/99_mod_vhost_ldap.conf
index 42d17c060502..dd563150dcbc 100644
--- a/www-apache/mod_vhost_ldap/files/99_mod_vhost_ldap.conf
+++ b/www-apache/mod_vhost_ldap/files/99_mod_vhost_ldap.conf
@@ -1,12 +1,10 @@
<IfDefine VHOST_LDAP>
- <IfModule !mod_vhost_ldap.c>
- LoadModule vhost_ldap_module modules/mod_vhost_ldap.so
- </IfModule>
+LoadModule vhost_ldap_module modules/mod_vhost_ldap.so
+
+VhostLDAPEnabled on
+VhostLDAPUrl "ldap://127.0.0.1/ou=vhosts,ou=web,dc=localhost"
+VhostLdapBindDN "cn=admin,dc=localhost"
+VhostLDAPBindPassword "changeme"
</IfDefine>
-<IfModule mod_vhost_ldap.c>
- VhostLDAPEnabled on
- VhostLDAPUrl "ldap://127.0.0.1/ou=vhosts,ou=web,dc=localhost"
- VhostLdapBindDN "cn=admin,dc=localhost"
- VhostLDAPBindPassword "changeme"
-</IfModule>
+# vim: ts=4 filetype=apache
diff --git a/www-apache/mod_vhost_ldap/files/digest-mod_vhost_ldap-1.0.0-r1 b/www-apache/mod_vhost_ldap/files/digest-mod_vhost_ldap-1.0.0-r1
new file mode 100644
index 000000000000..83032d93132e
--- /dev/null
+++ b/www-apache/mod_vhost_ldap/files/digest-mod_vhost_ldap-1.0.0-r1
@@ -0,0 +1,3 @@
+MD5 2e01928896a24d1bdd6f9245f64c2a8f mod_vhost_ldap-1.0.0.tar.bz2 7862
+RMD160 da38548074175faab2c232e1e7b5cb88610405b1 mod_vhost_ldap-1.0.0.tar.bz2 7862
+SHA256 e14713d736e79ca7760b8ca8bd32fd01e97ef0f14396bdea9373d7bfd8dd1f87 mod_vhost_ldap-1.0.0.tar.bz2 7862
diff --git a/www-apache/mod_vhost_ldap/files/mod_vhost_ldap-1.0.0-apache22.patch b/www-apache/mod_vhost_ldap/files/mod_vhost_ldap-1.0.0-apache22.patch
new file mode 100644
index 000000000000..484328f14b67
--- /dev/null
+++ b/www-apache/mod_vhost_ldap/files/mod_vhost_ldap-1.0.0-apache22.patch
@@ -0,0 +1,158 @@
+Index: mod-vhost-ldap-1.0.0/mod_vhost_ldap.c
+===================================================================
+--- mod-vhost-ldap-1.0.0.orig/mod_vhost_ldap.c
++++ mod-vhost-ldap-1.0.0/mod_vhost_ldap.c
+@@ -29,12 +29,13 @@
+ #include "http_core.h"
+ #include "http_log.h"
+ #include "http_request.h"
++#include "apr_version.h"
+ #include "apr_ldap.h"
+ #include "apr_strings.h"
+ #include "apr_reslist.h"
+ #include "util_ldap.h"
+
+-#ifndef APU_HAS_LDAP
++#if !defined(APU_HAS_LDAP) && !defined(APR_HAS_LDAP)
+ #error mod_vhost_ldap requires APR-util to have LDAP support built in
+ #endif
+
+@@ -93,6 +94,27 @@ typedef struct mod_vhost_ldap_request_t
+ char *attributes[] =
+ { "apacheServerName", "apacheDocumentRoot", "apacheScriptAlias", "apacheSuexecUid", "apacheSuexecGid", "apacheServerAdmin", 0 };
+
++#if (APR_MAJOR_VERSION >= 1)
++static APR_OPTIONAL_FN_TYPE(uldap_connection_close) *util_ldap_connection_close;
++static APR_OPTIONAL_FN_TYPE(uldap_connection_find) *util_ldap_connection_find;
++static APR_OPTIONAL_FN_TYPE(uldap_cache_comparedn) *util_ldap_cache_comparedn;
++static APR_OPTIONAL_FN_TYPE(uldap_cache_compare) *util_ldap_cache_compare;
++static APR_OPTIONAL_FN_TYPE(uldap_cache_checkuserid) *util_ldap_cache_checkuserid;
++static APR_OPTIONAL_FN_TYPE(uldap_cache_getuserdn) *util_ldap_cache_getuserdn;
++static APR_OPTIONAL_FN_TYPE(uldap_ssl_supported) *util_ldap_ssl_supported;
++
++static void ImportULDAPOptFn(void)
++{
++ util_ldap_connection_close = APR_RETRIEVE_OPTIONAL_FN(uldap_connection_close);
++ util_ldap_connection_find = APR_RETRIEVE_OPTIONAL_FN(uldap_connection_find);
++ util_ldap_cache_comparedn = APR_RETRIEVE_OPTIONAL_FN(uldap_cache_comparedn);
++ util_ldap_cache_compare = APR_RETRIEVE_OPTIONAL_FN(uldap_cache_compare);
++ util_ldap_cache_checkuserid = APR_RETRIEVE_OPTIONAL_FN(uldap_cache_checkuserid);
++ util_ldap_cache_getuserdn = APR_RETRIEVE_OPTIONAL_FN(uldap_cache_getuserdn);
++ util_ldap_ssl_supported = APR_RETRIEVE_OPTIONAL_FN(uldap_ssl_supported);
++}
++#endif
++
+ static int mod_vhost_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
+ {
+ /* make sure that mod_ldap (util_ldap) is loaded */
+@@ -114,6 +136,7 @@ mod_vhost_ldap_create_server_config (apr
+ {
+ mod_vhost_ldap_config_t *conf =
+ (mod_vhost_ldap_config_t *)apr_pcalloc(p, sizeof (mod_vhost_ldap_config_t));
++ memset(conf, 0, sizeof(mod_vhost_ldap_config_t));
+
+ conf->enabled = MVL_UNSET;
+ conf->have_ldap_url = 0;
+@@ -133,6 +156,7 @@ mod_vhost_ldap_merge_server_config(apr_p
+ mod_vhost_ldap_config_t *child = (mod_vhost_ldap_config_t *) childv;
+ mod_vhost_ldap_config_t *conf =
+ (mod_vhost_ldap_config_t *)apr_pcalloc(p, sizeof(mod_vhost_ldap_config_t));
++ memset(conf, 0, sizeof(mod_vhost_ldap_config_t));
+
+ if (child->enabled == MVL_UNSET) {
+ conf->enabled = parent->enabled;
+@@ -185,6 +209,9 @@ static const char *mod_vhost_ldap_parse_
+ {
+ int result;
+ apr_ldap_url_desc_t *urld;
++#if (APR_MAJOR_VERSION >= 1)
++ apr_ldap_err_t *result_err;
++#endif
+
+ mod_vhost_ldap_config_t *conf =
+ (mod_vhost_ldap_config_t *)ap_get_module_config(cmd->server->module_config,
+@@ -193,22 +220,29 @@ static const char *mod_vhost_ldap_parse_
+ ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0,
+ cmd->server, "[mod_vhost_ldap.c] url parse: `%s'",
+ url);
+-
++
++#if (APR_MAJOR_VERSION >= 1) /* for apache >= 2.2 */
++ result = apr_ldap_url_parse(cmd->pool, url, &(urld), &(result_err));
++ if (result != LDAP_SUCCESS) {
++ return result_err->reason;
++ }
++#else
+ result = apr_ldap_url_parse(url, &(urld));
+ if (result != LDAP_SUCCESS) {
+ switch (result) {
+- case LDAP_URL_ERR_NOTLDAP:
+- return "LDAP URL does not begin with ldap://";
+- case LDAP_URL_ERR_NODN:
+- return "LDAP URL does not have a DN";
+- case LDAP_URL_ERR_BADSCOPE:
+- return "LDAP URL has an invalid scope";
+- case LDAP_URL_ERR_MEM:
+- return "Out of memory parsing LDAP URL";
+- default:
+- return "Could not parse LDAP URL";
++ case LDAP_URL_ERR_NOTLDAP:
++ return "LDAP URL does not begin with ldap://";
++ case LDAP_URL_ERR_NODN:
++ return "LDAP URL does not have a DN";
++ case LDAP_URL_ERR_BADSCOPE:
++ return "LDAP URL has an invalid scope";
++ case LDAP_URL_ERR_MEM:
++ return "Out of memory parsing LDAP URL";
++ default:
++ return "Could not parse LDAP URL";
+ }
+ }
++#endif
+ conf->url = apr_pstrdup(cmd->pool, url);
+
+ ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0,
+@@ -278,7 +312,9 @@ static const char *mod_vhost_ldap_parse_
+ }
+
+ conf->have_ldap_url = 1;
++#if (APR_MAJOR_VERSION < 1) /* free only required for older apr */
+ apr_ldap_free_urldesc(urld);
++#endif
+ return NULL;
+ }
+
+@@ -406,6 +442,7 @@ static int mod_vhost_ldap_translate_name
+
+ reqc =
+ (mod_vhost_ldap_request_t *)apr_pcalloc(r->pool, sizeof(mod_vhost_ldap_request_t));
++ memset(reqc, 0, sizeof(mod_vhost_ldap_request_t));
+
+ ap_set_module_config(r->request_config, &vhost_ldap_module, reqc);
+
+@@ -608,6 +645,9 @@ mod_vhost_ldap_register_hooks (apr_pool_
+ #ifdef HAVE_UNIX_SUEXEC
+ ap_hook_get_suexec_identity(mod_vhost_ldap_get_suexec_id_doer, NULL, NULL, APR_HOOK_MIDDLE);
+ #endif
++#if (APR_MAJOR_VERSION >= 1)
++ ap_hook_optional_fn_retrieve(ImportULDAPOptFn,NULL,NULL,APR_HOOK_MIDDLE);
++#endif
+ }
+
+ module AP_MODULE_DECLARE_DATA vhost_ldap_module = {
+Index: mod-vhost-ldap-1.0.0/ChangeLog
+===================================================================
+--- mod-vhost-ldap-1.0.0.orig/ChangeLog
++++ mod-vhost-ldap-1.0.0/ChangeLog
+@@ -1,3 +1,11 @@
++2006-04-21 Bart Vanbrabant <bart.vanbrabant@zoeloelip.be>
++ * VERSION: 1.0.1 release
++ * mod_vhost_ldap.c: add support for apache-2.2.x
++
++2006-01-30 Ondřej Surý <ondrej@sury.org>
++ * VERSION: 1.0.0 release
++ * Fix small memory leak when used in subrequest (e.g. fastcgi)
++
+ 2005-10-03 Ondřej Surý <ondrej@sury.org>
+ * mod_vhost_ldap.c: add support for running from subrequest (ie. mod_fastcgi)
+ * VERSION: 0.2.9 release
diff --git a/www-apache/mod_vhost_ldap/mod_vhost_ldap-1.0.0-r1.ebuild b/www-apache/mod_vhost_ldap/mod_vhost_ldap-1.0.0-r1.ebuild
new file mode 100644
index 000000000000..ed6e6a27da25
--- /dev/null
+++ b/www-apache/mod_vhost_ldap/mod_vhost_ldap-1.0.0-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_vhost_ldap/mod_vhost_ldap-1.0.0-r1.ebuild,v 1.1 2008/01/29 18:15:51 hollow Exp $
+
+inherit eutils apache-module
+
+KEYWORDS="~amd64 ~x86"
+
+DESCRIPTION="An Apache2 module for storing and configuring virtual hosts from LDAP."
+HOMEPAGE="http://alioth.debian.org/projects/modvhostldap/"
+SRC_URI="http://alioth.debian.org/download.php/1422/${P}.tar.bz2"
+# Attention: 1422 captures 1.0 download content!!!
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+S="${WORKDIR}/mod-vhost-ldap-${PV}"
+
+APACHE2_MOD_CONF="99_${PN}"
+APACHE2_MOD_DEFINE="VHOST_LDAP"
+
+DOCFILES="AUTHORS ChangeLog INSTALL README"
+
+need_apache2
+
+pkg_setup() {
+ if ! built_with_use www-servers/apache ldap ; then
+ eerror
+ eerror "Apache2 needs to be built with ldap support to get this module working!"
+ eerror
+ die "Apache2 lacks ldap support"
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-apache22.patch
+}
+
+src_compile() {
+ sed -i s/MOD_VHOST_LDAP_VERSION/\"$(cat VERSION)\"/g mod_vhost_ldap.c
+ apache-module_src_compile
+}
+
+src_install() {
+ mkdir -p "${D}/etc/openldap/schema"
+ cp -f "mod_vhost_ldap.schema" "${D}/etc/openldap/schema/"
+ apache-module_src_install
+}
+
+pkg_postinst() {
+ einfo
+ einfo "To enable ${PN}, you need to edit your ${ROOT}/etc/conf.d/apache2 file and"
+ einfo "add '-D ${APACHE2_MOD_DEFINE}' and '-D LDAP' to APACHE2_OPTS."
+ einfo
+ einfo "Configuration file installed as"
+ einfo " ${APACHE_MODULES_CONFDIR}/$(basename ${APACHE2_MOD_CONF}).conf"
+ einfo
+ einfo "Your LDAP server needs to include mod_vhost_ldap.schema and should"
+ einfo "also maintain indices on apacheServerName and apacheServerAlias."
+ einfo
+}
diff --git a/www-apache/mod_vhost_ldap/mod_vhost_ldap-1.0.0.ebuild b/www-apache/mod_vhost_ldap/mod_vhost_ldap-1.0.0.ebuild
index ce882d904e18..04a785ad74b1 100644
--- a/www-apache/mod_vhost_ldap/mod_vhost_ldap-1.0.0.ebuild
+++ b/www-apache/mod_vhost_ldap/mod_vhost_ldap-1.0.0.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_vhost_ldap/mod_vhost_ldap-1.0.0.ebuild,v 1.3 2007/07/29 17:11:08 phreak Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apache/mod_vhost_ldap/mod_vhost_ldap-1.0.0.ebuild,v 1.4 2008/01/29 18:15:51 hollow Exp $
inherit eutils apache-module
@@ -49,7 +49,7 @@ pkg_postinst() {
einfo "add '-D ${APACHE2_MOD_DEFINE}' and '-D LDAP' to APACHE2_OPTS."
einfo
einfo "Configuration file installed as"
- einfo " ${APACHE2_MODULES_CONFDIR}/$(basename ${APACHE2_MOD_CONF}).conf"
+ einfo " ${APACHE_MODULES_CONFDIR}/$(basename ${APACHE2_MOD_CONF}).conf"
einfo
einfo "Your LDAP server needs to include mod_vhost_ldap.schema and should"
einfo "also maintain indices on apacheServerName and apacheServerAlias."