OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Michael van Elst
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   06-Jun-2003 18:38:14
  Branch: HEAD                             Handle: 2003060617381400

  Modified files:
    openpkg-src/proftpd     proftpd.spec

  Log:
    add LDAP support, polishing mysql/pgsql options

  Summary:
    Revision    Changes     Path
    1.52        +27 -5      openpkg-src/proftpd/proftpd.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/proftpd/proftpd.spec
  ============================================================================
  $ cvs diff -u -r1.51 -r1.52 proftpd.spec
  --- openpkg-src/proftpd/proftpd.spec  6 Jun 2003 10:29:27 -0000       1.51
  +++ openpkg-src/proftpd/proftpd.spec  6 Jun 2003 16:38:14 -0000       1.52
  @@ -39,6 +39,12 @@
   %option       with_mysql  no
   %option       with_pam    no
   %option       with_pgsql  no
  +%option       with_ldap   no
  +
  +#   checking option conflicts
  +%if "%{with_mysql}" == "yes" && "%{with_pgsql}" == "yes"
  +RPM ERROR: with_mysql conflicts with with_pgsql
  +%endif
   
   #   list of sources
   Source0:      ftp://ftp.proftpd.net/distrib/source/proftpd-%{version}.tar.bz2
  @@ -62,6 +68,10 @@
   %if "%{with_pgsql}" == "yes"
   BuildPreReq:  postgresql, openssl
   %endif
  +%if "%{with_ldap}" == "yes"
  +BuildPreReq:  openldap, openssl
  +PreReq:       openldap
  +%endif
   AutoReq:      no
   AutoReqProv:  no
   
  @@ -90,10 +100,23 @@
           -e 's;\(\$(BUILD_FTPTOP_OBJS).*\);\1 %{l_ldflags} -lgetopt;g' \
           -e 's;\(\$(BUILD_FTPWHO_OBJS).*\);\1 %{l_ldflags} -lgetopt;g' \
           Makefile.in
  +%if "%{with_mysql}" == "yes"
  +    libs=`mysql_config --libs`
  +    #   libmysqlclient may require more libraries
  +    %{l_shtool} subst \
  +        -e "s;\(-lmysqlclient\);$libs;g" \
  +        contrib/mod_sql_mysql.c
  +%endif
       #   libpq also requires openssl
  +    #   postgresql also doesn't provide its own inlude subdirectory
       %{l_shtool} subst \
  -        -e 's;-lpq;-lpq -lssl -lcrypto;g' \
  +        -e 's;\(-lpq\);\1 -lssl -lcrypto;g' \
  +        -e 's;^\(#include <\)pgsql/\(libpq-fe.h>.*\)$;\1\2;' \
           contrib/mod_sql_postgres.c
  +    #   libldap also requires openssl
  +    %{l_shtool} subst \
  +        -e 's;\(-llber\);\1 -lssl -lcrypto;g' \
  +        contrib/mod_ldap.c
   
   %build
       #   make non-standard "rundir" the same as standard "sysconfdir"
  @@ -114,14 +137,13 @@
       MOD="$MOD:mod_sql"
   %if "%{with_mysql}" == "yes"
       MOD="$MOD:mod_sql_mysql"
  -    MOD_LIB="MOD_LIB:%{l_prefix}/lib/mysql"
   %endif
   %if "%{with_pgsql}" == "yes"
       MOD="$MOD:mod_sql_postgres"
  -    %{l_shtool} subst \
  -        -e 's;^\(#include <\)pgsql/\(libpq-fe.h>.*\)$;\1\2;' \
  -        contrib/mod_sql_postgres.c
   %endif
  +%endif
  +%if "%{with_ldap}" == "yes"
  +    MOD="$MOD:mod_ldap"
   %endif
       CC="%{l_cc}" \
       CFLAGS="%{l_cflags -O}" \
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to