summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Erculiani <lxnay@gentoo.org>2010-07-07 13:52:54 +0000
committerFabio Erculiani <lxnay@gentoo.org>2010-07-07 13:52:54 +0000
commitca03c89bade89d45f5bb306bfacadf3e3db9db59 (patch)
treebc64a3dd33a21c3e148451c49f9c9cb610c63fea /dev-libs/mozldap
parentAutomated update of use.local.desc (diff)
downloadhistorical-ca03c89bade89d45f5bb306bfacadf3e3db9db59.tar.gz
historical-ca03c89bade89d45f5bb306bfacadf3e3db9db59.tar.bz2
historical-ca03c89bade89d45f5bb306bfacadf3e3db9db59.zip
new ebuild, Mozilla LDAP C SDK
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'dev-libs/mozldap')
-rw-r--r--dev-libs/mozldap/ChangeLog12
-rw-r--r--dev-libs/mozldap/Manifest8
-rw-r--r--dev-libs/mozldap/files/configure.in.patch185
-rw-r--r--dev-libs/mozldap/files/mozldap-6.0.4-pkgconfig.patch12
-rw-r--r--dev-libs/mozldap/files/nspr-m4.patch42
-rw-r--r--dev-libs/mozldap/files/nss-m4.patch45
-rw-r--r--dev-libs/mozldap/metadata.xml8
-rw-r--r--dev-libs/mozldap/mozldap-6.0.6-r1.ebuild121
8 files changed, 433 insertions, 0 deletions
diff --git a/dev-libs/mozldap/ChangeLog b/dev-libs/mozldap/ChangeLog
new file mode 100644
index 000000000000..095c37358e9b
--- /dev/null
+++ b/dev-libs/mozldap/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for dev-libs/mozldap
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/mozldap/ChangeLog,v 1.1 2010/07/07 13:52:54 lxnay Exp $
+
+*mozldap-6.0.6-r1 (07 Jul 2010)
+
+ 07 Jul 2010; Fabio Erculiani <lxnay@gentoo.org>
+ +files/mozldap-6.0.4-pkgconfig.patch, +files/configure.in.patch,
+ +files/nspr-m4.patch, +files/nss-m4.patch, +mozldap-6.0.6-r1.ebuild,
+ +metadata.xml:
+ new ebuild, Mozilla LDAP C SDK
+
diff --git a/dev-libs/mozldap/Manifest b/dev-libs/mozldap/Manifest
new file mode 100644
index 000000000000..b1e071674071
--- /dev/null
+++ b/dev-libs/mozldap/Manifest
@@ -0,0 +1,8 @@
+AUX configure.in.patch 6055 RMD160 69c212e2b0d33ae6d9b91e50a90de0d38c45dbdc SHA1 686e0d51ff705089d6710f72c2fa9f146692d256 SHA256 cdc8b6505e621705311e7bb0d4c5b5fc9bfa382f26beeab2a48f3a541c4e9f69
+AUX mozldap-6.0.4-pkgconfig.patch 552 RMD160 b7428141f1b064a56bc6732d67b57670a5e61a89 SHA1 def18258945ba359129e074e98efc652400f9d13 SHA256 187156a9aea2eae256c88e9c589b938e21db8c7e5168d1eb3e9ff4d82926b7f5
+AUX nspr-m4.patch 1447 RMD160 fc7a95a21274cf7785b74296022d1413d27d25df SHA1 43a8dacf0c2b8e29232ca9e620992455ad73c24c SHA256 6fcb31a73e34a8187444e9469e118277d338c52c5c46b80d86f1f84439199915
+AUX nss-m4.patch 1446 RMD160 81f18f2170f590e46b6824347edfae623677e0bb SHA1 00c6acb1d55bad86a68d36a76e8c0816808fa630 SHA256 2322409a792cea0b235ee0ae2f8700111bd878008eac3c16db3f0654fd5398c5
+DIST mozldap-6.0.6.tar.gz 708821 RMD160 d932813f0b6f5808c8f0b255718a413d6a6e6ba5 SHA1 db7b8d845f8917638512ae92381675fe76432eff SHA256 3a7b94c6698e2acb91a577decee5eb6103f183d6b9833abb169124818ba80d06
+EBUILD mozldap-6.0.6-r1.ebuild 3918 RMD160 2bf28b6e546e3db70fed80316d6077510ca6b536 SHA1 dcd510f8c0ee056d6b96e442fdc0dfbf47c15299 SHA256 ae849129120fae3ccd6681bacc4ffee449e9b7b06417579b443161ecf52846b3
+MISC ChangeLog 476 RMD160 2e0ae936da1b0741de30cb04c62731314f1877e7 SHA1 94849084f0bcee833680ab9db78360b73716f065 SHA256 490b0fae1bdf5c9f189d17fded87a9c34b775752ccdfffc53e88ebd704cec708
+MISC metadata.xml 220 RMD160 07c52cb369217fc5bbfffc4ba5ffc957d0810313 SHA1 83c1ba4fbc439d17563b2fe65df6c88cd594394d SHA256 e1f3a2843ea0147b5aa40aaf5ed41d3cb748d26e484a4abd07b5dc65c5e0e134
diff --git a/dev-libs/mozldap/files/configure.in.patch b/dev-libs/mozldap/files/configure.in.patch
new file mode 100644
index 000000000000..232b1ecb64af
--- /dev/null
+++ b/dev-libs/mozldap/files/configure.in.patch
@@ -0,0 +1,185 @@
+--- configure.in.orig 2009-10-06 11:46:10.378924265 +0300
++++ configure.in 2009-10-06 11:47:36.154924127 +0300
+@@ -42,7 +42,7 @@
+ AC_PREREQ(2.12)
+ AC_INIT(ldap/include/ldap.h)
+
+-AC_CONFIG_AUX_DIR(${srcdir}/config/autoconf)
++AC_CONFIG_AUX_DIR(./config/autoconf)
+ AC_CANONICAL_SYSTEM
+
+ dnl ========================================================
+@@ -85,24 +85,6 @@
+ HOST_CFLAGS="${HOST_CFLAGS=}"
+ HOST_LDFLAGS="${HOST_LDFLAGS=}"
+
+-case "$target" in
+-*-cygwin*|*-mingw*|*-msvc*|*-mks*)
+- # Check to see if we are really running in a msvc environemnt
+- _WIN32_MSVC=
+- AC_CHECK_PROGS(CC, cl)
+- if test "$CC" = "cl"; then
+- echo 'main() { return 0; }' > dummy.c
+- ${CC} -o dummy dummy.c >/dev/null 2>&1
+- if test $? = 0; then
+- _WIN32_MSVC=1
+- CXX=$CC
+- else
+- AC_MSG_WARN([$(CC) test failed. Using normal feature tests])
+- fi
+- rm -f dummy dummy.o dummy.obj dummy.exe dummy.c
+- fi
+- ;;
+-esac
+
+ if test -n "$_WIN32_MSVC"; then
+ SKIP_PATH_CHECKS=1
+@@ -151,18 +133,6 @@
+ AC_DEFINE(MOZILLA_CLIENT)
+ fi])
+
+-AC_ARG_ENABLE(optimize,
+- [ --enable-optimize(=val) Enable code optimizations (val, ie. -O2) ],
+- [ if test "$enableval" != "no"; then
+- MOZ_OPTIMIZE=1
+- if test -n "$enableval" && test "$enableval" != "yes"; then
+- _OPTIMIZE_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
+- _SAVE_OPTIMIZE_FLAGS=$_OPTIMIZE_FLAGS
+- fi
+- else
+- MOZ_OPTIMIZE=
+- fi ])
+-
+ AC_ARG_ENABLE(debug,
+ [ --disable-debug Do not compile in debugging symbols
+ --enable-debug(=val) Enable debugging (debug flags val)],
+@@ -176,26 +146,6 @@
+ fi
+ fi])
+
+-AC_ARG_ENABLE(win32-target,
+- [ --enable-win32-target=\$t
+- Specify win32 flavor. (WIN95 or WINNT)],
+- OS_TARGET=`echo $enableval | tr a-z A-Z`,
+- OS_TARGET=)
+-
+-AC_ARG_ENABLE(debug-rtl,
+- [ --enable-debug-rtl Use the MSVC debug runtime library],
+- [ if test "$enableval" = "yes"; then
+- USE_DEBUG_RTL=1
+- fi ])
+-
+-AC_ARG_ENABLE(n32,
+- [ --enable-n32 Enable n32 ABI support (IRIX only)],
+- [ if test "$enableval" = "yes"; then
+- USE_N32=1
+- else if test "$enableval" = "no"; then
+- USE_N32=
+- fi
+- fi ])
+
+ AC_ARG_ENABLE(64bit,
+ [ --enable-64bit Enable 64-bit support (on certain platforms)],
+@@ -261,10 +211,6 @@
+ if test -z "$SVRCORE_CFLAGS" -o -z "$SVRCORE_LIBS" ; then
+ if test -n "$_SYSTEM_SVRCORE"; then
+ AM_PATH_SVRCORE(4.0.1, [MOZ_NATIVE_SVRCORE=1], [MOZ_NATIVE_SVRCORE=])
+- else
+- dnl see if we are being built in the same build tree as svrcore
+- AM_PATH_INTREE_SVRCORE(../../dist)
+- dnl failing that, see if we can find svrcore-config or pkg-config svrcore
+ if test -z "$SVRCORE_CFLAGS" -o -z "$SVRCORE_LIBS"; then
+ AM_PATH_SVRCORE(4.0.1, [MOZ_NATIVE_SVRCORE=1], [MOZ_NATIVE_SVRCORE=])
+ fi
+@@ -294,9 +240,6 @@
+ _SYSTEM_NSS=no
+ fi], _SYSTEM_NSS= )
+
+-if test "$_WIN32_MSVC"; then
+- _SYSTEM_NSS=
+-fi
+
+ dnl first, see if user has specified explicit NSPR include and lib paths,
+ dnl of if the user has explicitly disabled the use of nss
+@@ -308,10 +251,6 @@
+ if test -n "$USE_NSS" -a -z "$NSS_CFLAGS" -a -z "$NSS_LIBS" ; then
+ dnl nss requires nspr
+ no_nspr=no
+- if test -z "$_SYSTEM_NSS" -o "$_SYSTEM_NSS" = "no" ; then
+-dnl see if we are being built in the same build tree as nss
+- AM_PATH_INTREE_NSS(../../dist)
+- fi
+ dnl failing that, see if we can find nss-config or pkg-config nss
+ if test -z "$NSS_CFLAGS" -a "$_SYSTEM_NSS" != "no" ; then
+ AM_PATH_NSS(3.9.0, [MOZ_NATIVE_NSS=1], [MOZ_NATIVE_NSS=])
+@@ -348,10 +287,6 @@
+
+ dnl next, look for in-tree nspr if user did not specify explicit system nspr
+ if test "$no_nspr" = "no" -a -z "$NSPR_CFLAGS" -a -z "$NSPR_LIBS" ; then
+- if test -z "$_SYSTEM_NSPR" -o "$_SYSTEM_NSPR" = "no" ; then
+-dnl see if we are being built in the same build tree as nspr
+- AM_PATH_INTREE_NSPR(../../dist)
+- fi
+ dnl failing that, see if we can find nspr-config or pkg-config nspr
+ if test -z "$NSPR_CFLAGS" -a "$_SYSTEM_NSPR" != "no" ; then
+ AM_PATH_NSPR(4.0.0, [MOZ_NATIVE_NSPR=1], [MOZ_NATIVE_NSPR=])
+@@ -390,48 +325,6 @@
+ dnl than in cygwin-wrapper
+ dnl ========================================================
+
+-dnl add other runtime environments that use unix style paths
+-dnl *-cygwin*|*-mingw*|*-msvc*|*-mks*)
+-case "$target" in
+-*-cygwin*) USE_WINDOWS_PATHS=1 ;;
+-esac
+-
+-if test -n "$_WIN32_MSVC" -a -n "$USE_WINDOWS_PATHS" ; then
+- if test -n "$NSPR_CFLAGS" -a -z "$SKIP_CYGWIN_FIXUP" ; then
+- path=`echo $NSPR_CFLAGS | sed -e 's/^-I//'`
+- path=`cygpath -m $path`
+- NSPR_CFLAGS="/I$path"
+- fi
+- if test -n "$NSPR_LIBS" -a -z "$SKIP_CYGWIN_FIXUP" ; then
+- path=`echo $NSPR_LIBS | sed -e 's/^-L//'`
+- path=`cygpath -m $path`
+- NSPR_LIBS="/LIBPATH:$path"
+- fi
+-
+- if test -n "$NSS_CFLAGS" ; then
+- path=`echo $NSS_CFLAGS | sed -e 's/^-I//'`
+- path=`cygpath -m $path`
+- NSS_CFLAGS="/I$path"
+- fi
+-
+- if test -n "$NSS_LIBS" ; then
+- path=`echo $NSS_LIBS | sed -e 's/^-L//'`
+- path=`cygpath -m $path`
+- NSS_LIBS="/LIBPATH:$path"
+- fi
+-
+- if test -n "$SVRCORE_CFLAGS" ; then
+- path=`echo $SVRCORE_CFLAGS | sed -e 's/^-I//'`
+- path=`cygpath -m $path`
+- SVRCORE_CFLAGS="/I$path"
+- fi
+-
+- if test -n "$SVRCORE_LIBS" ; then
+- path=`echo $SVRCORE_LIBS | sed -e 's/^-L//'`
+- path=`cygpath -m $path`
+- SVRCORE_LIBS="/LIBPATH:$path"
+- fi
+-fi
+
+ dnl ========================================================
+ dnl =
+@@ -1489,9 +1382,7 @@
+ ;;
+
+ *-linux*)
+- if test -z "$USE_NSPR_THREADS"; then
+- USE_PTHREADS=1
+- fi
++ USE_PTHREADS=1
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(_POSIX_SOURCE)
+ AC_DEFINE(_BSD_SOURCE)
diff --git a/dev-libs/mozldap/files/mozldap-6.0.4-pkgconfig.patch b/dev-libs/mozldap/files/mozldap-6.0.4-pkgconfig.patch
new file mode 100644
index 000000000000..2a916cedc842
--- /dev/null
+++ b/dev-libs/mozldap/files/mozldap-6.0.4-pkgconfig.patch
@@ -0,0 +1,12 @@
+diff -uNr mozldap.pc.in mozldap.pc.in
+--- mozldap.pc.in 2006-10-06 01:01:43.000000000 +0200
++++ mozldap.pc.in 2007-08-06 21:27:09.000000000 +0200
+@@ -11,6 +11,6 @@
+ Name: mozldap
+ Description: Mozilla LDAP C SDK
+ Version: %MOZLDAP_VERSION%
+-Requires: nspr >= %NSPR_VERSION% , nss >= %NSS_VERSION%
+-Libs: -lssldap%libsuffix% -lprldap%libsuffix% -lldap%libsuffix%
++Requires: nspr >= %NSPR_VERSION% , nss >= %NSS_VERSION% , svrcore >= %SVRCORE_VERSION%
++Libs: -L${libdir} -lssldap%libsuffix% -lprldap%libsuffix% -lldap%libsuffix%
+ Cflags: -I${includedir}
diff --git a/dev-libs/mozldap/files/nspr-m4.patch b/dev-libs/mozldap/files/nspr-m4.patch
new file mode 100644
index 000000000000..7a9b969ce056
--- /dev/null
+++ b/dev-libs/mozldap/files/nspr-m4.patch
@@ -0,0 +1,42 @@
+--- config.orig/autoconf/nspr.m4 2009-10-06 11:21:10.898930843 +0300
++++ config/autoconf/nspr.m4 2009-10-06 11:27:43.638925618 +0300
+@@ -86,39 +86,6 @@
+
+ ])
+
+-dnl AM_PATH_INTREE_NSPR([ROOTPATH, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+-dnl Test for in-tree NSPR, and define NSPR_CFLAGS and NSPR_LIBS
+-dnl First look for path/*.OBJ/include, then look for path/include
+-dnl Use the cut in case there is more than one path that matches *.OBJ - just
+-dnl take the first one
+-AC_DEFUN(AM_PATH_INTREE_NSPR,
+-[
+- AC_MSG_CHECKING(checking for in-tree NSPR from $1)
+- for nsprpath in "$1" "$1"/*.OBJ ; do
+- savedir=`pwd`
+- cd $nsprpath
+- abs_nsprpath=`pwd`
+- cd $savedir
+- if test -f "$abs_nsprpath/include/nspr/nspr.h" ; then
+- NSPR_CFLAGS="-I$abs_nsprpath/include/nspr"
+- elif test -f "$abs_nsprpath/include/nspr.h" ; then
+- NSPR_CFLAGS="-I$abs_nsprpath/include"
+- fi
+- if test -d "$abs_nsprpath/lib" ; then
+- NSPR_LIBS="-L$abs_nsprpath/lib"
+- fi
+- if test -n "$NSPR_CFLAGS" -a -n "$NSPR_LIBS" ; then
+- break
+- fi
+- done
+- if test -n "$NSPR_CFLAGS" -a -n "$NSPR_LIBS" ; then
+- AC_SUBST(NSPR_CFLAGS)
+- AC_SUBST(NSPR_LIBS)
+- AC_MSG_RESULT(yes)
+- else
+- AC_MSG_RESULT(no)
+- fi
+-])
+
+ dnl AM_PATH_GIVEN_NSPR(no args)
+ dnl Test for --with-nspr=path, --with-nspr-inc=path, and --with-nspr-lib=path
diff --git a/dev-libs/mozldap/files/nss-m4.patch b/dev-libs/mozldap/files/nss-m4.patch
new file mode 100644
index 000000000000..6a855e28eac1
--- /dev/null
+++ b/dev-libs/mozldap/files/nss-m4.patch
@@ -0,0 +1,45 @@
+diff -uNr config.orig/autoconf/nss.m4 config/autoconf/nss.m4
+--- config.orig/autoconf/nss.m4 2009-10-06 11:21:10.898930843 +0300
++++ config/autoconf/nss.m4 2009-10-06 11:23:37.754923372 +0300
+@@ -86,41 +86,6 @@
+
+ ])
+
+-dnl AM_PATH_INTREE_NSS([ROOTPATH, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+-dnl Test for in-tree NSS, and define NSS_CFLAGS and NSS_LIBS
+-AC_DEFUN(AM_PATH_INTREE_NSS,
+-[
+- nsslibpath=`echo $1/*.OBJ/lib | cut -f1 -d' '`
+- savedir=`pwd`
+- cd $nsslibpath
+- abs_nsslibpath=`pwd`
+- cd $savedir
+- nssincpath=$1/public/nss
+- savedir=`pwd`
+- cd $nssincpath
+- abs_nssincpath=`pwd`
+- cd $savedir
+- if test -f "$abs_nssincpath/nss.h" ; then
+- NSS_CFLAGS="-I$abs_nssincpath"
+- fi
+- if test -d "$abs_nsslibpath" ; then
+- NSS_LIBS="-L$abs_nsslibpath"
+- fi
+- if test -n "$NSS_CFLAGS" -a -n "$NSS_LIBS" ; then
+- AC_MSG_CHECKING(using in-tree NSS from $nssincpath $nsslibpath)
+- AC_SUBST(NSS_CFLAGS)
+- AC_SUBST(NSS_LIBS)
+- AC_MSG_RESULT(yes)
+- else
+- AC_MSG_CHECKING(could not find in-tree NSS in $1)
+- AC_MSG_RESULT(no)
+- fi
+-])
+-
+-dnl AM_PATH_GIVEN_NSS(no args)
+-dnl Test for --with-nss=path, --with-nss-inc=path, and --with-nss-lib=path
+-dnl Makes sure the right files/dirs are in the given paths, and sets
+-dnl NSS_CFLAGS and NSS_LIBS if successful
+ AC_DEFUN(AM_PATH_GIVEN_NSS,
+ [
+ dnl ========================================================
diff --git a/dev-libs/mozldap/metadata.xml b/dev-libs/mozldap/metadata.xml
new file mode 100644
index 000000000000..2c673780b3cd
--- /dev/null
+++ b/dev-libs/mozldap/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>lxnay@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-libs/mozldap/mozldap-6.0.6-r1.ebuild b/dev-libs/mozldap/mozldap-6.0.6-r1.ebuild
new file mode 100644
index 000000000000..47ce9aa92caa
--- /dev/null
+++ b/dev-libs/mozldap/mozldap-6.0.6-r1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/mozldap/mozldap-6.0.6-r1.ebuild,v 1.1 2010/07/07 13:52:54 lxnay Exp $
+
+EAPI="2"
+
+WANT_AUTOCONF="2.1"
+
+inherit eutils multilib versionator autotools
+
+DESCRIPTION="Mozilla LDAP C SDK"
+HOMEPAGE="http://wiki.mozilla.org/LDAP_C_SDK"
+SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v${PV}/src/${P}.tar.gz"
+
+LICENSE="MPL-1.1 GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ipv6 debug +sasl"
+
+DEPEND=">=dev-libs/nss-3.11.4
+ >=dev-libs/nspr-4.0.1
+ >=dev-libs/svrcore-4.0.0
+ sasl? ( dev-libs/cyrus-sasl )
+ dev-util/pkgconfig"
+
+RDEPEND=">=dev-libs/nss-3.11.4
+ >=dev-libs/nspr-4.0.1
+ sasl? ( dev-libs/cyrus-sasl )"
+
+S="${WORKDIR}"/"${P}"/"mozilla/directory/c-sdk"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-6.0.4-pkgconfig.patch
+ epatch "${FILESDIR}"/configure.in.patch
+ epatch "${FILESDIR}"/nss-m4.patch
+ epatch "${FILESDIR}"/nspr-m4.patch
+ eautoreconf
+}
+
+src_configure() {
+ local myconf="--libdir=/usr/$(get_libdir)/mozldap"
+ econf $(use_enable debug) \
+ $(use_enable ipv6) \
+ $(use_enable amd64 64bit) \
+ $(use_with sasl) \
+ --with-svrcore-inc=/usr/include/svrcore \
+ --with-svrcore-lib=/usr/$(get_libdir)/svrcore \
+ --enable-clu \
+ --enable-optimize \
+ ${myconf} || die "econf failed"
+}
+
+src_install () {
+ # Their build system is royally fucked, as usual
+ cd "${S}"
+ sed -e "s,%libdir%,\$\{exec_prefix\}/$(get_libdir)/${PN},g" \
+ -e "s,%prefix%,/usr,g" \
+ -e "s,%major%,$(get_major_version ${PV}),g" \
+ -e "s,%minor%,$(get_version_component_range 2 ${PV}),g" \
+ -e "s,%submin%,$(get_version_component_range 3 ${PV}),g" \
+ -e "s,%libsuffix%,$(get_major_version ${PV})$(get_version_component_range 2 ${PV}),g" \
+ -e "s,%bindir%,\$\{exec_prefix\}/$(get_libdir)/${PN},g" \
+ -e "s,%exec_prefix%,\$\{prefix\},g" \
+ -e "s,%includedir%,\$\{exec_prefix\}/include/${PN},g" \
+ -e "s,%NSPR_VERSION%,$(pkg-config --modversion nspr),g" \
+ -e "s,%NSS_VERSION%,$(pkg-config --modversion nss),g" \
+ -e "s,%SVRCORE_VERSION%,$(pkg-config --modversion svrcore),g" \
+ -e "s,%MOZLDAP_VERSION%,${PV},g" \
+ "${S}"/"${PN}".pc.in > "${S}"/"${PN}".pc || die "sed in install failed"
+
+ emake install || die "make failed"
+ local MY_S="${WORKDIR}"/"${P}"/mozilla/dist/
+
+ rm -rf "${MY_S}/bin/"lib*.so
+ rm -rf "${MY_S}/public/ldap-private"
+
+ exeinto /usr/$(get_libdir)/mozldap
+ doexe "${MY_S}"/lib/*so*
+ doexe "${MY_S}"/lib/*.a
+ doexe "${MY_S}"/bin/*
+
+ #create compatibility PATH link
+
+ for i in ldapcmp ldapcompare ldapdelete ldapmodify \
+ ldappasswd ldapsearch;do
+ dosym /usr/$(get_libdir)/mozldap/$i /usr/bin/moz"${i}" || die
+ # compat for 389-project
+ dosym /usr/$(get_libdir)/mozldap/$i /usr/bin/389-"${i}" || die
+ done
+
+ # move the headers around
+ insinto /usr/include/mozldap
+ doins "${MY_S}/public/ldap/"*.h
+
+ # add sample config
+ insinto /usr/share/mozldap
+ doins "${MY_S}"/etc/*.conf
+
+ #and while at it move them to files with versions-ending
+ #and link them back :)
+ cd "${D}"/usr/$(get_libdir)/mozldap
+
+ #create compatibility Link
+ dosym libldap$(get_major_version ${PV})$(get_version_component_range 2 ${PV}).so \
+ liblber$(get_major_version ${PV})$(get_version_component_range 2 ${PV}).so || die
+ #so lets move
+ for file in *.so; do
+ mv ${file} ${file}.$(get_major_version ${PV}).$(get_version_component_range 2 ${PV}) || die
+ dosym ${file}.$(get_major_version ${PV}).$(get_version_component_range 2 ${PV}) ${file} || die
+ dosym ${file}.$(get_major_version ${PV}).$(get_version_component_range 2 ${PV}) \
+ ${file}.$(get_major_version ${PV}) || die
+ done
+
+ # cope with libraries being in /usr/lib/mozldap
+ dodir /etc/env.d
+ echo "LDPATH=/usr/$(get_libdir)/mozldap" > "${D}"/etc/env.d/08mozldap
+
+ # create pkg-config file
+ insinto /usr/$(get_libdir)/pkgconfig/
+ doins "${S}"/mozldap.pc
+}