summaryrefslogtreecommitdiffstats
path: root/main/openldap
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
commitb70981b68efcce5256eb11c6cd26ae123b10b6ea (patch)
treea38be6efae5e2ba15c2e839504632f9b7bfd5f91 /main/openldap
parent2b4df81538b8398442d5296650905c70341dd8d3 (diff)
downloadaports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.bz2
aports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.xz
moved extra/* to main/
and fixed misc build issues
Diffstat (limited to 'main/openldap')
-rw-r--r--main/openldap/APKBUILD80
-rw-r--r--main/openldap/openldap-2.4-ppolicy.patch13
-rw-r--r--main/openldap/openldap-2.4.11-libldap_r.patch11
-rw-r--r--main/openldap/openldap.post-install4
-rw-r--r--main/openldap/openldap.pre-install3
-rw-r--r--main/openldap/slapd.confd9
-rw-r--r--main/openldap/slapd.initd20
-rw-r--r--main/openldap/slurpd.initd22
8 files changed, 162 insertions, 0 deletions
diff --git a/main/openldap/APKBUILD b/main/openldap/APKBUILD
new file mode 100644
index 000000000..bb4db8296
--- /dev/null
+++ b/main/openldap/APKBUILD
@@ -0,0 +1,80 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=openldap
+pkgver=2.4.16
+pkgrel=1
+pkgdesc="LDAP Server"
+url="http://www.openldap.org/"
+license="custom"
+depends="db openssl uclibc libldap"
+makedepends="db-dev openssl-dev groff"
+subpackages="$pkgname-dev $pkgname-doc libldap"
+install="$pkgname.pre-install $pkgname.post-install"
+source="ftp://ftp.$pkgname.org/pub/OpenLDAP/$pkgname-release/$pkgname-$pkgver.tgz
+ openldap-2.4-ppolicy.patch
+ openldap-2.4.11-libldap_r.patch
+ $install
+ slapd.initd
+ slapd.confd
+ slurpd.initd
+ "
+
+# berkdb crypt ipv6 ssl
+build () {
+ cd "$srcdir"/$pkgname-$pkgver
+
+ for i in ../*.patch; do
+ msg "Applying $i..."
+ patch -p1 < $i || return 1
+ done
+
+ ./configure --prefix=/usr \
+ --libexecdir=/usr/sbin \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var/lib/openldap \
+ --enable-slapd \
+ --enable-bdb \
+ --enable-hdb \
+ --enable-crypt \
+ --enable-dynamic \
+ --enable-dnssrv=mod \
+ --enable-ldap=mod \
+ --enable-meta=mod \
+ --enable-monitor=mod \
+ --enable-null=mod \
+ --enable-passwd=mod \
+ --enable-relay=mod \
+ --enable-shell=mod \
+ --enable-sock=mod \
+ --with-tls=openssl
+
+ make || return 1
+ make DESTDIR="$pkgdir" install
+
+ install -d "$pkgdir"/var/run/openldap
+ sed -i -e 's:/var/lib/openldap/run:/var/run/openldap:g' \
+ "$pkgdir"/etc/openldap/slapd.conf
+
+ chmod g+r "$pkgdir"/etc/openldap/slapd.conf
+ install -Dm755 ../slapd.initd "$pkgdir"/etc/init.d/slapd
+ install -Dm755 ../slapd.confd "$pkgdir"/etc/conf.d/slapd
+ install -Dm755 ../slurpd.initd "$pkgdir"/etc/init.d/slurpd
+}
+
+libldap() {
+ depends="uclibc openssl"
+ pkgdesc="OpenLDAP libraries"
+ install=
+ mkdir -p "$subpkgdir"/usr "$subpkgdir"/etc/openldap
+ mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
+ mv "$pkgdir"/etc/openldap/ldap.conf "$subpkgdir"/etc/openldap/
+}
+
+md5sums="ed5b86e9d2b372d10edfe3bb59fee165 openldap-2.4.16.tgz
+2524e490ba334a760fa57057c16da7a9 openldap-2.4-ppolicy.patch
+d19d0502f046078ecd737e29e7552fa8 openldap-2.4.11-libldap_r.patch
+07b1fae35627ea4216dccce33c0b8c69 openldap.pre-install
+f38a6f1de624c17cc0cb6776a089880b openldap.post-install
+13d0e57e54df945671e975acdfb48636 slapd.initd
+b672311fca605c398240cd37a2ae080a slapd.confd
+ba44f1a0e62cb88c68aa64e4a39847fa slurpd.initd"
diff --git a/main/openldap/openldap-2.4-ppolicy.patch b/main/openldap/openldap-2.4-ppolicy.patch
new file mode 100644
index 000000000..c05790e3e
--- /dev/null
+++ b/main/openldap/openldap-2.4-ppolicy.patch
@@ -0,0 +1,13 @@
+diff -urN ./clients.orig/tools/common.c ./clients/tools/common.c
+--- ./clients.orig/tools/common.c 2007-09-01 01:13:50.000000000 +0200
++++ ./clients/tools/common.c 2008-01-13 21:50:06.000000000 +0100
+@@ -1262,8 +1262,8 @@
+ int nsctrls = 0;
+
+ #ifdef LDAP_CONTROL_PASSWORDPOLICYREQUEST
++ LDAPControl c;
+ if ( ppolicy ) {
+- LDAPControl c;
+ c.ldctl_oid = LDAP_CONTROL_PASSWORDPOLICYREQUEST;
+ c.ldctl_value.bv_val = NULL;
+ c.ldctl_value.bv_len = 0;
diff --git a/main/openldap/openldap-2.4.11-libldap_r.patch b/main/openldap/openldap-2.4.11-libldap_r.patch
new file mode 100644
index 000000000..448249a3b
--- /dev/null
+++ b/main/openldap/openldap-2.4.11-libldap_r.patch
@@ -0,0 +1,11 @@
+diff -Nuar openldap-2.4.11.orig/servers/slapd/slapi/Makefile.in openldap-2.4.11/servers/slapd/slapi/Makefile.in
+--- openldap-2.4.11.orig/servers/slapd/slapi/Makefile.in 2008-02-11 15:26:49.000000000 -0800
++++ openldap-2.4.11/servers/slapd/slapi/Makefile.in 2008-10-14 02:10:18.402799262 -0700
+@@ -37,6 +37,7 @@
+ XLIBS = $(LIBRARY)
+ XXLIBS =
+ NT_LINK_LIBS = $(AC_LIBS)
++UNIX_LINK_LIBS = ../../../libraries/libldap_r/libldap_r.la $(LTHREAD_LIBS)
+
+ XINCPATH = -I$(srcdir)/.. -I$(srcdir)
+ XDEFS = $(MODULES_CPPFLAGS)
diff --git a/main/openldap/openldap.post-install b/main/openldap/openldap.post-install
new file mode 100644
index 000000000..1d6affdfe
--- /dev/null
+++ b/main/openldap/openldap.post-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+chown -R ldap:ldap /var/lib/openldap /var/run/openldap
+chgrp ldap /etc/openldap/slapd.conf
diff --git a/main/openldap/openldap.pre-install b/main/openldap/openldap.pre-install
new file mode 100644
index 000000000..b208a9f5f
--- /dev/null
+++ b/main/openldap/openldap.pre-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+adduser -h /usr/lib/openldap -s /bin/false -S -D ldap 2>/dev/null || true
diff --git a/main/openldap/slapd.confd b/main/openldap/slapd.confd
new file mode 100644
index 000000000..2240ad3f3
--- /dev/null
+++ b/main/openldap/slapd.confd
@@ -0,0 +1,9 @@
+# conf.d file for openldap
+#
+# To enable both the standard unciphered server and the ssl encrypted
+# one uncomment this line or set any other server starting options
+# you may desire.
+#
+# OPTS="-h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock'"
+# Uncomment the below to use the new slapd configuration for openldap 2.3
+#OPTS="-F /etc/openldap/slapd.d -h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock'"
diff --git a/main/openldap/slapd.initd b/main/openldap/slapd.initd
new file mode 100644
index 000000000..1637d3335
--- /dev/null
+++ b/main/openldap/slapd.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/files/slapd-initd,v 1.2 2008/10/14 10:29:44 robbat2 Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ldap-server"
+ eval start-stop-daemon --start --pidfile /var/run/openldap/slapd.pid --exec /usr/sbin/slapd -- -u ldap -g ldap "${OPTS}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ldap-server"
+ start-stop-daemon --stop --signal 2 --quiet --pidfile /var/run/openldap/slapd.pid
+ eend $?
+}
diff --git a/main/openldap/slurpd.initd b/main/openldap/slurpd.initd
new file mode 100644
index 000000000..f5aa2ead5
--- /dev/null
+++ b/main/openldap/slurpd.initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/files/slurpd-initd,v 1.1 2007/01/16 23:22:02 jokey Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting slurpd"
+ start-stop-daemon --start --quiet \
+ --exec /usr/lib/openldap/slurpd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping slurpd"
+ start-stop-daemon --stop --quiet \
+ --exec /usr/lib/openldap/slurpd
+ eend $?
+}