Blame SPECS/mongo-java-driver.spec

1c4375
%{?scl:%scl_package mongo-java-driver}
1c4375
%{!?scl:%global pkg_name %{name}}
1c4375
1c4375
%if 0%{?rhel}
1c4375
# Use java common's requires/provides generator
1c4375
%{?java_common_find_provides_and_requires}
1c4375
%endif
1c4375
1c4375
%global buildscls %{scl_maven} %{scl}
1c4375
1c4375
Name:		%{?scl_prefix}mongo-java-driver
f9d792
Version:	3.5.0
1c4375
Release:	3%{?dist}
1c4375
Summary:	A Java driver for MongoDB
1c4375
1c4375
Group:		Development/Libraries
1c4375
BuildArch:	noarch
1c4375
License:	ASL 2.0
1c4375
URL:		http://www.mongodb.org/display/DOCS/Java+Language+Center
1c4375
Source0:	https://github.com/mongodb/%{pkg_name}/archive/r%{version}.tar.gz
1c4375
f9d792
Patch0:         0001-Maven-support.patch
f9d792
Patch1:         0002-Netty-update-workaround.patch
1c4375
f9d792
# since 3.4.2 Java 8 is required
f9d792
BuildRequires:	java-1.8.0-openjdk-devel
1c4375
BuildRequires:  %{?scl_prefix_maven}maven-local
1c4375
BuildRequires:  %{?scl_prefix_java_common}mvn(io.netty:netty-buffer)
1c4375
BuildRequires:  %{?scl_prefix_java_common}mvn(io.netty:netty-transport)
1c4375
BuildRequires:  %{?scl_prefix_java_common}mvn(io.netty:netty-handler)
1c4375
BuildRequires:  %{?scl_prefix_java_common}mvn(org.slf4j:slf4j-api)
1c4375
BuildRequires:  %{?scl_prefix_java_common}mvn(org.hamcrest:hamcrest-library)
1c4375
BuildRequires:  %{?scl_prefix_maven}mvn(org.apache.maven.plugins:maven-shade-plugin)
f9d792
BuildRequires:  %{?scl_prefix_maven}mvn(org.apache.felix:maven-bundle-plugin)
1c4375
1c4375
%description
1c4375
This is the Java driver for MongoDB.
1c4375
1c4375
%package bson
1c4375
Summary:	A Java-based BSON implementation
1c4375
Group:		Development/Libraries
1c4375
1c4375
%description bson
1c4375
This is the Java implementation of BSON that the Java driver for
1c4375
MongoDB ships with.  It can be used separately by Java applications
1c4375
that require BSON.
1c4375
# Upstream has hinted that eventually, their bson implementation will
1c4375
# be better separated out: http://bsonspec.org/#/implementation
1c4375
# To make things easier for when that does happen, for now the jar
1c4375
# and javadocs for this are in separate subpackages.
1c4375
1c4375
%package driver
1c4375
Summary:	The MongoDB Java Driver
1c4375
Group:		Development/Libraries
1c4375
1c4375
%description driver
1c4375
The MongoDB Java Driver
1c4375
1c4375
%package driver-core
1c4375
Summary:	The MongoDB Java Operations Layer
1c4375
Group:		Development/Libraries
1c4375
1c4375
%description driver-core
1c4375
The Java operations layer for the MongoDB Java Driver. Third
1c4375
parties can wrap this layer to provide custom higher-level APIs
1c4375
1c4375
%package driver-async
1c4375
Summary:	The MongoDB Java Async Driver
1c4375
Group:		Development/Libraries
1c4375
1c4375
%description driver-async
1c4375
The MongoDB Asynchronous Driver.
1c4375
1c4375
%package javadoc
1c4375
Summary:	Javadoc for %{name}
1c4375
Group:		Documentation
1c4375
1c4375
%description javadoc
1c4375
This package contains the API documentation for %{name}.
1c4375
1c4375
%prep
1c4375
%{?scl:scl enable %{buildscls} - << "EOF"}
1c4375
%setup -qn %{pkg_name}-r%{version}
1c4375
f9d792
%patch0 -p1
1c4375
%patch1 -p1
f9d792
f9d792
sed -i 's/@VERSION@/%{version}/g' `find -name pom.xml`
1c4375
1c4375
find -name '*.class' -exec rm -f '{}' \;
1c4375
find -name '*.jar' -exec rm -f '{}' \;
1c4375
set -ex
1c4375
%mvn_package org.mongodb:bson:* %{pkg_name}-bson
1c4375
%mvn_package org.mongodb:%{pkg_name}:* %{pkg_name}
1c4375
%mvn_package org.mongodb:mongodb-driver-core:* %{pkg_name}-driver-core
1c4375
%mvn_package org.mongodb:mongodb-driver-async:* %{pkg_name}-driver-async
1c4375
%mvn_package org.mongodb:mongodb-driver:* %{pkg_name}-driver
1c4375
%mvn_package org.mongodb:mongodb-javadoc-utils:* __noinstall
1c4375
%mvn_file org.mongodb:bson:* %{pkg_name}/bson
1c4375
%mvn_file org.mongodb:%{pkg_name}:* %{pkg_name}/mongo
1c4375
%mvn_file org.mongodb:mongodb-driver-core:* %{pkg_name}/driver-core
1c4375
%mvn_file org.mongodb:mongodb-driver-async:* %{pkg_name}/driver-async
1c4375
%mvn_file org.mongodb:mongodb-driver:* %{pkg_name}/driver
1c4375
%{?scl:EOF}
1c4375
f9d792
1c4375
%build
1c4375
%{?scl:scl enable %{buildscls} - << "EOF"}
1c4375
set -ex
1c4375
export MAVEN_OPTS="-Xmx2048m"
f9d792
# not very nice hack needed in RHEL6
f9d792
export JAVA_HOME="/usr/lib/jvm/java-1.8.0"
1c4375
%mvn_build -- -Dproject.build.sourceEncoding=UTF-8
1c4375
%{?scl:EOF}
1c4375
1c4375
%install
1c4375
%{?scl:scl enable %{buildscls} - << "EOF"}
1c4375
set -ex
1c4375
%mvn_install
1c4375
%{?scl:EOF}
1c4375
1c4375
%files -f .mfiles-%{pkg_name} -f .mfiles
1c4375
%doc README.md LICENSE.txt
1c4375
1c4375
%files bson -f .mfiles-%{pkg_name}-bson
1c4375
%doc README.md LICENSE.txt
f9d792
%dir %{_datadir}/java/mongo-java-driver
1c4375
%dir %{_datadir}/maven-metadata
f9d792
%dir %{_datadir}/maven-poms/mongo-java-driver
1c4375
1c4375
%files driver -f .mfiles-%{pkg_name}-driver
f9d792
%doc README.md LICENSE.txt
1c4375
1c4375
%files driver-core -f .mfiles-%{pkg_name}-driver-core
f9d792
%doc README.md LICENSE.txt
1c4375
1c4375
%files driver-async -f .mfiles-%{pkg_name}-driver-async
1c4375
1c4375
%files javadoc -f .mfiles-javadoc
1c4375
%doc README.md LICENSE.txt
1c4375
1c4375
1c4375
%changelog
f9d792
* Mon Oct 02 2017 Marek Skalický <mskalick@redhat.com> - 3.5.0-3
f9d792
- Fix directory ownership
f9d792
  Resolves: RHBZ#1466860
f9d792
f9d792
* Fri Sep 22 2017 Marek Skalický <mskalick@redhat.com> - 3.5.0-2
f9d792
- Update to latest upstream version
f9d792
  Resolves: RHBZ#1466860
f9d792
f9d792
* Mon Jul 03 2017 Tomas Repik <trepik@redhat.com> - 3.4.2-1
f9d792
- Update to 3.4.2
f9d792
  Resolves: RHBZ#1466860
f9d792
1c4375
* Tue Mar 29 2016 Severin Gehwolf <sgehwolf@redhat.com> - 3.2.1-3
1c4375
- Add basic OSGi metadata.
1c4375
1c4375
* Thu Feb 18 2016 Marek Skalicky <mskalick@redhat.com> - 3.2.1-2
1c4375
- Fixed directory ownership
1c4375
1c4375
* Tue Feb 2 2016 Marek Skalicky <mskalick@redhat.com> - 3.2.1-1
1c4375
- Upgrade to 3.2.1 release (from Fedora 24)
1c4375
1c4375
* Mon Jul 27 2015 Severin Gehwolf <sgehwolf@redhat.com> - 2.13.2-5
1c4375
- Fix bugs in SCL-ization. Most importantly, pkg name prefix.
1c4375
1c4375
* Mon Jul 27 2015 Severin Gehwolf <sgehwolf@redhat.com> - 2.13.2-4
1c4375
- SCL-ize package.
1c4375
1c4375
* Mon Jun 22 2015 Omair Majid <omajid@redhat.com> - 2.13.2-3
1c4375
- Require javapackages-tools, not jpackage-utils.
1c4375
1c4375
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.13.2-2
1c4375
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
1c4375
1c4375
* Wed Jun 10 2015 Severin Gehwolf <sgehwolf@redhat.com> - 2.13.2-1
1c4375
- Update to lastest upstream version.
1c4375
- Resolves RHBZ#1178257.
1c4375
1c4375
* Tue Jun 10 2014 Severin Gehwolf <sgehwolf@redhat.com> - 2.11.3-4
1c4375
- Fix FTBFS. Resolves RHBZ#1106228.
1c4375
- Fix @VERSION@ substitution. Resolves RHBZ#1048200.
1c4375
1c4375
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.11.3-3
1c4375
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
1c4375
1c4375
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 2.11.3-2
1c4375
- Use Requires: java-headless rebuild (#1067528)
1c4375
1c4375
* Tue Sep 24 2013 Severin Gehwolf <sgehwolf@redhat.com> - 2.11.3-1
1c4375
- Update to latest upstream release.
1c4375
1c4375
* Thu Sep 05 2013 Omair Majid <omajid@redhat.com> - 2.11.2-2
1c4375
- Do not require -bson subpackage. The classes are present in both jars.
1c4375
1c4375
* Fri Aug 30 2013 Omair Majid <omajid@redhat.com> - 2.11.2-1
1c4375
- Update to 2.11.2
1c4375
- Generate tarball from commit tag, according to packaging guidelines
1c4375
1c4375
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.3-4
1c4375
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
1c4375
1c4375
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.3-3
1c4375
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
1c4375
1c4375
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.3-2
1c4375
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
1c4375
1c4375
* Tue Apr 24 2012 Jon VanAlten <jon.vanalten@redhat.com> 2.7.3-1
1c4375
- Bump to 2.7.3.
1c4375
1c4375
* Mon Jan 16 2012 Alexander Kurtakov <akurtako@redhat.com> 2.6.5-4
1c4375
- Add depmap/pom.
1c4375
1c4375
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.5-3
1c4375
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
1c4375
1c4375
* Tue Nov 29 2011 Jon VanAlten <jon.vanalten@redhat.com> - 2.6.5-2
1c4375
- Sources moved to lookaside cache where they belong
1c4375
1c4375
* Tue Nov 29 2011 Jon VanAlten <jon.vanalten@redhat.com> - 2.6.5-1
1c4375
- Add missing BuildDep: git (git-hash is used during build)
1c4375
1c4375
* Tue Oct 11 2011 Jon VanAlten <jon.vanalten@redhat.com> - 2.6.5-1
1c4375
- Initial packaging of mongo-java-driver for Fedora.