summaryrefslogtreecommitdiff
blob: 6fe0fca30baf419cd9ac26ae1efad6cc1c053b28 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Achim Gottinger <achim@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/openldap-2.0.7.ebuild,v 1.2 2001/05/29 17:28:19 achim Exp $

A=${P}.tgz
S=${WORKDIR}/${P}
DESCRIPTION="LDAP suite of application and development tools"
SRC_URI="ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/"${A}
HOMEPAGE="http://www.OpenLDAP.org/"

DEPEND="virtual/glibc
	tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
        ssl? ( >=dev-libs/openssl-0.9.6 )
        readline? ( >=sys-libs/readline-4.1 )
	>=sys-libs/ncurses-5.1
	>=sys-libs/gdbm-1.8.0"

RDEPEND="virtual/glibc
	>=sys-libs/ncurses-5.1
	>=sys-libs/gdbm-1.8.0
        readline? ( >=sys-libs/readline-4.1 )"

src_compile() { 
  local myconf
  if [ "`use tcpd`" ] ; then
    myconf="--enable-wrappers"
  fi
  try ./configure --host=${CHOST} --enable-passwd \
	      --enable-shell --enable-shared --enable-static --with-ldbm-api=gdbm \
	      --prefix=/usr --sysconfdir=/etc --localstatedir=/var/state $myconf
  try make depend
  try make
  cd tests
  try make
}

src_install() {                               
  cd ${S}
  try make prefix=${D}/usr sysconfdir=${D}/etc/openldap localstatedir=${D}/var/state install
  prepman

  dodoc ANNOUNCEMENT CHANGES COPYRIGHT README LICENSE
  docinto rfc
  dodoc doc/rfc/*.txt
  docinto devel
  dodoc doc/devel/*
 
  dodir /etc/rc.d/init.d
  cp ${O}/files/slapd ${D}/etc/rc.d/init.d
  cp ${O}/files/slurpd ${D}/etc/rc.d/init.d

  cd ${D}/etc/openldap

  for i in *
  do
    dosed $i
  done
}