# Conditionals to help breaking groovy/gradle <-> gpars dependency cycle %if 0%{?fedora} %bcond_with groovy # Unavailable deps %bcond_with multiverse %endif Name: gpars Version: 1.2.1 Release: 1%{?dist} Summary: Groovy Parallel Systems License: ASL 2.0 Url: http://gpars.codehaus.org/ Source0: https://github.com/GPars/GPars/archive/release-%{version}.tar.gz Source1: http://repo1.maven.org/maven2/org/codehaus/%{name}/%{name}/%{version}/%{name}-%{version}.pom # for build require gradle > 1.x and grails for docs Source2: %{name}-build.xml Source3: %{name}-build.properties # Use JVM jsr166 and remove bundled extra166y Patch0: gpars-1.2.1-jsr166.patch # Latest relase require Groovy >= 2.1.9 %if %{without groovy} Source4: http://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/2.3.7/groovy-all-2.3.7.jar %endif Source5: http://www.apache.org/licenses/LICENSE-2.0.txt BuildRequires: java-devel BuildRequires: java-javadoc BuildRequires: javapackages-local # build deps BuildRequires: ant BuildRequires: aqute-bnd BuildRequires: OSGi-bundle-ant-task %if %{with groovy} BuildRequires: groovy-lib >= 2.1.9 BuildRequires: antlr-tool BuildRequires: apache-commons-cli %endif BuildRequires: objectweb-asm # main deps BuildRequires: extra166y BuildRequires: jcsp %if %{with multiverse} # https://bugzilla.redhat.com/show_bug.cgi?id=1159315 BuildRequires: multiverse %endif BuildRequires: netty3 BuildArch: noarch %description The GPars framework offers Java developers intuitive and safe ways to handle Java or Groovy tasks concurrently. Leveraging the enormous flexibility of the Groovy programing language and building on proven Java technologies, we aim to make concurrent programming for multi-core hardware intuitive, robust and enjoyable. GPars is a multi-paradigm concurrency framework, offering several mutually cooperating high-level concurrency abstractions, such as Dataflow operators, Promises, CSP, Actors, Asynchronous Functions, Agents and Parallel Collections. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n GPars-release-%{version} find . -name '*.jar' -delete find . -name '*.class' -delete cp -p %{SOURCE1} pom.xml # Use JVM jsr166 # Use system extra166y %pom_xpath_set "pom:dependencies/pom:dependency[pom:groupId = 'org.codehaus.jsr166-mirror']/pom:artifactId" extra166y %patch0 -p1 %pom_xpath_set "pom:dependencies/pom:dependency[pom:artifactId = 'netty']/pom:version" 3 for s in $(find . -name "*.java");do native2ascii -encoding UTF8 ${s} ${s} done cp -p %{SOURCE2} build.xml cp -p %{SOURCE3} build.properties sed -i "s|@VERSION@|%{version}|" build.properties %if %{without groovy} %pom_remove_dep org.codehaus.groovy:groovy-all cp -p %{SOURCE4} lib/groovy-all.jar sed -i 's|||' build.xml sed -i '/asm-all.jar/d' build.xml sed -i '/commons-cli.jar/d' build.xml sed -i '/antlr.jar/d' build.xml %endif # remove unavailable and optional multiverse support %if %{without multiverse} rm -rf src/main/groovy/groovyx/gpars/stm %pom_remove_dep org.multiverse: sed -i '/multiverse/d' build.xml %endif cp -p %{SOURCE5} . cp -p src/main/resources/META-INF/LICENSE.txt . cp -p src/main/resources/META-INF/NOTICE.txt . cp -p src/main/resources/META-INF/README . cp -p src/main/resources/META-INF/ReleaseNotest.txt . sed -i 's/\r//' LICENSE*.txt NOTICE.txt README* ReleaseNotest.txt %build %mvn_file org.codehaus.%{name}:%{name} %{name} export CLASSPATH=$(build-classpath objectweb-asm) ant %mvn_artifact pom.xml target/%{name}.org-%{version}.jar %install %mvn_install -J target/api %files -f .mfiles %doc LICENSE.txt LICENSE-2.0.txt NOTICE.txt README README.md ReleaseNotest.txt %files javadoc -f .mfiles-javadoc %doc LICENSE.txt LICENSE-2.0.txt NOTICE.txt %changelog * Tue Nov 04 2014 gil cattaneo 1.2.1-1 - update to 1.2.1 * Mon Nov 03 2014 gil cattaneo 1.0.0-2 - fix netty3 jar path - remove bundled extra166y * Fri Oct 31 2014 gil cattaneo 1.0.0-1 - update to 1.0.0 * Tue Sep 04 2012 gil cattaneo 0.12-1 - initial rpm