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:   14-Jan-2007 21:36:52
  Branch: HEAD                             Handle: 2007011420365200

  Modified files:
    openpkg-src/radius      radius.patch radius.spec

  Log:
    add optional MySQL, PostgreSQL and ODBC support; add a bunch of
    packaging comments

  Summary:
    Revision    Changes     Path
    1.5         +21 -0      openpkg-src/radius/radius.patch
    1.53        +53 -5      openpkg-src/radius/radius.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/radius/radius.patch
  ============================================================================
  $ cvs diff -u -r1.4 -r1.5 radius.patch
  --- openpkg-src/radius/radius.patch   11 Dec 2006 12:50:07 -0000      1.4
  +++ openpkg-src/radius/radius.patch   14 Jan 2007 20:36:52 -0000      1.5
  @@ -63,3 +63,24 @@
    # if HAVE_STRERROR_R || defined strerror_r
    #  define __strerror_r strerror_r
    # endif     /* HAVE_STRERROR_R || defined strerror_r */
  +Index: configure
  +--- configure.orig   2006-11-24 13:43:29 +0100
  ++++ configure        2007-01-14 21:11:53 +0100
  +@@ -46112,7 +46112,7 @@
  + 
  +    for path in /usr/local/pgsql/lib /usr/pgsql/lib
  +    do
  +-      LIBS="$save_LIBS  -L$path -lpq"
  ++      LIBS="$save_LIBS  -L$path -lpq -lssl -lcrypto"
  +       cat >conftest.$ac_ext <<_ACEOF
  + /* confdefs.h.  */
  + _ACEOF
  +@@ -46169,7 +46169,7 @@
  +   ac_status=$?
  +   echo "$as_me:$LINENO: \$? = $ac_status" >&5
  +   (exit $ac_status); }; }; then
  +-  ra_cv_lib_pq=" -L$path -lpq"
  ++  ra_cv_lib_pq=" -L$path -lpq -lssl -lcrypto"
  +                         break
  + else
  +   echo "$as_me: failed program was:" >&5
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/radius/radius.spec
  ============================================================================
  $ cvs diff -u -r1.52 -r1.53 radius.spec
  --- openpkg-src/radius/radius.spec    1 Jan 2007 17:41:22 -0000       1.52
  +++ openpkg-src/radius/radius.spec    14 Jan 2007 20:36:52 -0000      1.53
  @@ -33,7 +33,12 @@
   Group:        RADIUS
   License:      GPL
   Version:      1.4
  -Release:      20061211
  +Release:      20070114
  +
  +#   package options
  +%option       with_mysql  no
  +%option       with_pgsql  no
  +%option       with_odbc   no
   
   #   list of sources
   Source0:      ftp://ftp.gnu.org/gnu/radius/radius-%{version}.tar.gz
  @@ -47,6 +52,18 @@
   PreReq:       OpenPKG, openpkg >= 20060823
   BuildPreReq:  readline
   PreReq:       readline
  +%if "%{with_mysql}" == "yes"
  +BuildPreReq:  mysql
  +PreReq:       mysql
  +%endif
  +%if "%{with_pgsql}" == "yes"
  +BuildPreReq:  postgresql
  +PreReq:       postgresql
  +%endif
  +%if "%{with_odbc}" == "yes"
  +BuildPreReq:  ODBC
  +PreReq:       ODBC
  +%endif
   AutoReq:      no
   AutoReqProv:  no
   
  @@ -69,9 +86,19 @@
       %patch -p0
   
   %build
  -    CC="%{l_cc}" \
  -    CPPFLAGS="%{l_cppflags}" \
  -    CFLAGS="%{l_cflags}" \
  +    #   configure program
  +    export CC="%{l_cc}"
  +    export CPPFLAGS="%{l_cppflags}"
  +    export CFLAGS="%{l_cflags}"
  +    export LDFLAGS="%{l_ldflags}"
  +    export LIBS=""
  +%if "%{with_mysql}" == "yes"
  +    CFLAGS="$CFLAGS `mysql_config --cflags`"
  +    LIBS="$LIBS `mysql_config --libs`"
  +%endif
  +%if "%{with_mysql}" == "yes"
  +    CPPFLAGS="$CPPFLAGS %{l_cppflags postgresql}"
  +%endif
       ./configure \
           --prefix=%{l_prefix} \
           --sysconfdir=%{l_prefix}/etc/radius \
  @@ -84,6 +111,15 @@
           --without-guile \
           --without-server-guile \
           --enable-snmp \
  +%if "%{with_mysql}" == "yes"
  +        --with-mysql \
  +%endif
  +%if "%{with_pgsql}" == "yes"
  +        --with-postgres \
  +%endif
  +%if "%{with_odbc}" == "yes"
  +        --with-odbc \
  +%endif
           --disable-pam \
           --disable-nls \
           --disable-shared
  @@ -92,26 +128,38 @@
           -e "s;/var/run;%{l_prefix}/var/radius/run;g" \
           config.status
       ./config.status
  +
  +    #   build program
       %{l_make} %{l_mflags -O}
   
   %install
  +    #   create installation hierarchy
       rm -rf $RPM_BUILD_ROOT
       %{l_shtool} mkdir -f -p \
           $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
           $RPM_BUILD_ROOT%{l_prefix}/etc/radius/raddb \
           $RPM_BUILD_ROOT%{l_prefix}/var/radius/log \
           $RPM_BUILD_ROOT%{l_prefix}/var/radius/run
  +
  +    #   install program
       %{l_shtool} subst \
           -e "s;%{l_prefix}/etc;$RPM_BUILD_ROOT%{l_prefix}/etc;g" \
           -e "s;%{l_prefix}/var;$RPM_BUILD_ROOT%{l_prefix}/var;g" \
           `find . -name Makefile -print`
  -    %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT 
raddbdir=%{l_prefix}/etc/radius/raddb/"
  +    %{l_make} %{l_mflags} install \
  +        AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT 
raddbdir=%{l_prefix}/etc/radius/raddb/"
  +
  +    #   install run-command script
       %{l_shtool} install -c -m 755 %{l_value -s -a} \
           %{SOURCE rc.radius} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  +
  +    #   strip down installation
       rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
       rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/security
       rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/xemacs
       strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  +
  +    #   determine installation files
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   
   %files -f files
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to