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:   12-Sep-2007 21:39:46
  Branch: HEAD                             Handle: 2007091220394500

  Modified files:
    openpkg-src/mysql       mysql.spec

  Log:
    add Java JDBC driver

  Summary:
    Revision    Changes     Path
    1.170       +37 -4      openpkg-src/mysql/mysql.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/mysql/mysql.spec
  ============================================================================
  $ cvs diff -u -r1.169 -r1.170 mysql.spec
  --- openpkg-src/mysql/mysql.spec      17 Aug 2007 12:39:36 -0000      1.169
  +++ openpkg-src/mysql/mysql.spec      12 Sep 2007 19:39:45 -0000      1.170
  @@ -27,6 +27,7 @@
   %define       V_minor   45
   %define       V_mysql   %{V_major}.%{V_minor}
   %define       V_opkg    %{V_major}.%{V_minor}
  +%define       V_jdbc    5.0.7
   
   #   package information
   Name:         mysql
  @@ -39,7 +40,7 @@
   Group:        Database
   License:      GPL
   Version:      %{V_opkg}
  -Release:      20070817
  +Release:      20070912
   
   #   package options
   %option       with_server      yes
  @@ -53,12 +54,14 @@
   %option       with_embedded    no
   %option       with_charset     utf8
   %option       with_collation   utf8_unicode_ci
  +%option       with_jdbc        no
   
   #   list of sources
   Source0:      
http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/MySQL-%{V_major}/mysql-%{V_mysql}.tar.gz
  -Source1:      my.cnf
  -Source2:      my.pwd
  -Source3:      rc.mysql
  +Source1:      
http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/Connector-J/mysql-connector-java-%{V_jdbc}.tar.gz
  +Source2:      my.cnf
  +Source3:      my.pwd
  +Source4:      rc.mysql
   Patch0:       mysql.patch
   
   #   build information
  @@ -72,6 +75,10 @@
   BuildPreReq:  openssl
   PreReq:       openssl
   %endif
  +%if "%{with_jdbc}" == "yes"
  +BuildPreReq:  java, JAVA-JDK, ant
  +PreReq:       java, JAVA-JDK, ant
  +%endif
   AutoReq:      no
   AutoReqProv:  no
   
  @@ -90,9 +97,17 @@
           url       = http://dev.mysql.com/downloads/mysql/%{V_major}.html
           regex     = mysql-(__VER__)\.tar\.gz
       }
  +    prog mysql:connector-jdbc = {
  +        version   = %{V_jdbc}
  +        url       = 
http://dev.mysql.com/downloads/connector/j/%{V_major}.html
  +        regex     = mysql-connector-java-(__VER__)\.tar\.gz
  +    }
   
   %prep
       %setup -q
  +%if "%{with_jdbc}" == "yes"
  +    %setup -q -T -D -a 1
  +%endif
       %patch -p0
   
   %build
  @@ -180,6 +195,15 @@
       #   build source tree
       %{l_make} %{l_mflags}
   
  +    #   build JDBC driver
  +%if "%{with_jdbc}" == "yes"
  +    ( cd mysql-connector-java-%{V_jdbc}
  +      export JAVA_PLATFORM="sun-jdk"
  +      eval `%{l_prefix}/bin/java-toolkit -e`
  +      %{l_prefix}/bin/ant
  +    ) || exit $?
  +%endif
  +
   %install
       rm -rf $RPM_BUILD_ROOT
   
  @@ -264,6 +288,15 @@
       ) || exit $?
   %endif
   
  +    #   install JDBC driver
  +%if "%{with_jdbc}" == "yes"
  +    ( cd mysql-connector-java-%{V_jdbc}
  +      %{l_shtool} install -c -m 644 \
  +          
build/mysql-connector-java-%{V_jdbc}/mysql-connector-java-%{V_jdbc}-bin.jar \
  +          $RPM_BUILD_ROOT%{l_prefix}/lib/mysql/mysql.jar
  +    ) || exit $?
  +%endif
  +
       #   determine the package files
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   %if "%{with_server}" == "yes"
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to