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

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   10-Sep-2004 14:00:19
  Branch: HEAD                             Handle: 2004091013001800

  Modified files:
    openpkg-src/mysql41     mysql41.spec

  Log:
    sync with mysql package

  Summary:
    Revision    Changes     Path
    1.19        +22 -3      openpkg-src/mysql41/mysql41.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/mysql41/mysql41.spec
  ============================================================================
  $ cvs diff -u -r1.18 -r1.19 mysql41.spec
  --- openpkg-src/mysql41/mysql41.spec  10 Sep 2004 11:46:38 -0000      1.18
  +++ openpkg-src/mysql41/mysql41.spec  10 Sep 2004 12:00:18 -0000      1.19
  @@ -43,6 +43,7 @@
   Release:      20040910
   
   #   package options
  +%option       with_server    yes
   %option       with_bdb       yes
   %option       with_innodb    no
   %option       with_ssl       no
  @@ -59,8 +60,8 @@
   BuildRoot:    %{l_buildroot}
   BuildPreReq:  OpenPKG, openpkg >= 20040130, perl, gcc, make
   PreReq:       OpenPKG, openpkg >= 20040130, perl
  -BuildPreReq:  zlib
  -PreReq:       zlib
  +BuildPreReq:  zlib, readline, ncurses
  +PreReq:       zlib, readline, ncurses
   AutoReq:      no
   AutoReqProv:  no
   Provides:     mysql = %{version}-%{release}
  @@ -87,7 +88,6 @@
   %prep
       %setup -q -n mysql-%{V_mysql}
       %patch -p0
  -    touch cmd-line-utils/libedit/Makefile.in
   
   %build
       #   patch file search path
  @@ -106,6 +106,7 @@
       CXX="%{l_cxx}" \
       CFLAGS="%{l_cflags -O}" \
       CXXFLAGS="%{l_cxxflags -O}" \
  +    CPPFLAGS="%{l_cppflags ncurses}" \
       LDFLAGS="-L`pwd`/bdb/build_unix -L`pwd`/libmysql %{l_ldflags}" \
       ./configure \
           --prefix=%{l_prefix} \
  @@ -116,6 +117,9 @@
           --with-mysqld-user=%{l_musr} \
           --enable-thread-safe-client \
           --with-comment="%{l_openpkg_release}" \
  +%if "%{with_server}" != "yes"
  +        --without-server \
  +%endif
   %if "%{with_bdb}" == "yes"
           --with-berkeley-db \
   %endif
  @@ -205,13 +209,22 @@
       #   directory for temporary tables
       %{l_shtool} mkdir -f -p -m 700 $RPM_BUILD_ROOT%{l_prefix}/var/mysql/tmp
   
  +    #   optional client-only installation
  +%if "%{with_server}" != "yes"
  +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/bin/*
  +%endif
  +
       #   determine the package files
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  +%if "%{with_server}" == "yes"
           %{l_files_std} \
           '%config %{l_prefix}/etc/mysql/my.cnf' \
           '%config %{l_prefix}/etc/mysql/my.pwd' \
           '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/mysql' \
           '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/mysql/tmp'
  +%else
  +        %{l_files_std}
  +%endif
   
   %files -f files
   
  @@ -219,13 +232,16 @@
       rm -rf $RPM_BUILD_ROOT
   
   %pre
  +%if "%{with_server}" == "yes"
       #   before upgrade, save status and stop service
       [ $1 -eq 2 ] || exit 0
       eval `%{l_rc} mysql status 2>/dev/null | tee %{l_tmpfile}`
       %{l_rc} mysql stop 2>/dev/null
  +%endif
       exit 0
   
   %post
  +%if "%{with_server}" == "yes"
       if [ $1 -eq 1 ]; then
           #   after install, create initial database
           $RPM_INSTALL_PREFIX/bin/mysql_install_db \
  @@ -245,13 +261,16 @@
           { eval `cat %{l_tmpfile}`; rm -f %{l_tmpfile}; true; } >/dev/null 2>&1
           [ ".$mysql_active" = .yes ] && %{l_rc} mysql start
       fi
  +%endif
       exit 0
   
   %preun
  +%if "%{with_server}" == "yes"
       #   before erase, stop service and remove log files
       [ $1 -eq 0 ] || exit 0
       %{l_rc} mysql stop 2>/dev/null
       rm -f $RPM_INSTALL_PREFIX/var/mysql/*.log* >/dev/null 2>&1 || true
       rm -f $RPM_INSTALL_PREFIX/var/mysql/*.err* >/dev/null 2>&1 || true
  +%endif
       exit 0
   
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to