diff --git a/SPECS/mongo-java-driver.spec b/SPECS/mongo-java-driver.spec index 92a453a..28f1948 100644 --- a/SPECS/mongo-java-driver.spec +++ b/SPECS/mongo-java-driver.spec @@ -14,7 +14,7 @@ Name: %{?scl_prefix}mongo-java-driver Version: 2.11.4 -Release: 2%{?dist} +Release: 4%{?dist} Summary: A Java driver for MongoDB Group: Development/Libraries @@ -22,22 +22,13 @@ BuildArch: noarch License: ASL 2.0 URL: http://www.mongodb.org/display/DOCS/Java+Language+Center Source0: https://github.com/mongodb/%{pkg_name}/archive/r%{version}.tar.gz -%if 0%{?rhel} < 7 -Patch0: disable_testng.patch -%endif -BuildRequires: jpackage-utils -BuildRequires: java-devel -%if 0%{?rhel} < 7 -# This provides the maven macros and files the -# provides/requires generator uses internally -BuildRequires: javapackages-tools -BuildRequires: ant-apache-regexp -%else -BuildRequires: testng -%endif -BuildRequires: ant -BuildRequires: ant-contrib +BuildRequires: maven30-javapackages-tools +BuildRequires: maven30-maven-local +BuildRequires: maven30-ant-apache-regexp +BuildRequires: maven30-testng +BuildRequires: maven30-ant +BuildRequires: maven30-ant-contrib BuildRequires: git Requires: jpackage-utils @@ -87,35 +78,23 @@ This package contains the API documentation for %{name}-bson. find -name '*.class' -exec rm -f '{}' \; find -name '*.jar' -exec rm -f '{}' \; -%if 0%{?rhel} < 7 -# Tests are not run, disable TestNG task defn. -%patch0 -%endif - %build -%if 0%{?rhel} < 7 -# We need net/sf/antcontrib/antcontrib.properties in the class path. Otherwise -# the propertyregex task is not defined. The properties file comes from -# the ant-contrib jar. This is on the CP by default on rhel-7 -export CLASSPATH=%{_root_datadir}/java/ant/ant-contrib.jar -ant -Dfile.encoding=UTF-8 -Denv.JAVA_HOME=/usr/lib/jvm/java -Dplatforms.JDK_1.5.home=/usr/lib/jvm/java jar javadocs -%else +%{?scl:scl enable maven30 %{scl} - << "EOF"} ( ln -s $(build-classpath testng) lib/testng-6.3.1.jar ant -Dfile.encoding=UTF-8 -Denv.JAVA_HOME=/usr/lib/jvm/java -Dplatforms.JDK_1.5.home=/usr/lib/jvm/java jar javadocs ) -%endif sed -i -e "s|@VERSION@|%{version}|g" maven/maven-bson.xml maven/maven-mongo-java-driver.xml +%{?scl:EOF} %install +%{?scl:scl enable maven30 %{scl} - << "EOF"} # Jars install -d -m 755 %{buildroot}%{_javadir} install -p -m 644 *.jar %{buildroot}%{_javadir}/ # poms -%if 0%{?rhel} < 7 install -d -m 755 %{buildroot}%{_datadir}/maven-poms -%endif install -Dpm 644 maven/maven-mongo-java-driver.xml %{buildroot}%{_mavenpomdir}/JPP-mongo.pom install -Dpm 644 maven/maven-bson.xml %{buildroot}%{_mavenpomdir}/JPP-bson.pom %add_maven_depmap JPP-mongo.pom mongo.jar @@ -126,18 +105,19 @@ install -d -m 755 %{buildroot}%{_javadocdir}/%{name} install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-bson cp -r -p docs/mongo-java-driver/* %{buildroot}%{_javadocdir}/%{name} cp -r -p docs/bson/* %{buildroot}%{_javadocdir}/%{name}-bson +%{?scl:EOF} %files %{_javadir}/mongo.jar %doc README.md LICENSE.txt %{_mavenpomdir}/JPP-mongo.pom -%{_mavendepmapfragdir}/%{?scl_prefix}%{pkg_name} +%{_mavendepmapfragdir}/%{pkg_name} %files bson %{_javadir}/bson.jar %doc README.md LICENSE.txt %{_mavenpomdir}/JPP-bson.pom -%{_mavendepmapfragdir}/%{name}-bson +%{_mavendepmapfragdir}/%{pkg_name}-bson %files javadoc %{_javadocdir}/%{name} @@ -148,6 +128,13 @@ cp -r -p docs/bson/* %{buildroot}%{_javadocdir}/%{name}-bson %doc README.md LICENSE.txt %changelog +* Tue Jun 24 2014 Honza Horak - 2.11.4-4 +- Return java requirements + Related: #1110884 + +* Wed Jun 18 2014 Severin Gehwolf 2.11.4-3 +- Build using maven30 collection. + * Fri Mar 28 2014 Jan Pacner - 2.11.4-2 - Resolves: #1075025 (Leftovers files after mongodb packages removal)