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:   13-Sep-2005 10:34:39
  Branch: HEAD                             Handle: 2005091309343900

  Modified files:
    openpkg-src/bacula      bacula.spec

  Log:
    'openpkg index' currently only support boolean yes/no comparisons for
    build-time options, hence we have to change the RDBMS selection to a
    similar approach we have in other packages. Not elegant, but at least
    consistent with the other packages and now working with 'openpkg
    index'

  Summary:
    Revision    Changes     Path
    1.12        +22 -12     openpkg-src/bacula/bacula.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/bacula/bacula.spec
  ============================================================================
  $ cvs diff -u -r1.11 -r1.12 bacula.spec
  --- openpkg-src/bacula/bacula.spec    5 Sep 2005 06:36:04 -0000       1.11
  +++ openpkg-src/bacula/bacula.spec    13 Sep 2005 08:34:39 -0000      1.12
  @@ -39,7 +39,7 @@
   Group:        System
   License:      GPL
   Version:      %{V_bacula}
  -Release:      20050905
  +Release:      20050913
   
   #   package options
   %option       with_server       yes
  @@ -47,12 +47,20 @@
   %option       with_group        %{l_rgrp}
   %option       with_ssl          yes
   %option       with_wrap         no
  -%option       with_db           sqlite
   %option       with_dvd          no
   %option       with_mtx          no
   %option       with_python       no
   %option       with_wxconsole    no
   %option       with_traymonitor  no
  +%option       with_db_sqlite    no
  +%option       with_db_pgsql     no
  +%option       with_db_mysql     no
  +
  +#   package option sanity check
  +%if "%{with_db_sqlite}" == "no" && "%{with_db_mysql}" == "no" && 
"%{with_db_pgsql}" == "no"
  +%undefine     with_db_sqlite
  +%define       with_db_sqlite    yes
  +%endif
   
   #   list of sources
   Source0:      http://osdn.dl.sourceforge.net/bacula/bacula-%{version}.tar.gz
  @@ -76,15 +84,15 @@
   BuildPreReq:  tcpwrappers
   PreReq:       tcpwrappers
   %endif
  -%if "%{with_db}" == "sqlite"
  +%if "%{with_db_sqlite}" == "yes"
   BuildPreReq:  sqlite
   PreReq:       sqlite
   %endif
  -%if "%{with_db}" == "mysql"
  +%if "%{with_db_mysql}" == "yes"
   BuildPreReq:  mysql
   PreReq:       mysql
   %endif
  -%if "%{with_db}" == "postgres"
  +%if "%{with_db_pgsql}" == "yes"
   BuildPreReq:  postgresql
   PreReq:       postgresql
   %endif
  @@ -155,12 +163,6 @@
           configure
   
       #   configure
  -    case "%{with_db}" in
  -        sqlite ) cfg_db="--with-sqlite=%{l_prefix}"     ;;
  -        mysql  ) cfg_db="--with-mysql=%{l_prefix}"      ;;
  -        pgsql  ) cfg_db="--with-postgresql=%{l_prefix}" ;;
  -        *      ) echo "with_db must be in (sqlite|mysql|pgsql)" 1>&2; exit 1 
;;
  -    esac
       CC="%{l_cc}" \
       CFLAGS="%{l_cflags -O}" \
       CPPFLAGS="%{l_cppflags}" \
  @@ -185,7 +187,15 @@
   %if "%{with_wrap}" == "yes"
           --with-tcp-wrappers=yes \
   %endif
  -        $cfg_db \
  +%if "%{with_db_sqlite}" == "yes"
  +        --with-sqlite=%{l_prefix} \
  +%endif
  +%if "%{with_db_mysql}" == "yes"
  +        --with-mysql=%{l_prefix} \
  +%endif
  +%if "%{with_db_pgsql}" == "yes"
  +        --with-postgresql=%{l_prefix} \
  +%endif
   %if "%{with_python}" == "yes" || "%{with_dvd}" == "yes"
           --with-python=%{l_prefix} \
   %endif
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to