[javasqlite] Update to 20120209.
Ville Skyttä
scop at fedoraproject.org
Sat Feb 25 09:48:20 UTC 2012
commit b06b00fdcc8cdd9c39c7a977fc190ea0ddd2b0f5
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sat Feb 25 11:47:44 2012 +0200
Update to 20120209.
- Drop specfile constructs no longer needed in Fedora or EL6+.
javasqlite-javasqlite-jdbc-4.1.patch | 106 ----------------------------------
javasqlite.spec | 74 ++++++++++++++----------
2 files changed, 43 insertions(+), 137 deletions(-)
---
diff --git a/javasqlite.spec b/javasqlite.spec
index 04796f8..a732a94 100644
--- a/javasqlite.spec
+++ b/javasqlite.spec
@@ -1,35 +1,43 @@
-# No Java >= 1.6.0 available for ppc64 in EL6 as of 20110112
+# javaver nil: build for 1.5.0 and 1.6.0
+# javaver something else: build only for that
+
+%if 0%{?fedora} > 16
+# Java >= 1.7.0 stuff can't coexist in jar with older versions
+%global javaver 1.7.0
+%endif
+
%if 0%{?el6}
%ifarch ppc64
-%global only15 1
+# No Java >= 1.6.0 available for EL6 ppc64 as of 20120225
+%global javaver 1.5.0
%endif
%endif
+
%global __provides_exclude_from ^%{_libdir}/%{name}/.*\.so$
Name: javasqlite
-Version: 20110827
-Release: 3%{?dist}
+Version: 20120209
+Release: 1%{?dist}
Summary: SQLite Java Wrapper/JDBC Driver
-Group: Development/Libraries
License: BSD
URL: http://www.ch-werner.de/javasqlite/
Source0: http://www.ch-werner.de/javasqlite/%{name}-%{version}.tar.gz
# Fedora specific, no need to send upstream.
Patch0: %{name}-20090430-jnipath.patch
-Patch1: %{name}-javasqlite-jdbc-4.1.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# >= 3.4 for zeroblob stuff in %%check's test3
BuildRequires: sqlite-devel >= 3.4
-%if 0%{?only15}
-BuildRequires: java-1.5.0-javadoc
+%if 0%{?javaver:1}
+BuildRequires: java-%{javaver}-devel
+BuildRequires: java-%{javaver}-javadoc
+Requires: jre-%{javaver}
%else
-BuildRequires: java-devel >= 1.6
-BuildRequires: java-javadoc >= 1.6
-%endif
+BuildRequires: java-1.6.0-devel
+BuildRequires: java-1.6.0-javadoc
BuildRequires: java-1.5.0-devel
-Requires: jre
+Requires: jre >= 1.5.0
+%endif
%description
javasqlite is a Java wrapper including a basic JDBC driver for the
@@ -48,7 +56,6 @@ API documentation for %{name}.
%prep
%setup -q
-%patch1 -p1
sed -e 's|@JNIPATH@|%{_libdir}/%{name}|' %{PATCH0} | patch -p1 --fuzz=0
sed -i -e 's/\r//g' doc/ajhowto.txt
f=ChangeLog ; iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 ; mv $f.utf8 $f
@@ -63,11 +70,20 @@ common_flags="
--libdir=%{_libdir}/%{name}
"
+%if 0%{?javaver:1}
+
+export PATH="%{_jvmdir}/java-%{javaver}/bin:$origpath" # bug 460761
+%configure $common_flags --with-jdk=%{_jvmdir}/java-%{javaver}
+make sqlite.jar # Java build not parallel clean
+make %{?_smp_mflags}
+
+%else
+
# We build both JDBC 3 and 4 drivers here so the resulting jar includes both,
-# and in a way that the classfiles are usable with both Java 1.5 and >= 1.6.
+# and in a way that the classfiles are usable with both Java 1.5 and 1.6.
# The idea is to first build the JDBC 3 driver and common files with Java 1.5,
-# then JDBC 4 and remaining files with Java >= 1.6, the desired result being that
-# the Java >= 1.6 build will not recompile the common class files that were
+# then JDBC 4 and remaining files with Java 1.6, the desired result being that
+# the Java 1.6 build will not recompile the common class files that were
# previously built with 1.5.
# Pass #1: JDBC 3 driver and common files with 1.5.0
@@ -75,16 +91,14 @@ export PATH="%{_jvmdir}/java-1.5.0/bin:$origpath" # bug 460761
%configure $common_flags --with-jdk=%{_jvmdir}/java-1.5.0
make sqlite.jar JAVAC_FLAGS="-source 5" # Java build not parallel clean
-# Pass #2: JDBC 4 driver and the rest with >= 1.6.0
-%if 0%{?only15}
-make %{?_smp_mflags}
-%else
-export PATH="%{_jvmdir}/java/bin:$origpath" # bug 460761 (to be sure)
-%configure $common_flags --with-jdk=%{_jvmdir}/java
+# Pass #2: JDBC 4 driver and the rest with 1.6.0
+export PATH="%{_jvmdir}/java-1.6.0/bin:$origpath" # bug 460761 (to be sure)
+%configure $common_flags --with-jdk=%{_jvmdir}/java-1.6.0
make # Java build not parallel clean
# Add JDBC 3 classes
jar uf sqlite.jar SQLite/JDBC2y/*.class
+
%endif
make javadoc JAVADOCLINK=%{_javadocdir}/java
@@ -98,14 +112,10 @@ install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pR doc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
%check
origpath="$PATH"
-for javaver in -1.5.0 %{!?only15:} ; do
- jdir=%{_jvmdir}/java$javaver/bin
+for javaver in %{?javaver} %{!?javaver:1.5.0 1.6.0} ; do
+ jdir=%{_jvmdir}/java-$javaver/bin
export PATH="$jdir:$origpath" # bug 460761
# test2 is for SQLite 2.x, which we don't support
make JAVA_RUN="$jdir/java" JAVAC="$jdir/javac" test test3
@@ -113,19 +123,21 @@ done
%files
-%defattr(-,root,root,-)
%doc ChangeLog license.terms
%dir %{_libdir}/%{name}/
%{_libdir}/%{name}/sqlite.jar
%{_libdir}/%{name}/libsqlite_jni.so
%files javadoc
-%defattr(-,root,root,-)
%doc license.terms
%{_javadocdir}/%{name}
%changelog
+* Sat Feb 25 2012 Ville Skyttä <ville.skytta at iki.fi> - 20120209-1
+- Update to 20120209.
+- Drop specfile constructs no longer needed in Fedora or EL6+.
+
* Wed Jan 25 2012 Deepak Bhole <dbhole at redhat.com> - 20110827-3
- Removed specific Java 6 requirement
- Added patch to build with JDBC 4.1/Java 7
More information about the scm-commits
mailing list