%global test_interface_version 1.0 %global build_with_sbt 0 Name: test-interface Version: %{test_interface_version} Release: 14%{?dist} Summary: Uniform interface to Scala and Java test frameworks License: BSD URL: https://github.com/sbt/test-interface Source0: https://github.com/sbt/test-interface/archive/v%{test_interface_version}.tar.gz %if !%{build_with_sbt} Source1: http://mirrors.ibiblio.org/maven2/org/scala-sbt/%{name}/%{version}/%{name}-%{version}.pom %endif BuildArch: noarch %if %{build_with_sbt} BuildRequires: sbt %else BuildRequires: java-devel %endif BuildRequires: javapackages-local Requires: javapackages-local %description Uniform test interface to Scala/Java test frameworks (specs, ScalaCheck, ScalaTest, JUnit and other) %package javadoc Summary: Javadoc for %{name} %description javadoc Javadoc for %{name}. %prep %setup -q %mvn_file org.scala-sbt:test-interface %{name} %if %{build_with_sbt} sed -i -e 's/2[.]10[.]2/2.10.3/g' build.sbt sed -i -e '/scalatest_2.10/d' build.sbt sed -i -e 's/0[.]12[.]4/0.13.1/g' project/build.properties rm project/plugins.sbt cp -r /usr/share/java/sbt/ivy-local . mkdir boot %else # building without sbt cp -p %{SOURCE1} pom.xml # Remove unavailable test dep %pom_remove_dep :scalatest_2.10 %endif %build %if %{build_with_sbt} export SBT_BOOT_DIR=boot export SBT_IVY_DIR=ivy-local sbt package deliverLocal publishM2Configuration %else # building without sbt mkdir -p classes target/api %javac -d classes $(find src/main/java -name "*.java") ( cd classes mkdir -p META-INF cat > META-INF/MANIFEST.MF << 'EOF' Manifest-Version: 1.0 Implementation-Vendor: org.scala-sbt Implementation-Title: %{name} Implementation-Version: %{version} Implementation-Vendor-Id: org.scala-sbt Specification-Vendor: org.scala-sbt Specification-Title: %{name} Specification-Version: %{version} EOF %jar -cMf ../target/%{name}.jar * ) %javadoc -d target/api -classpath $PWD/target/%{name}.jar $(find src/main/java -name "*.java") cp pom.xml target/%{name}-%{version}.pom %mvn_artifact target/%{name}-%{version}.pom target/%{name}.jar %endif %install %mvn_install -J target/api %files -f .mfiles %doc LICENSE README %files javadoc -f .mfiles-javadoc %doc LICENSE %changelog * Fri Jan 31 2020 Fedora Release Engineering - 1.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Sat Jul 27 2019 Fedora Release Engineering - 1.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sun Feb 03 2019 Fedora Release Engineering - 1.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sat Jul 14 2018 Fedora Release Engineering - 1.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Feb 09 2018 Fedora Release Engineering - 1.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 1.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 1.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Fri Feb 05 2016 Fedora Release Engineering - 1.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Fri Jul 10 2015 William Benton - 1.0-6 - rebuild for F23 - use mvn_artifact * Fri Jun 19 2015 Fedora Release Engineering - 1.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Jun 08 2014 Fedora Release Engineering - 1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Thu Jan 30 2014 William Benton - 1.0-3 - fixed typo in generated manifest * Tue Jan 21 2014 William Benton - 1.0-2 - conditionally build without sbt (thanks to Gil) * Mon Dec 23 2013 William Benton - 1.0-1 - initial package