%global namedreltag .RELEASE
%global namedversion %{version}%{?namedreltag}
Name: reactor
# Newer 3.x series are not compatible with latest springframework release
Version: 2.0.8
Release: 1%{?dist}
Summary: Reactive fast data framework for the JVM
License: ASL 2.0
URL: http://projectreactor.io/
Source0: https://github.com/reactor/reactor/archive/v%{namedversion}/%{name}-%{namedversion}.tar.gz
# Too many unavailable gradle plugins
# sh reactor-get-poms.sh < VERSION >
Source1: reactor-%{namedversion}-poms.tar.xz
Source2: reactor-get-poms.sh
# https://github.com/reactor/reactor-core/blob/master/LICENSE
Source3: reactor-LICENSE
# Replace io.gatling:jsr166e:1.0 with system java.util.concurrent
Patch0: reactor-2.0.8-use-system-jvm-jsr166.patch
Patch1: reactor-2.0.8-port-to-logback1.1.7.patch
BuildRequires: maven-local
BuildRequires: mvn(ch.qos.logback:logback-classic)
BuildRequires: mvn(commons-cli:commons-cli)
BuildRequires: mvn(commons-collections:commons-collections)
BuildRequires: mvn(com.esotericsoftware.kryo:kryo)
BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind)
BuildRequires: mvn(com.goldmansachs:gs-collections)
BuildRequires: mvn(com.google.code.findbugs:jsr305)
BuildRequires: mvn(com.google.protobuf:protobuf-java)
BuildRequires: mvn(com.jayway.jsonpath:json-path) >= 2.0.0
BuildRequires: mvn(com.lmax:disruptor)
BuildRequires: mvn(io.netty:netty-all)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.httpcomponents:fluent-hc)
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
BuildRequires: mvn(org.codehaus.gmavenplus:gmavenplus-plugin)
BuildRequires: mvn(org.codehaus.groovy:groovy)
BuildRequires: mvn(org.hamcrest:hamcrest-library)
BuildRequires: mvn(net.openhft:chronicle)
BuildRequires: mvn(net.openhft:lang)
BuildRequires: mvn(org.reactivestreams:reactive-streams)
BuildRequires: mvn(org.reactivestreams:reactive-streams-tck)
BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.spockframework:spock-core)
BuildRequires: mvn(org.testng:testng)
BuildRequires: mvn(org.xerial.snappy:snappy-java)
BuildRequires: mvn(org.zeromq:jeromq)
BuildRequires: protobuf-compiler
BuildRequires: /usr/bin/asciidoc
BuildArch: noarch
%description
Reactor is a foundational library building for reactive fast
data applications on the JVM. It provides abstractions for Java,
Groovy, Clojure andother JVM languages to make building event and
data-driven applications easier. Various dispatchers are available to
provide the developer with a range of choices from thread-pool
style, long-running task execution to non-blocking, high-volume task
dispatching.
%package alloc
Summary: Reactor Pooling utilities
%description alloc
This package provides Reactor Pooling utilities.
%package bus
Summary: Reactor Event Bus components
%description bus
This package provides Reactor Event Bus components.
%package core
Summary: Core Reactor components
%description core
This package provides Core Reactor components.
%package groovy
Summary: Reactor Groovy components
%description groovy
This package provides Reactor Groovy components.
%package groovy-extensions
Summary: Reactor Groovy Ext components
%description groovy-extensions
This package provides Reactor Groovy Extensions components.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%package logback
Summary: Disruptor-based AsyncAppender for Logback
%description logback
The `reactor-logback` module is somewhat misleadingly-named.
There are no Reactor dependencies in it. It uses the
LMAX Disruptor RingBuffer directly to provide high-speed,
asynchronous logging for applications that don't want to
give up logging just because it kills the performance of
your async application.
%package net
Summary: Reactor TCP components
%description net
This package provides Reactor TCP components.
%package stream
Summary: Reactor Stream components
%description stream
This package provides Reactor Stream components.
%prep
%setup -q -n %{name}-%{namedversion} -a1
# Cleanup
find . -name "*.jar" -print -delete
find . -name "*.class" -print -delete
%patch0 -p1
%patch1 -p1
cp -p %SOURCE3 LICENSE
# This is a dummy POM added just to ease building in the RPM platforms
cat > pom.xml << EOF
4.0.0
io.projectreactor
projectreactor
pom
%{namedversion}
reactor-alloc
reactor-bus
reactor-core
reactor-groovy
reactor-groovy-extensions
reactor-logback
reactor-net
reactor-stream
org.apache.maven.plugins
maven-javadoc-plugin
2.7
UTF-8
true
true
Reactor JavaDoc \${project.version}
true
\${basedir}/src/api/stylesheet.css
\${basedir}/src/api/overview.html
\${basedir}/src/api
*.test.*
-Xdoclint:none
org.apache.maven.plugins
maven-javadoc-plugin
2.7
javadoc
groovy-stubs.test.*
EOF
for p in alloc \
bus \
core \
groovy \
groovy-extensions \
logback \
net \
stream; do
# Add OSGi support
%pom_xpath_inject "pom:project" "bundle" reactor-${p}
%pom_add_plugin org.apache.felix:maven-bundle-plugin:2.5.4 reactor-${p} "
true
true
\${project.groupId}.${p}
\${project.name}
\${project.version}
bundle-manifest
process-classes
manifest
"
# lambda expressions are not supported in -source 1.5
%pom_add_plugin org.apache.maven.plugins:maven-compiler-plugin:3.0 reactor-${p} '
1.8
UTF-8
'
# Add missing test deps
%pom_add_dep junit:junit:4.12:test reactor-${p}
done
for p in groovy \
groovy-extensions;do
%pom_add_plugin org.codehaus.gmavenplus:gmavenplus-plugin:1.5 reactor-${p} "
UTF-8
generateStubs
"
done
for m in alloc core stream net; do
%pom_add_plugin org.codehaus.gmavenplus:gmavenplus-plugin:1.5 reactor-${m} "
UTF-8
"${basedir}/target/generated-test-sources"
testGenerateStubs
"
# Add missing test deps
%pom_add_dep org.codehaus.groovy:groovy:2.4.1:test reactor-${m}
%pom_add_dep org.spockframework:spock-core:0.7-groovy-2.0:test reactor-${m}
done
%pom_add_plugin org.apache.maven.plugins:maven-antrun-plugin reactor-core '
generate-test-sources
generate-sources
target/generated-test-sources
run
'
# Use hadoop 1.1.2
rm -r reactor-net/src/test/java/reactor/io/net/tcp/syslog/SyslogTcpServerTests.java \
reactor-net/src/test/java/reactor/io/net/tcp/syslog/hdfs
# Unbundle disruptor/system libraries
find ./reactor-core -name "*.java" -exec sed -i "s/reactor.jarjar.com.lmax.disruptor/com.lmax.disruptor/g" {} +
find ./reactor-core -name "*.groovy" -exec sed -i "s/reactor.jarjar.com.lmax.disruptor/com.lmax.disruptor/g" {} +
find ./reactor-stream -name "*.java" -exec sed -i "s/reactor.jarjar.com.lmax.disruptor/com.lmax.disruptor/g" {} +
%pom_add_dep com.lmax:disruptor:3.3.2 reactor-core
%pom_add_dep com.lmax:disruptor:3.3.2:test reactor-stream
# Add missing test deps ^
%pom_add_dep org.reactivestreams:reactive-streams-tck:1.0.0:test reactor-core
%pom_add_dep org.hamcrest:hamcrest-library:1.3:test reactor-core
%pom_add_dep org.hamcrest:hamcrest-library:1.3:test reactor-net
%pom_add_dep com.esotericsoftware:kryo:3.0.3:test reactor-net
%pom_add_dep org.apache.httpcomponents:fluent-hc:4.3.6:test reactor-net
%pom_add_dep commons-collections:commons-collections:3.2.2:test reactor-net
%pom_add_dep org.testng:testng:6.8.21:test reactor-stream
%pom_add_dep org.reactivestreams:reactive-streams-tck:1.0.0:test reactor-stream
%pom_add_dep org.hamcrest:hamcrest-library:1.3:test reactor-stream
%pom_add_dep io.projectreactor:reactor-bus:'${project.version}':test reactor-stream
%pom_add_dep com.fasterxml.jackson.core:jackson-databind:2.5.1:test reactor-stream
%pom_add_dep org.testng:testng:6.8.21:test reactor-core
%mvn_package :projectreactor __noinstall
%build
%mvn_build -s -- -Dproject.build.sourceEncoding=UTF-8
%install
%mvn_install
%files alloc -f .mfiles-reactor-alloc
%files bus -f .mfiles-reactor-bus
%files core -f .mfiles-reactor-core
%doc CHANGELOG.md README.md
%license LICENSE
%files groovy -f .mfiles-reactor-groovy
%files groovy-extensions -f .mfiles-reactor-groovy-extensions
%files javadoc -f .mfiles-javadoc
%license LICENSE
%files logback -f .mfiles-reactor-logback
%doc reactor-logback/README.md
%files net -f .mfiles-reactor-net
%files stream -f .mfiles-reactor-stream
%changelog
* Sat Jul 23 2016 gil cattaneo 2.0.8-1
- update to 2.0.8
* Wed Feb 10 2016 gil cattaneo 2.0.7-1
- update to 2.0.7
* Sun Oct 25 2015 gil cattaneo 1.1.6-1
- initial rpm