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

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   07-Nov-2005 21:37:58
  Branch: HEAD                             Handle: 2005110720375800

  Added files:
    openpkg-src/proftpd     proftpd.patch
  Modified files:
    openpkg-src/proftpd     proftpd.spec

  Log:
    add a bunch of third-party ProFTPd add-on modules

  Summary:
    Revision    Changes     Path
    1.12        +21 -0      openpkg-src/proftpd/proftpd.patch
    1.99        +111 -12    openpkg-src/proftpd/proftpd.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/proftpd/proftpd.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.12 proftpd.patch
  --- /dev/null 2005-11-07 21:37:58 +0100
  +++ proftpd.patch     2005-11-07 21:37:58 +0100
  @@ -0,0 +1,21 @@
  +Index: mod_otp/mod_otp.c
  +--- mod_otp/mod_otp.c.orig   2002-10-31 02:16:23 +0100
  ++++ mod_otp/mod_otp.c        2005-11-07 21:15:19 +0100
  +@@ -127,7 +127,7 @@
  +         ": error generating challenge for user '%s': %s", cmd->argv[1], 
str);
  + 
  +   } else
  +-    add_response(R_DUP, "Challenge: [ %s ]", challenge);
  ++    pr_response_add(R_DUP, "Challenge: [ %s ]", challenge);
  + 
  +   return DECLINED(cmd);
  + }
  +@@ -203,7 +203,7 @@
  + 
  + static cmdtable otp_cmdtab[] = {
  +   { POST_CMD,       C_USER, G_NONE, otp_post_user,          FALSE,  FALSE },
  +-  { NULL }
  ++  { 0, NULL }
  + };
  + 
  + static authtable otp_authtab[] = {
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/proftpd/proftpd.spec
  ============================================================================
  $ cvs diff -u -r1.98 -r1.99 proftpd.spec
  --- openpkg-src/proftpd/proftpd.spec  1 Nov 2005 07:33:46 -0000       1.98
  +++ openpkg-src/proftpd/proftpd.spec  7 Nov 2005 20:37:58 -0000       1.99
  @@ -22,6 +22,16 @@
   ##  SUCH DAMAGE.
   ##
   
  +#   package version
  +%define       V_proftpd         1.3.0rc3
  +%define       V_mod_exec        0.9
  +%define       V_mod_exec        0.9
  +%define       V_mod_otp         0.9
  +%define       V_mod_shaper      0.5.6
  +%define       V_mod_sql_sqlite  0.1
  +%define       V_mod_time        2.2.1
  +%define       V_mod_vroot       0.7.1
  +
   #   package information
   Name:         proftpd
   Summary:      Professional FTP Daemon
  @@ -32,15 +42,18 @@
   Class:        BASE
   Group:        FTP
   License:      GPL
  -Version:      1.3.0rc3
  -Release:      20051101
  +Version:      %{V_proftpd}
  +Release:      20051107
   
   #   package options
   %option       with_ifsession  no
  -%option       with_mysql      no
   %option       with_pam        no
  +%option       with_mysql      no
   %option       with_pgsql      no
  +%option       with_sqlite     no
   %option       with_ldap       no
  +%option       with_skey       no
  +%option       with_opie       no
   
   #   checking option conflicts
   %if "%{with_mysql}" == "yes" && "%{with_pgsql}" == "yes"
  @@ -48,11 +61,18 @@
   %endif
   
   #   list of sources
  -Source0:      ftp://ftp.proftpd.org/distrib/source/proftpd-%{version}.tar.bz2
  -Source1:      proftpd.conf
  -Source2:      proftpd.msg.goaway
  -Source3:      proftpd.msg.login
  -Source4:      rc.proftpd
  +Source0:      
ftp://ftp.proftpd.org/distrib/source/proftpd-%{V_proftpd}.tar.bz2
  +Source1:      
http://www.castaglia.net/proftpd/modules/proftpd-mod-exec-%{V_mod_exec}.tar.gz
  +Source2:      
http://www.castaglia.net/proftpd/modules/proftpd-mod-otp-%{V_mod_otp}.tar.gz
  +Source3:      
http://www.castaglia.net/proftpd/modules/proftpd-mod-shaper-%{V_mod_shaper}.tar.gz
  +Source4:      
http://www.castaglia.net/proftpd/modules/proftpd-mod-sql-sqlite-%{V_mod_sql_sqlite}.tar.gz
  +Source5:      
http://www.castaglia.net/proftpd/modules/proftpd-mod-time-%{V_mod_time}.tar.gz
  +Source6:      
http://www.castaglia.net/proftpd/modules/proftpd-mod-vroot-%{V_mod_vroot}.tar.gz
  +Source7:      proftpd.conf
  +Source8:      proftpd.msg.goaway
  +Source9:      proftpd.msg.login
  +Source10:     rc.proftpd
  +Patch0:       proftpd.patch
   
   #   build information
   Prefix:       %{l_prefix}
  @@ -73,10 +93,22 @@
   BuildPreReq:  postgresql, openssl
   PreReq:       postgresql, openssl
   %endif
  +%if "%{with_sqlite}" == "yes"
  +BuildPreReq:  sqlite
  +PreReq:       sqlite
  +%endif
   %if "%{with_ldap}" == "yes"
   BuildPreReq:  openldap, openssl
   PreReq:       openldap, openssl
   %endif
  +%if "%{with_skey}" == "yes"
  +BuildPreReq:  skey
  +PreReq:       skey
  +%endif
  +%if "%{with_opie}" == "yes"
  +BuildPreReq:  opie
  +PreReq:       opie
  +%endif
   AutoReq:      no
   AutoReqProv:  no
   
  @@ -99,18 +131,51 @@
   
   %track
       prog proftpd = {
  -        version   = %{version}
  +        version   = %{V_proftpd}
           url       = ftp://ftp.proftpd.org/distrib/source/
           regex     = proftpd-(__VER__)\.tar\.bz2
       }
  +    prog proftpd:mod_exec = {
  +        version   = %{V_mod_exec}
  +        url       = http://www.castaglia.net/proftpd/
  +        regex     = proftpd-mod-exec-(__VER__)\.tar\.gz
  +    }
  +    prog proftpd:mod_shaper = {
  +        version   = %{V_mod_shaper}
  +        url       = http://www.castaglia.net/proftpd/
  +        regex     = proftpd-mod-shaper-(__VER__)\.tar\.gz
  +    }
  +    prog proftpd:mod_sql_sqlite = {
  +        version   = %{V_mod_sql_sqlite}
  +        url       = http://www.castaglia.net/proftpd/
  +        regex     = proftpd-mod-sql-sqlite-(__VER__)\.tar\.gz
  +    }
  +    prog proftpd:mod_time = {
  +        version   = %{V_mod_time}
  +        url       = http://www.castaglia.net/proftpd/
  +        regex     = proftpd-mod-time-(__VER__)\.tar\.gz
  +    }
  +    prog proftpd:mod_vroot = {
  +        version   = %{V_mod_vroot}
  +        url       = http://www.castaglia.net/proftpd/
  +        regex     = proftpd-mod-vroot-(__VER__)\.tar\.gz
  +    }
   
   %prep
       %setup -q
  +    %setup -q -D -T -a 1
  +    %setup -q -D -T -a 2
  +    %setup -q -D -T -a 3
  +    %setup -q -D -T -a 4
  +    %setup -q -D -T -a 5
  +    %setup -q -D -T -a 6
  +    %patch -p0
  +
       %{l_shtool} subst \
           -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
           configure
   
  -    #   utils also require link with getopt
  +    #   utils require to link with getopt
       %{l_shtool} subst \
           -e 's;\(\$(BUILD_FTPCOUNT_OBJS).*\);\1 %{l_ldflags} -lgetopt;g' \
           -e 's;\(\$(BUILD_FTPSHUT_OBJS).*\);\1 %{l_ldflags} -lgetopt;g' \
  @@ -124,17 +189,44 @@
           -e "s;\(-lmysqlclient\);$libs;g" \
           contrib/mod_sql_mysql.c
   %endif
  +
       #   libpq also requires openssl
       #   postgresql also doesn't provide its own include subdirectory
       %{l_shtool} subst \
           -e 's;\(-lpq\);\1 -lssl -lcrypto;g' \
           -e 's;^\(#include <\)pgsql/\(libpq-fe.h>.*\)$;\1postgresql/\2;' \
           contrib/mod_sql_postgres.c
  +
       #   libldap also requires openssl
       %{l_shtool} subst \
           -e 's;\(-llber\);\1 -lssl -lcrypto;g' \
           contrib/mod_ldap.c
   
  +    #   prepare mod_otp module
  +%if "%{with_skey}" == "yes" || "%{with_opie}" == "yes"
  +    ( cd mod_otp
  +      CC="%{l_cc}" \
  +      CFLAGS="%{l_cflags -O}" \
  +      CPPFLAGS="%{l_cppflags}" \
  +      LDFLAGS="%{l_ldflags}" \
  +      ./configure \
  +%if "%{with_skey}" == "yes"
  +          --with-skey
  +%endif
  +%if "%{with_opie}" == "yes"
  +          --with-opie
  +%endif
  +      cp mod_otp.[ch] ../contrib/
  +    ) || exit $?
  +%endif
  +
  +    #   prepare optional add-on modules
  +    cp mod_exec/mod_exec.c contrib/
  +    cp mod_shaper/mod_shaper.c contrib/
  +    cp mod_sql_sqlite/mod_sql_sqlite.c contrib/
  +    cp mod_time/mod_time.c contrib/
  +    cp mod_vroot/mod_vroot.c contrib/
  +
   %build
       #   make non-standard "rundir" the same as standard "sysconfdir"
       %{l_shtool} subst \
  @@ -150,13 +242,13 @@
           include/default_paths.h
   
       #   configure the ProFTPd source tree
  -    MOD="mod_ratio:mod_readme"
  +    
MOD="mod_ctrls_admin:mod_ratio:mod_readme:mod_exec:mod_shaper:mod_time:mod_vroot"
       MOD_INC="%{l_prefix}/include"
       MOD_LIB="%{l_prefix}/lib"
   %if "%{with_ifsession}" == "yes"
       MOD="$MOD:mod_ifsession"
   %endif
  -%if "%{with_mysql}" == "yes" || "%{with_pgsql}" == "yes"
  +%if "%{with_mysql}" == "yes" || "%{with_pgsql}" == "yes" || "%{with_sqlite}" 
== "yes"
       MOD="$MOD:mod_sql"
   %if "%{with_mysql}" == "yes"
       MOD="$MOD:mod_sql_mysql"
  @@ -166,10 +258,16 @@
       MOD="$MOD:mod_sql_postgres"
       MOD_INC=":%{l_prefix}/include/postgresql"
   %endif
  +%if "%{with_sqlite}" == "yes"
  +    MOD="$MOD:mod_sql_sqlite"
  +%endif
   %endif
   %if "%{with_ldap}" == "yes"
       MOD="$MOD:mod_ldap"
   %endif
  +%if "%{with_skey}" == "yes" || "%{with_opie}" == "yes"
  +    MOD="$MOD:mod_otp"
  +%endif
       CC="%{l_cc}" \
       CFLAGS="%{l_cflags -O}" \
   %if "%{with_pam}" == "yes"
  @@ -187,6 +285,7 @@
           --with-modules="$MOD" \
           --with-includes="$MOD_INC" \
           --with-libraries="$MOD_LIB" \
  +        --enable-ctrls \
           --without-getopt \
   %if "%{with_pam}" == "yes"
           --enable-auth-pam
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to