Blob Blame History Raw
Name:           h2
Version:        1.4.196
Release:        5%{?dist}
Summary:        Java SQL database

# Most classes are dual licensed as EPL/MPL
# One class is triple licensed EPL/MPL/LGPL: src/main/org/h2/jdbcx/JdbcConnectionPool.java
# Some tests are ASL licensed
License:        (EPL or MPLv2.0 or LGPLv3+) and ASL 2.0
URL:            http://www.h2database.com
Source0:        http://www.h2database.com/h2-2017-06-10.zip
Source1:        http://repo2.maven.org/maven2/com/h2database/h2/%{version}/h2-%{version}.pom

Patch0:         port-to-lucene-6.patch

BuildArch: noarch

BuildRequires:  javapackages-local
BuildRequires:  lucene >= 6.1.0
BuildRequires:  lucene-analysis >= 6.1.0
BuildRequires:  lucene-queryparser >= 6.1.0
BuildRequires:  slf4j
BuildRequires:  felix-osgi-core
BuildRequires:  glassfish-servlet-api
BuildRequires:  jts

%description
H2 is a the Java SQL database. The main features of H2 are: Very fast, open
source, JDBC API; Embedded and server modes; In-memory databases; Browser
based Console application; Small footprint: around 1 MB jar file size.

%package javadoc
Summary:        Javadocs for %{name}

%description javadoc
This package contains the API documentation for %{name}.

%prep
%setup -q -n %{name}
%patch0 -p2

# Because no Fedora package provides org.osgi.service.jdbc interfaces yet
rm src/main/org/h2/util/OsgiDataSourceFactory.java
sed -i -e '/OsgiDataSourceFactory/d' src/main/org/h2/util/DbDriverActivator.java
sed -i -e '/org.osgi.service.jdbc/d' src/main/META-INF/MANIFEST.MF

# Delete pre-built binaries
find -name '*.class' -delete
find -name '*.jar' -delete
find -name '*.exe' -delete
find -name '*.dll' -delete

%if 0%{?fedora} >= 29
# Fix jts package name
sed -i -e 's/com\.vividsolutions\.jts/org.locationtech.jts/' $(find -name *.java)
sed -i -e 's/vividsolutions/vividsolutions locationtech/' src/tools/org/h2/build/doc/dictionary.txt
%endif

# Don't attempt to download from Internet
sed -i -e '/downloadTest();/d' -e '/download();/d' \
  src/tools/org/h2/build/Build.java

# Tests that use the network
sed -i -e '/TestNetUtils/d' \
  src/test/org/h2/test/TestAll.java

# Use system libraries instead
mkdir ext
ln -s -T $(build-classpath jts) ext/jts-core-1.14.0.jar
ln -s -T $(build-classpath glassfish-servlet-api) ext/servlet-api-3.1.0.jar
ln -s -T $(build-classpath slf4j/api) ext/slf4j-api-1.6.0.jar
ln -s -T $(build-classpath slf4j/nop) ext/slf4j-nop-1.6.0.jar
ln -s -T $(build-classpath lucene/lucene-core) ext/lucene-core-6.1.0.jar
ln -s -T $(build-classpath lucene/lucene-analyzers-common) ext/lucene-analyzers-common-6.1.0.jar
ln -s -T $(build-classpath lucene/lucene-queryparser) ext/lucene-queryparser-6.1.0.jar
ln -s -T $(build-classpath felix/org.osgi.core) ext/org.osgi.core-4.2.0.jar

echo "classic queryparser" >> src/tools/org/h2/build/doc/dictionary.txt

%build
export JAVA_HOME=%{_jvmdir}/java
sh build.sh jar docs testFast

%install
%mvn_artifact %SOURCE1 bin/h2-%{version}.jar
%mvn_install -J docs/javadoc

%files -f .mfiles
%doc docs/index.html
%doc docs/html
%license src/docsrc/html/license.html

%files javadoc -f .mfiles-javadoc
%license src/docsrc/html/license.html

%changelog
* Fri Jun 08 2018 Mat Booth <mat.booth@redhat.com> - 1.4.196-5
- Fix build against newer lucenes

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.196-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Tue Jan 30 2018 Mat Booth <mat.booth@redhat.com> - 1.4.196-3
- License update

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.196-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Tue Jun 13 2017 Mat Booth <mat.booth@redhat.com> - 1.4.196-1
- Update to latest upstream revision
- Drop upstreamed patch
- Port to lucene 6
- Enable fast test suite

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.192-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Aug 08 2016 Mat Booth <mat.booth@redhat.com> - 1.4.192-1
- Update to latest upstream release
- Port to latest lucene and servlet APIs
- Install with xmvn

* Tue Feb 23 2016 Mat Booth <mat.booth@redhat.com> - 1.3.176-6
- License correction.

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.176-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jun 17 2015 Alexander Kurtakov <akurtako@redhat.com> 1.3.176-4
- Fix FTBFS - delete more tests.

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.176-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Fri Jun 13 2014 Mat Booth <mat.booth@redhat.com> - 1.3.176-2
- Fix erroneous osgi dep on org.osgi.service.jdbc

* Wed Jun 11 2014 Mat Booth <mat.booth@redhat.com> - 1.3.176-1
- Update to latest upstream stable release
- Fix lucene BRs
- Patch to remove implementation of non-existant inferface
- Patch to fix tests broken by new servlet API

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.168-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri Feb 21 2014 Alexander Kurtakov <akurtako@redhat.com> 1.3.168-5
- Require java-headless.

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.168-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.168-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Jul 23 2012 Alexander Kurtakov <akurtako@redhat.com> 1.3.168-2
- Bring back real pom.

* Mon Jul 23 2012 Alexander Kurtakov <akurtako@redhat.com> 1.3.168-1
- Update to latest upstream.

* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.147-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Thu Mar  8 2012 Andy Grimm <agrimm@gmail.com> - 1.2.147-6
- Add a POM file

* Tue Jan 24 2012 Deepak Bhole <dbhole@redhat.com> - 1.2.147-5
- Added patch for JDBC 4.1/Java 7 support (based on upstream patch)

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.147-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Fri Feb 18 2011 Chris Aniszczyk <zx@redhat.com> 1.2.147-3
- Fix build to use the correct version of servlet APIs.

* Fri Feb 18 2011 Chris Aniszczyk <zx@redhat.com> 1.2.147-2
- Fix build to properly export JAVA_HOME.

* Fri Feb 18 2011 Chris Aniszczyk <zx@redhat.com> 1.2.147-1
- Update to the latest stable release.

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.145-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Dec 6 2010 Alexander Kurtakov <akurtako@redhat.com> 1.2.145-3
- Fix build to not screw osgi metadata.

* Mon Dec 6 2010 Alexander Kurtakov <akurtako@redhat.com> 1.2.145-2
- Install jar without version.

* Wed Nov 17 2010 Chris Aniszczyk <zx@redhat.com> 1.2.145-1
- Initial packaging