File sbt.spec of Package sbt

# openSUSE BUILD service build build script
# package: sbt - simple build tool for scala projects 
#

Name:           sbt
Summary:        Simple build tool for scala projects
Version:        1.4.6
Release:        1 
Group:          Development/Tools/Building
License:        New BSD License
Url:            http://www.scala-sbt.org
Vendor:         openSUSE
Requires:       java >= 1.8.0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#Source0:        http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-launch/%{version}/sbt-launch.jar
#Source0:	 https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tgz
Source0:        https://github.com/sbt/sbt/releases/download/v%{version}/%{name}-%{version}.tgz
BuildArch:      noarch


%description
Simple build tool for Scala projects that aims to do the basics well. It requires Java 1.8 or later.

Features
*  Fairly fast, unintrusive, and easy to set up for simple projects 
*  Configuration, customization, and extension are done in Scala
*  Accurate recompilation (in theory) is done using information extracted by a compiler plugin
*  Continuous compilation and testing with triggered execution
*  Supports mixed Scala/Java projects, packages jars, generates documentation with scaladoc
*  Supports testing with ScalaCheck, specs, and ScalaTest
*  Starts the Scala REPL with project classes and dependencies on the classpath
*  Multiple project/subproject support
*  Parallel task execution, including parallel test execution
*  Dependency management support: inline declarations, external Ivy or Maven configuration files, or manual management 


%prep
# nothing to do

#%setup -c "%{name}-%{version}"
%setup -c "%{name}"

%build
# nothing to do - just repackaging binary

%install
export NO_BRP_CHECK_BYTECODE_VERSION=true
%__install -d -m 755 %{buildroot}%{_javadir}
%__cp -rp sbt %{buildroot}%{_javadir}/


# startscript
cat > %{name} << EOF
!/bin/sh
  
%{name} startscript
echo "Starting %{name} version %{version} ..."
#java -Xmx512M -jar %{_javadir}/%{name}-launch-%{version}.jar "$@"
java -Xmx512M -jar %{_javadir}/%{name}/%{name}-launch.jar "$@"

EOF

%__install -d -m 755 %{buildroot}%{_bindir}
%__install -m 755 %{name} %{buildroot}%{_bindir}/

%post
# nothing to do here

%clean
%__rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%{_bindir}/*
%{_javadir}/*.jar

#%doc LICENSE README CHANGELOG 

%changelog
openSUSE Build Service is sponsored by