%global scala_version 2.10
Name: scallop
Version: 0.9.5
Release: 0.1.%{scala_version}%{?dist}
Summary: A simple Scala CLI parsing library
License: MIT
URL: https://github.com/scallop/scallop
Source0: https://github.com/scallop/scallop/archive/v%{version}+%{scala_version}.tar.gz
Source1: http://central.maven.org/maven2/org/rogach/scallop_%{scala_version}/%{version}/scallop_%{scala_version}-%{version}.pom
# https://bugzilla.redhat.com/show_bug.cgi?id=1212672
BuildRequires: fmpp
BuildRequires: maven-local
BuildRequires: mvn(org.scala-lang:scala-compiler)
BuildRequires: mvn(org.scala-lang:scala-library)
BuildRequires: mvn(org.scala-lang:scala-reflect)
%if 0
BuildRequires: mvn(org.scalatest:scalatest_%{scala_version})
%endif
BuildArch: noarch
%description
A simple command-line arguments parsing library for Scala,
written in spirit of Ruby's Trollop.
%prep
%setup -q -n %{name}-%{version}-%{scala_version}
find -name "*.class" -print -delete
find -name "*.jar" -print -delete
cp -p %SOURCE1 pom.xml
%pom_remove_dep org.scalatest:scalatest_%{scala_version}
%pom_add_plugin org.apache.maven.plugins:maven-antrun-plugin:1.7 . '
compile
process-sources
run
org.scala-lang
scala-compiler
2.10.3
'
%mvn_file :%{name}_%{scala_version} %{name}
%build
(
cd src/main/scala/org.rogach.scallop
fmpp ScallopConfValidations.fm -o ScallopConfValidations.scala
)
# Not available test dep
%mvn_build -f -- -Dproject.build.sourceEncoding=UTF-8
%install
%mvn_install
%files -f .mfiles
%doc README.md
%license license.txt
%changelog
* Fri Apr 17 2015 gil cattaneo 0.9.5-0.1.2.10
- initial rpm