diff --git a/.gitignore b/.gitignore index e69de29..4a0c58f 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/1.11.3.tar.gz diff --git a/scalacheck-1.11.3-ant-build.patch b/scalacheck-1.11.3-ant-build.patch new file mode 100644 index 0000000..1ef4505 --- /dev/null +++ b/scalacheck-1.11.3-ant-build.patch @@ -0,0 +1,77 @@ +--- upstream/build.xml 2014-01-22 00:41:09.000000000 +0100 ++++ gil/build.xml 2014-01-28 07:00:38.008161208 +0100 +@@ -1,46 +1,16 @@ + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ basedir="." default="build"> + ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -122,7 +92,7 @@ + + ++ value="${user.name}"/> + +@@ -144,7 +114,7 @@ + + + +- ++ +
+ + diff --git a/scalacheck.spec b/scalacheck.spec new file mode 100644 index 0000000..3b6cf36 --- /dev/null +++ b/scalacheck.spec @@ -0,0 +1,141 @@ +%global scalacheck_version 1.11.3 +%global scala_version 2.10 +%global SBT 0 +%global ANT 1 +%global build_style %{ANT} + +Name: scalacheck +Version: %{scalacheck_version} +Release: 1%{?dist} +Summary: property-based testing for Scala + +License: BSD +URL: http://www.scalacheck.org +Source0: https://github.com/rickynils/scalacheck/archive/%{scalacheck_version}.tar.gz + +%if %{build_style} == %{SBT} +# remove cross-compilation (not supported for Fedora) and +# binary-compatibility testing (due to unsupported deps) +Patch0: scalacheck-1.11.0-build.patch +%else +# We don't generate a POM from the ant build +Source1: http://repo1.maven.org/maven2/org/scalacheck/%{name}_%{scala_version}/%{version}/%{name}_%{scala_version}-%{version}.pom + +# remove maven-ant-tasks +Patch0: scalacheck-1.11.3-ant-build.patch +%endif + +BuildArch: noarch +BuildRequires: scala + +%if %{build_style} == %{SBT} +BuildRequires: sbt +%else +BuildRequires: ant +%endif + +BuildRequires: mvn(org.scala-sbt:test-interface) +BuildRequires: javapackages-tools +Requires: javapackages-tools +Requires: scala + +%description + +ScalaCheck is a library written in Scala and used for automated +property-based testing of Scala or Java programs. ScalaCheck was +originally inspired by the Haskell library QuickCheck, but has also +ventured into its own. + +ScalaCheck has no external dependencies other than the Scala runtime, +and works great with sbt, the Scala build tool. It is also fully +integrated in the test frameworks ScalaTest and specs2. You can of +course also use ScalaCheck completely standalone, with its built-in +test runner. + +%package javadoc +Group: Documentation +Summary: Javadoc for %{name} +BuildArch: noarch + +%description javadoc +Javadoc for %{name}. + +%prep +%setup -q +find . -name \*.class -delete +find . -name \*.jar -delete + +%if %{build_style} == %{SBT} +cp -r /usr/share/java/sbt/ivy-local . +mkdir boot +%else + +%endif + +%patch0 -p1 + +%if %{build_style} == %{SBT} +sed -i -e 's/0[.]13[.]0/0.13.1/g' project/build.properties +%endif + +%build + +%if %{build_style} == %{SBT} +export SBT_BOOT_DIR=boot +export SBT_IVY_DIR=ivy-local +sbt package deliverLocal publishM2Configuration +%else +ant -Dversion=%{version} jar doc +%endif + +%install + +%if %{build_style} == %{SBT} + +mkdir -p %{buildroot}/%{_javadir} +mkdir -p %{buildroot}/%{_mavenpomdir} + +mkdir -p %{buildroot}/%{_javadocdir}/%{name} + +install -pm 644 target/scala-%{scala_version}/%{name}_%{scala_version}-%{version}.jar %{buildroot}/%{_javadir}/%{name}.jar +install -pm 644 target/scala-%{scala_version}/%{name}_%{scala_version}-%{version}.pom %{buildroot}/%{_mavenpomdir}/JPP-%{name}.pom + +%add_maven_depmap JPP-%{name}.pom %{name}.jar + +cp -rp target/scala-%{scala_version}/api/* %{buildroot}/%{_javadocdir}/%{name} + +%else +mkdir -p %{buildroot}/%{_javadir} +install -m 644 target/%{name}-%{version}.jar %{buildroot}/%{_javadir}/%{name}.jar + +mkdir -p %{buildroot}/%{_mavenpomdir} +install -pm 644 %{SOURCE1} %{buildroot}/%{_mavenpomdir}/JPP-%{name}.pom +%add_maven_depmap JPP-%{name}.pom %{name}.jar + +mkdir -p %{buildroot}/%{_javadocdir}/%{name} +cp -rp target/doc/main/api/* %{buildroot}/%{_javadocdir}/%{name} + +# We only run %check in an ant build at the moment +%check +ant test + +%endif + +%files +%{_javadir}/%{name}.jar +%{_mavenpomdir}/JPP-%{name}.pom +%{_mavendepmapfragdir}/%{name} + +%doc LICENSE README.markdown RELEASE + +%files javadoc +%{_javadocdir}/%{name} +%doc LICENSE + +%changelog + +* Wed Jan 29 2014 William Benton - 1.11.3-1 +- added optional but on-by-default Ant build (thanks to Gil Cattaneo for contributing this!) + +* Mon Dec 23 2013 William Benton - 1.11.0-1 +- initial package diff --git a/scalacheck_2.10-1.11.3.pom b/scalacheck_2.10-1.11.3.pom new file mode 100644 index 0000000..6700f34 --- /dev/null +++ b/scalacheck_2.10-1.11.3.pom @@ -0,0 +1,44 @@ + + + 4.0.0 + org.scalacheck + scalacheck_2.10 + jar + scalacheck + http://www.scalacheck.org + 1.11.3 + + + BSD-style + http://www.opensource.org/licenses/bsd-license.php + repo + + + scalacheck + + org.scalacheck + http://www.scalacheck.org + + + https://github.com/rickynils/scalacheck + scm:git:git@github.com:rickynils/scalacheck.git + + + + rickynils + Rickard Nilsson + + + + + org.scala-lang + scala-library + 2.10.3 + + + org.scala-sbt + test-interface + 1.0 + + + \ No newline at end of file diff --git a/sources b/sources index e69de29..e599e54 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +4cd3d734f1bc8287b8fbff28be6e5cff 1.11.3.tar.gz