[scala-stm] initial import

William Benton willb at fedoraproject.org
Tue Feb 25 14:03:27 UTC 2014


commit 84b7f5f37a58db00ca0f434cec2f7d9eeed14588
Author: William Benton <willb at redhat.com>
Date:   Tue Feb 25 08:04:19 2014 -0600

    initial import

 .gitignore     |    1 +
 scala-stm.spec |  109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources        |    1 +
 3 files changed, 111 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..ccda9a1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/release-0.7.tar.gz
diff --git a/scala-stm.spec b/scala-stm.spec
new file mode 100644
index 0000000..bc3a35e
--- /dev/null
+++ b/scala-stm.spec
@@ -0,0 +1,109 @@
+%global scala_short_version 2.10
+
+%if 0%{?fedora} >= 21
+%global java_pkg java-headless
+%else
+%global java_pkg java
+%endif
+
+Name:          scala-stm
+Version:       0.7
+Release:       2%{?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: java-devel
+BuildRequires: javapackages-tools
+BuildRequires: ant
+BuildRequires: sbt
+
+BuildRequires: mvn(org.scala-lang:scala-compiler)
+BuildRequires: mvn(org.scala-lang:scala-library)
+Requires:      mvn(org.scala-lang:scala-library)
+Requires:      %{java_pkg}
+Requires:      javapackages-tools
+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.3"/' 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
+
+%build
+
+export SBT_BOOT_DIR=boot
+export SBT_IVY_DIR=ivy-local
+
+sbt package makePom deliverLocal doc
+
+
+# No test deps available
+
+
+%install
+
+# target/scala-2.10/scala-stm_2.10-0.7.jar
+mkdir -p %{buildroot}%{_javadir}
+cp -p target/scala-%{scala_short_version}/%{name}_%{scala_short_version}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
+
+mkdir -p %{buildroot}%{_mavenpomdir}
+install -pm 644 target/scala-%{scala_short_version}/%{name}_%{scala_short_version}-%{version}.pom %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+%add_maven_depmap
+
+mkdir -p %{buildroot}%{_javadocdir}/%{name}
+cp -rp target/scala-%{scala_short_version}/api/* %{buildroot}%{_javadocdir}/%{name}
+
+%files
+%{_javadir}/%{name}.jar
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
+%doc LICENSE.txt README RELEASE-NOTES.txt
+
+%files javadoc
+%{_javadocdir}/%{name}
+%doc LICENSE.txt
+
+%changelog
+* Mon Feb 24 2014 William Benton <willb at redhat.com> - 0.7-2
+- updated to use sbt for build
+
+* Thu Feb 06 2014 gil cattaneo <puntogil at libero.it> 0.7-1
+- initial rpm
diff --git a/sources b/sources
index e69de29..909fc7f 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+e52df364810ff10977f94c120d182e72  release-0.7.tar.gz


More information about the scm-commits mailing list