[uncommons-maths] Initial import (#1069495).

gil gil at fedoraproject.org
Wed Feb 26 14:14:03 UTC 2014


commit 23fcd27c6887d6a1167aff199b5e929495ad7909
Author: gil <puntogil at libero.it>
Date:   Wed Feb 26 15:14:37 2014 +0100

    Initial import (#1069495).

 .gitignore                      |    1 +
 sources                         |    1 +
 uncommons-maths-1.2.3-pom.patch |   86 ++++++++++++++++++++++++++
 uncommons-maths.spec            |  126 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 214 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..033bb55 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Release-1.2.3.tar.gz
diff --git a/sources b/sources
index e69de29..32042da 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+dc124b085a050666bf37c0c4140bcf55  Release-1.2.3.tar.gz
diff --git a/uncommons-maths-1.2.3-pom.patch b/uncommons-maths-1.2.3-pom.patch
new file mode 100644
index 0000000..533cddc
--- /dev/null
+++ b/uncommons-maths-1.2.3-pom.patch
@@ -0,0 +1,86 @@
+--- core/pom.xml	2012-11-22 20:30:12.000000000 +0100
++++ core/pom.xml-gil	2014-02-25 16:42:20.174853302 +0100
+@@ -19,4 +19,83 @@
+     </license>
+   </licenses>
+ 
++  <properties>
++    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
++    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
++  </properties>
++
++  <dependencies>
++    <dependency>
++      <groupId>org.jfree</groupId>
++      <artifactId>jcommon</artifactId>
++      <version>1.0.18</version>
++      <scope>runtime</scope>
++    </dependency>
++    <dependency>
++      <groupId>org.jfree</groupId>
++      <artifactId>jfreechart</artifactId>
++      <version>1.0.14</version>
++      <scope>runtime</scope>
++    </dependency>
++    <dependency>
++      <groupId>org.testng</groupId>
++      <artifactId>testng</artifactId>
++      <version>6.8</version>
++      <scope>test</scope>
++    </dependency>
++  </dependencies>
++
++  <build>
++    <sourceDirectory>src/java/main</sourceDirectory>
++    <testSourceDirectory>src/java/test</testSourceDirectory>
++    <plugins>
++      <plugin>
++        <groupId>org.apache.maven.plugins</groupId>
++        <artifactId>maven-compiler-plugin</artifactId>
++        <version>3.0</version>
++        <configuration/>
++      </plugin>
++      <plugin>
++        <groupId>org.apache.felix</groupId>
++        <artifactId>maven-bundle-plugin</artifactId>
++        <version>2.3.7</version>
++        <configuration>
++          <instructions>
++            <Export-Package>*;version=${project.version}</Export-Package>
++            <Bundle-SymbolicName>org.uncommons.maths</Bundle-SymbolicName>
++            <Bundle-Name>${project.name}</Bundle-Name>
++            <Bundle-Version>${project.version}</Bundle-Version>
++          </instructions>
++        </configuration>
++        <executions>
++          <execution>
++            <id>bundle-manifest</id>
++            <phase>process-classes</phase>
++            <goals>
++              <goal>manifest</goal>
++            </goals>
++          </execution>
++        </executions>
++      </plugin>
++      <plugin>
++        <groupId>org.apache.maven.plugins</groupId>
++        <artifactId>maven-jar-plugin</artifactId>
++        <version>2.4</version>
++        <configuration>
++          <archive>
++            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
++          </archive>
++        </configuration>
++      </plugin>
++      <plugin>
++        <groupId>org.apache.maven.plugins</groupId>
++        <artifactId>maven-javadoc-plugin</artifactId>
++        <version>2.9.1</version>
++        <configuration>
++          <doctitle>${project.name} ${project.version} API</doctitle>
++          <windowtitle>${project.name} ${project.version} API</windowtitle>
++        </configuration>
++      </plugin>
++    </plugins>
++  </build>
+ </project>
diff --git a/uncommons-maths.spec b/uncommons-maths.spec
new file mode 100644
index 0000000..ff7e99d
--- /dev/null
+++ b/uncommons-maths.spec
@@ -0,0 +1,126 @@
+%global with_ant 0
+Name:          uncommons-maths
+Version:       1.2.3
+Release:       1%{?dist}
+Summary:       Random number generators library for Java
+License:       ASL 2.0
+Url:           http://maths.uncommons.org/
+Source0:       https://github.com/dwdyer/uncommons-maths/archive/Release-%{version}.tar.gz
+# fix project encoding
+# add dependencies
+# add maven plugins configuration
+Patch0:        uncommons-maths-1.2.3-pom.patch
+BuildRequires: java-devel
+BuildRequires: mvn(org.jfree:jcommon)
+BuildRequires: mvn(org.jfree:jfreechart)
+
+%if %with_ant
+BuildRequires: ant
+BuildRequires: aqute-bnd
+BuildRequires: javapackages-tools
+# https://bugzilla.redhat.com/show_bug.cgi?id=1069493
+BuildRequires: uncommons-antlib
+
+Requires:      jcommon
+Requires:      jfreechart
+Requires:      java-headless
+Requires:      javapackages-tools
+%else
+BuildRequires: maven-local
+%endif
+
+%if 0
+# Test deps
+BuildRequires: mvn(org.testng:testng)
+%endif
+
+BuildArch:     noarch
+
+%description
+The Uncommons Maths library provides five easy-to-use,
+statistically sound, high-performance pseudo-random
+number generators (RNGs).
+
+%package javadoc
+Summary:       Javadoc for %{name}
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+%prep
+%setup -q -n %{name}-Release-%{version}
+find . -name "*.jar" -print -delete
+find . -name "*.class" -print -delete
+rm -r lib/compiletime/diehard/diehard
+
+%patch0 -p0
+sed -i "s|<version>@VERSION@</version>|<version>%{version}</version>|" core/pom.xml
+
+%if %with_ant
+pushd lib
+  pushd compiletime
+# unavailable ant task in aqute-bndlib pkg
+    ln -sf $(build-classpath aqute-bnd) bnd/bnd-1.50.0.jar
+    ln -sf $(build-classpath testng) testng/testng-5.13.1.jar
+    ln -sf $(build-classpath uncommons-antlib) uncommons-antlib-0.3.1.jar
+  popd
+  pushd runtime
+    ln -sf $(build-classpath jcommon) jcommon-1.0.12.jar
+    ln -sf $(build-classpath jfreechart/jfreechart) jfreechart-1.0.8.jar
+  popd
+popd
+
+sed -i 's|classpath="${artifact.identifier}.jar jfreechart-1.0.8.jar jcommon-1.0.12.jar"||' build.xml
+sed -i 's|depends="core, demo"|depends="core"|' build.xml
+%endif
+
+%build
+
+%if %with_ant
+ant
+ant docs
+%else
+cd core
+%mvn_file : %{name}
+# Test skipped unable to run test suite without uncommons-antlib support
+%mvn_build -f
+%endif
+
+%install
+
+%if %with_ant
+mkdir -p %{buildroot}%{_javadir}
+install -pm 644 core/build/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
+
+mkdir -p %{buildroot}%{_mavenpomdir}
+install -pm 644 core/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
+
+mkdir -p %{buildroot}%{_javadocdir}/%{name}
+cp -pr docs/api/* %{buildroot}%{_javadocdir}/%{name}
+%else
+cd core
+%mvn_install
+%endif
+
+%if %with_ant
+%files
+%{_javadir}/%{name}.jar
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
+%else
+%files -f core/.mfiles
+%endif
+%doc CHANGELOG.txt LICENCE.txt NOTICE.txt
+
+%if %with_ant
+%files javadoc
+%{_javadocdir}/%{name}
+%else
+%files javadoc -f core/.mfiles-javadoc
+%endif
+%doc LICENCE.txt NOTICE.txt
+
+%changelog
+* Fri Aug 23 2013 gil cattaneo <puntogil at libero.it> 1.2.3-1
+- initial rpm
\ No newline at end of file


More information about the scm-commits mailing list