%global oname paho.mqtt.java Name: eclipse-paho-mqtt-java Version: 1.0.2 Release: 1%{?dist} Summary: MQTT client library written in Java License: EPL URL: https://eclipse.org/paho/clients/java/ # NO more available #Source0: http://git.eclipse.org/c/paho/%%{oname}.git/snapshot/%%{oname}-%%{version}.tar.xz Source0: https://github.com/eclipse/paho.mqtt.java/archive/v%{version}/%{oname}-%{version}.tar.gz BuildRequires: maven-local BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) BuildRequires: mvn(org.eclipse.tycho:tycho-maven-plugin) BuildRequires: mvn(org.eclipse.tycho:tycho-source-plugin) # OSGi build-requires. They can be regenerated with the following command: # sed -n 's/^Require-Bundle: //;T;:l;s/[;=,].*//;/^org.eclipse.paho/bn;s/..*/BuildRequires: osgi(&)/;T;p;:n;n;s/^ //;T;bl' `find -name *.MF` | sort -u BuildRequires: osgi(org.eclipse.core.databinding) BuildRequires: osgi(org.eclipse.core.databinding.beans) BuildRequires: osgi(org.eclipse.core.databinding.observable) BuildRequires: osgi(org.eclipse.core.databinding.property) BuildRequires: osgi(org.eclipse.core.runtime) BuildRequires: osgi(org.eclipse.jface.databinding) BuildRequires: osgi(org.eclipse.osgi.services) BuildRequires: osgi(org.eclipse.ui) Requires: eclipse-filesystem BuildArch: noarch %description The Paho Java Client is an MQTT client library written in Java for developing applications that run on the JVM or other Java compatible platforms such as Android. The Paho Java Client provides two APIs: * MqttAsyncClient provides a fully asynchronous API where completion of activities is notified via registered callbacks. * MqttClient is a synchronous wrapper around MqttAsyncClient where functions appear synchronous to the application. %package tests Summary: Paho MQTT Client testing helpers %description tests This package contains common code used by tests for Paho MQTT Client. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{oname}-%{version} # Cleanup find . -name "*.class" -print -delete find . -name "*.jar" -print -delete find . -name "*.zip" -print -delete # These don't currently build for mod in org.eclipse.paho.android.service \ org.eclipse.paho.client.mqttv3.repository do %pom_disable_module $mod rm -rf $mod done # Requires org.eclipse.equinox.executable.feature.group 0.0.0 %pom_disable_module org.eclipse.paho.ui.app org.eclipse.paho.ui rm -rf org.eclipse.paho.ui/org.eclipse.paho.ui.app # Replace manually the following values %pom_remove_plugin -r :templating-maven-plugin sed -i "s,\${project.version},%{version},;s,\${build.level},$(date +"%FT%TZ")," \ org.eclipse.paho.client.mqttv3/src/main/java-templates/org/eclipse/paho/client/mqttv3/internal/ClientComms.java # Test bundle goes to its own subpackage. %mvn_package ":org.eclipse.paho.client.mqttv3.test" tests %mvn_package ":org.eclipse.paho.client.mqttv3.test::tests:" tests %build # Building Paho MQTT Client. # See upstream documentation: https://eclipse.org/paho/clients/java/ # Tests require web connection %mvn_build -- -DskipTests %install %mvn_install %files -f .mfiles %doc README.md %license about.html edl-v10 epl-v10 notice.html %files tests -f .mfiles-tests %files javadoc -f .mfiles-javadoc %license about.html edl-v10 epl-v10 notice.html %changelog * Sun Aug 02 2015 gil cattaneo 1.0.2-1 - initial rpm