Hi,
here comes a patch to add ldap functionality to proftpd
(current proftpd-1.2.8-20030606)
ldap support is optional after the scheme I found elsewhere in openpkg.
The sources need a little patch to link against additional libs:
ldap depends on openssl and so ssl and crypto must as well
be linked in.
See if you like it.
Tassilo
--- mod_ldap.patch.orig 2003-05-17 17:04:15.000000000 +0200
+++ mod_ldap.patch 2003-05-17 14:27:35.000000000 +0200
@@ -0,0 +1,7 @@
+*** contrib/mod_ldap.c.orig 2003-01-26 17:45:20.000000000 +0100
+--- contrib/mod_ldap.c 2003-01-26 17:45:30.000000000 +0100
+***************
+*** 64 ****
+! * $Libraries: -lldap -llber$
+--- 64 ----
+! * $Libraries: -lldap -llber -lssl -lcrypto$
--- proftpd.spec.orig 2003-06-06 17:27:02.000000000 +0200
+++ proftpd.spec 2003-06-06 17:30:48.000000000 +0200
@@ -39,6 +39,7 @@
%option with_mysql no
%option with_pam no
%option with_pgsql no
+%option with_ldap no
# list of sources
Source0: ftp://ftp.proftpd.net/distrib/source/proftpd-%{version}.tar.bz2
@@ -46,6 +47,7 @@
Source2: proftpd.msg.goaway
Source3: proftpd.msg.login
Source4: rc.proftpd
+Patch0: mod_ldap.patch
# build information
Prefix: %{l_prefix}
@@ -62,6 +64,10 @@
%if "%{with_pgsql}" == "yes"
BuildPreReq: postgresql, openssl
%endif
+%if "%{with_ldap}" == "yes"
+BuildPreReq: openldap
+PreReq: openldap
+%endif
AutoReq: no
AutoReqProv: no
@@ -83,6 +89,7 @@
%prep
%setup -q
+ %patch0
# utils also require link with getopt
%{l_shtool} subst \
-e 's;\(\$(BUILD_FTPCOUNT_OBJS).*\);\1 %{l_ldflags} -lgetopt;g' \
@@ -116,6 +123,9 @@
MOD="$MOD:mod_sql_mysql"
MOD_LIB="MOD_LIB:%{l_prefix}/lib/mysql"
%endif
+%if "%{with_ldap}" == "yes"
+ MOD="$MOD:mod_ldap"
+%endif
%if "%{with_pgsql}" == "yes"
MOD="$MOD:mod_sql_postgres"
%{l_shtool} subst \