%global scala_short_version 2.10 Name: scala-stm Version: 0.7 Release: 6%{?dist} Summary: Software Transactional Memory for Scala License: BSD URL: http://nbronson.github.io/scala-stm/ Source0: https://github.com/nbronson/scala-stm/archive/release-%{version}.tar.gz BuildRequires: javapackages-local BuildRequires: ant BuildRequires: sbt BuildRequires: mvn(org.scala-lang:scala-compiler) BuildRequires: mvn(org.scala-lang:scala-library) BuildArch: noarch %description ScalaSTM is a lightweight software transactional memory for Scala, inspired by the STMs in Haskell and Clojure. ScalaSTM provides a mutable cell called a Ref. If you build a shared data structure using immutable objects and Ref-s, then you can access it from multiple threads or actors. No synchronized, no deadlocks or race conditions, and good scalability. Included are concurrent sets and maps, and we also have an easier and safer replacement for wait and notifyAll. %package javadoc Summary: Javadoc for %{name} %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{name}-release-%{version} # Cleanup find -name '*.class' -print -delete find -name '*.jar' -print -delete # sb7_java-v1.2.tgz http://lpd.epfl.ch/gramoli/doc/sw/sb7_java-v1.2.tgz rm -r lib/* # get rid of sbt plugins rm project/plugins.sbt # patch build.sbt sed -i -e '/% "test"/d' build.sbt sed -i -e '/credentials/d' build.sbt sed -i -e 's/\(scalaVersion :=\).*$/scalaVersion := "2.10.4"/' build.sbt # delete tests due to missing deps rm -rf src/test rm -rf dep-tests cp -r /usr/share/sbt/ivy-local . mkdir boot %mvn_file org.%{name}:%{name}_%{scala_short_version} %{name} %build export SBT_BOOT_DIR=$PWD/boot export SBT_IVY_DIR=$PWD/ivy-local sbt package makePom deliverLocal doc # No test deps available %install # target/scala-2.10/scala-stm_2.10-0.7.jar %mvn_artifact target/scala-%{scala_short_version}/%{name}_%{scala_short_version}-%{version}.pom target/scala-%{scala_short_version}/%{name}_%{scala_short_version}-%{version}.jar %mvn_install -J target/scala-%{scala_short_version}/api/ %files -f .mfiles %doc README RELEASE-NOTES.txt %license LICENSE.txt %files javadoc -f .mfiles-javadoc %license LICENSE.txt %changelog * Thu Feb 04 2016 Fedora Release Engineering - 0.7-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Aug 06 2015 gil cattaneo 0.7-5 - fix FTBFS rhbz#1239989 - Introduce license macro * Fri Jun 19 2015 Fedora Release Engineering - 0.7-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Jun 08 2014 Fedora Release Engineering - 0.7-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Mon Feb 24 2014 William Benton - 0.7-2 - updated to use sbt for build * Thu Feb 06 2014 gil cattaneo 0.7-1 - initial rpm