summaryrefslogtreecommitdiff
blob: 182a60f7b720f0862213012faf2730676083cb48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit apache-module depend.apache

DESCRIPTION="Store and configure Apache virtual hosts using LDAP"
HOMEPAGE="http://modvhostldap.alioth.debian.org/"
SRC_URI="https://dev.gentoo.org/~mjo/distfiles/${P}.tar.xz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

APACHE2_MOD_CONF="99_${PN}"
APACHE2_MOD_DEFINE="VHOST_LDAP LDAP"

DOCFILES="AUTHORS ChangeLog README"

# apache[ldap] is needed to run, but not to compile.
DEPEND=""
RDEPEND="=www-servers/apache-2*[ldap]"

need_apache2

src_prepare() {
	sed -i "s/MOD_VHOST_LDAP_VERSION/\"${PV}\"/g" "${PN}.c" || \
		die "failed to sed version string"
}

src_install() {
	apache-module_src_install
	insinto /etc/openldap/schema
	doins mod_vhost_ldap.schema
}

pkg_postinst() {
	apache-module_pkg_postinst
	einfo
	einfo "Your LDAP server needs to include mod_vhost_ldap.schema and should"
	einfo "also maintain indices on apacheServerName and apacheServerAlias."
	einfo
}