51b39f8
# This package is a component of sbt, but needs sbt to build.  Use this to
51b39f8
# bootstrap when sbt is not available.
51b39f8
%bcond_with sbt
51b39f8
51b39f8
# Scal build version
51b39f8
%global scala_version 2.12
William Benton 53fa0cc
William Benton 53fa0cc
Name:           scalacheck
51b39f8
Version:        1.15.2
51b39f8
Release:        1%{?dist}
51b39f8
Summary:        Property-based testing for Scala
William Benton 53fa0cc
William Benton 53fa0cc
License:        BSD
51b39f8
URL:            http://www.scalacheck.org/
51b39f8
Source0:        https://github.com/typelevel/scalacheck/archive/%{version}/%{name}-%{version}.tar.gz
William Benton 53fa0cc
51b39f8
%if %{without sbt}
William Benton 53fa0cc
# We don't generate a POM from the ant build
51b39f8
Source1:       https://repo1.maven.org/maven2/org/scalacheck/%{name}_%{scala_version}/%{version}/%{name}_%{scala_version}-%{version}.pom
51b39f8
Source2:       %{name}.mf
51b39f8
Source3:       Generate.java
William Benton 53fa0cc
%endif
William Benton 53fa0cc
12e6a38
BuildArch:      noarch
51b39f8
51b39f8
BuildRequires:  maven-local
51b39f8
BuildRequires:  mvn(org.scala-sbt:test-interface)
51b39f8
%if %{without sbt}
51b39f8
BuildRequires:  mvn(org.scala-lang:scala-compiler)
William Benton 53fa0cc
%else
51b39f8
BuildRequires:  sbt
William Benton 53fa0cc
%endif
William Benton 53fa0cc
William Benton 53fa0cc
%description
William Benton 53fa0cc
ScalaCheck is a library written in Scala and used for automated
William Benton 53fa0cc
property-based testing of Scala or Java programs. ScalaCheck was
William Benton 53fa0cc
originally inspired by the Haskell library QuickCheck, but has also
William Benton 53fa0cc
ventured into its own.
William Benton 53fa0cc
William Benton 53fa0cc
ScalaCheck has no external dependencies other than the Scala runtime,
William Benton 53fa0cc
and works great with sbt, the Scala build tool. It is also fully
William Benton 53fa0cc
integrated in the test frameworks ScalaTest and specs2. You can of
William Benton 53fa0cc
course also use ScalaCheck completely standalone, with its built-in
William Benton 53fa0cc
test runner.
William Benton 53fa0cc
William Benton 53fa0cc
%prep
51b39f8
%autosetup
William Benton 53fa0cc
51b39f8
%if %{with sbt}
William Benton 53fa0cc
cp -r /usr/share/java/sbt/ivy-local .
William Benton 53fa0cc
mkdir boot
William Benton 53fa0cc
%endif
William Benton 53fa0cc
12e6a38
%mvn_file org.%{name}:%{name}_%{scala_version} %{name}
12e6a38
William Benton 53fa0cc
%build
51b39f8
%if %{without sbt}
51b39f8
# Generate files
51b39f8
GENDIR=$PWD/src/main/scala/org/scalacheck
51b39f8
cd project
51b39f8
cp -p %{SOURCE3} .
51b39f8
CLASSPATH=.:$(build-classpath scala/scala-library)
51b39f8
scalac -g:vars codegen.scala
51b39f8
javac -cp $CLASSPATH Generate.java
51b39f8
java -cp $CLASSPATH Generate $GENDIR
51b39f8
cd -
51b39f8
51b39f8
# Build the jar
51b39f8
mkdir target
51b39f8
files="project/codegen.scala $(find src/main/scala -name \*.scala)"
51b39f8
files="$files $(find src/main/scala-2.13- -name \*.scala)"
51b39f8
files="$files $(find jvm/src/main -name \*.scala)"
51b39f8
scalac -g:vars -release 11 -classpath $(build-classpath test-interface) \
51b39f8
  -d target $files
51b39f8
cd target
51b39f8
sed 's/@VERSION@/%{version}/g' %{SOURCE2} > %{name}.mf
51b39f8
jar -c -m %{name}.mf -f %{name}.jar org
51b39f8
cd -
51b39f8
%mvn_artifact %{SOURCE1} target/%{name}.jar
51b39f8
%else
12e6a38
export SBT_BOOT_DIR=$PWD/boot
12e6a38
export SBT_IVY_DIR=$PWD/ivy-local
William Benton 53fa0cc
sbt package deliverLocal publishM2Configuration
12e6a38
%mvn_artifact target/scala-%{scala_version}/%{name}_%{scala_version}-%{version}.pom target/scala-%{scala_version}/%{name}_%{scala_version}-%{version}.jar
William Benton 53fa0cc
%endif
William Benton 53fa0cc
William Benton 53fa0cc
%install
51b39f8
%mvn_install
William Benton 53fa0cc
12e6a38
%files -f .mfiles
51b39f8
%doc CHANGELOG.markdown README.markdown doc/UserGuide.md
12e6a38
%license LICENSE
William Benton 53fa0cc
William Benton 53fa0cc
%changelog
51b39f8
* Wed Jan 13 2021 Jerry James <loganjerry@gmail.com> - 1.15.2-1
51b39f8
- Version 1.15.2
51b39f8
f46f5d9
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.3-17
f46f5d9
- Second attempt - Rebuilt for
f46f5d9
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
f46f5d9
37e3956
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.3-16
37e3956
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
37e3956
7a9cf73
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 1.11.3-15
7a9cf73
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
7a9cf73
1195fe9
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.3-14
1195fe9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
1195fe9
8fe6804
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.3-13
8fe6804
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
8fe6804
7a8bdd5
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.3-12
7a8bdd5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
7a8bdd5
8ea7d5e
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.3-11
8ea7d5e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
8ea7d5e
d637a59
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.3-10
d637a59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d637a59
bba73b6
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.3-9
bba73b6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
bba73b6
0d2fb8d
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.3-8
0d2fb8d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
0d2fb8d
050d556
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.3-7
050d556
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
050d556
12e6a38
* Thu Aug 06 2015 gil cattaneo <puntogil@libero.it> 1.11.3-6
12e6a38
- Fix FTBFS RHBZ#1107280
12e6a38
- Introduce license macro
12e6a38
90f34da
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11.3-5
90f34da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
90f34da
b28f858
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11.3-4
b28f858
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
b28f858
William Benton 8c5cc38
* Mon Feb 10 2014 William Benton <willb@redhat.com> - 1.11.3-3
William Benton 8c5cc38
- rebuild
William Benton 8c5cc38
William Benton f009c59
* Thu Jan 30 2014 William Benton <willb@redhat.com> - 1.11.3-2 
William Benton f009c59
- rebuild now that all of our dependencies are in stable
William Benton f009c59
William Benton 53fa0cc
* Wed Jan 29 2014 William Benton <willb@redhat.com> - 1.11.3-1 
William Benton 53fa0cc
- added optional but on-by-default Ant build (thanks to Gil Cattaneo for contributing this!)
William Benton 53fa0cc
William Benton 53fa0cc
* Mon Dec 23 2013 William Benton <willb@redhat.com> - 1.11.0-1 
William Benton 53fa0cc
- initial package