diff --git a/mongo-java-driver.spec b/mongo-java-driver.spec new file mode 100644 index 0000000..ad9ca1b --- /dev/null +++ b/mongo-java-driver.spec @@ -0,0 +1,86 @@ +Name: mongo-java-driver +Version: 2.6.5 +Release: 1%{?dist} +Summary: A Java driver for MongoDB + +Group: Development/Libraries +BuildArch: noarch +License: ASL 2.0 +URL: http://www.mongodb.org/display/DOCS/Java+Language+Center +Source0: https://github.com/mongodb/mongo-java-driver/tarball/r2.6.5 + +BuildRequires: jpackage-utils +BuildRequires: java-devel + +BuildRequires: ant +BuildRequires: testng + +Requires: jpackage-utils +Requires: java + +Requires: %{name}-bson + +%description +This is the Java driver for MongoDB. + +%package bson +Summary: A Java-based BSON implementation +Group: Development/Libraries +Requires: jpackage-utils +Requires: java + +%description bson +This is the Java implementation of BSON that the Java driver for +MongoDB ships with. It can be used separately by Java applications +that require BSON. +# Upstream has hinted that eventually, their bson implementation will +# be better separated out: http://bsonspec.org/#/implementation +# To make things easier for when that does happen, for now the jar +# and javadocs for this are in separate subpackages. + +%package javadoc +Summary: Javadoc for %{name} and %{name}-bson +Group: Documentation +Requires: jpackage-utils + +%description javadoc +This package contains the API documentation for %{name} +and %{name}-bson. + +%prep +%setup -q -n mongodb-mongo-java-driver-ffe0029 + +find -name '*.class' -exec rm -f '{}' \; +find -name '*.jar' -exec rm -f '{}' \; + +%build +( + build-jar-repository -s -p lib testng + ant -Dplatforms.JDK_1.5.home=/usr/lib/jvm/java jar javadocs +) + +%install +# Jars +mkdir -p $RPM_BUILD_ROOT%{_javadir} +cp -p *.jar $RPM_BUILD_ROOT%{_javadir}/ + +# Java-docs +mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} +cp -rp docs/2.6.5 $RPM_BUILD_ROOT%{_javadocdir}/%{name} + +%files +%{_javadir}/mongo.jar +%doc README.md LICENSE.txt + +%files bson +%{_javadir}/bson.jar +%doc README.md LICENSE.txt + +%files javadoc +%{_javadocdir}/%{name} +%doc README.md LICENSE.txt + +%changelog +* Tue Oct 11 2011 Jon VanAlten - 2.6.5-1 +- Initial packaging of mongo-java-driver for Fedora. + diff --git a/r2.6.5 b/r2.6.5 new file mode 100644 index 0000000..932ac6d Binary files /dev/null and b/r2.6.5 differ