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:05:33 Branch: HEAD Handle: 2007091220053300 Modified files: openpkg-src/sqlite sqlite.spec Log: add Java JDBC driver Summary: Revision Changes Path 1.155 +43 -1 openpkg-src/sqlite/sqlite.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/sqlite/sqlite.spec ============================================================================ $ cvs diff -u -r1.154 -r1.155 sqlite.spec --- openpkg-src/sqlite/sqlite.spec 6 Sep 2007 13:27:10 -0000 1.154 +++ openpkg-src/sqlite/sqlite.spec 12 Sep 2007 19:05:33 -0000 1.155 @@ -25,6 +25,7 @@ # package version %define V_sqlite 3.5.0 %define V_odbc 0.75 +%define V_jdbc 20070823 # package information Name: sqlite @@ -37,7 +38,7 @@ Group: Database License: PD Version: %{V_sqlite} -Release: 20070906 +Release: 20070912 # package options %option with_assert no @@ -46,10 +47,12 @@ %option with_fts1 no %option with_fts2 no %option with_odbc no +%option with_jdbc no # list of sources Source0: http://www.sqlite.org/sqlite-%{V_sqlite}.tar.gz Source1: http://www.ch-werner.de/sqliteodbc/sqliteodbc-%{V_odbc}.tar.gz +Source2: http://www.ch-werner.de/javasqlite/javasqlite-%{V_jdbc}.tar.gz Patch0: sqlite.patch Patch1: sqlite.patch.odbc @@ -66,6 +69,10 @@ BuildPreReq: ODBC PreReq: ODBC %endif +%if "%{with_jdbc}" == "yes" +BuildPreReq: java, JAVA-JDK +PreReq: java, JAVA-JDK +%endif AutoReq: no AutoReqProv: no @@ -91,6 +98,11 @@ url = http://www.ch-werner.de/sqliteodbc/ regex = sqliteodbc-(__VER__)\.tar\.gz } + prog sqlite:jdbc = { + version = %{V_jdbc} + url = http://www.ch-werner.de/javasqlite/overview-summary.html + regex = javasqlite-(\d+)\.tar\.gz + } %prep %setup -q @@ -99,6 +111,9 @@ %setup -q -D -T -a 1 %patch -p0 -d sqliteodbc-%{V_odbc} -P 1 %endif +%if "%{with_jdbc}" == "yes" + %setup -q -D -T -a 2 +%endif # post-adjust sources %{l_shtool} subst \ @@ -169,6 +184,26 @@ ) || exit $? %endif + # optionally build JDBC driver +%if "%{with_jdbc}" == "yes" + ( cd javasqlite-%{V_jdbc} + export JAVA_PLATFORM="sun-jdk" + eval `%{l_prefix}/bin/java-toolkit -e` + export CC="%{l_cc}" + export CFLAGS="%{l_cflags -O}" + export CPPFLAGS="" + export LDFLAGS="" + CPPFLAGS="$CPPFLAGS -I.." + LDFLAGS="$LDFLAGS -L../.libs" + ./configure \ + --prefix=%{l_prefix} \ + --with-jardir=%{l_prefix}/lib \ + --with-jdk=$JAVA_HOME \ + --with-sqlite3=.. + %{l_make} %{l_mflags} + ) || exit $? +%endif + %install # create installation hierarchy rm -rf $RPM_BUILD_ROOT @@ -192,6 +227,13 @@ ) || exit $? %endif + # install SQLite JDBC driver (optional) +%if "%{with_jdbc}" == "yes" + ( cd javasqlite-%{V_jdbc} + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + ) || exit $? +%endif + # strip down installation files strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true @@ . ______________________________________________________________________ OpenPKG http://openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org