File scala-parser-combinators.spec of Package scala-parser-combinators

# spec file for "scala-parser-combinators"
# Copyright (c) 2018 tz
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define _scaladir %{_datadir}/scala
%define _scaladocdir %{_datadir}/scaladoc

Name:			scala-parser-combinators
Version:		1.1.0
Release:		1
License:		BSD-3-Clause
Summary:		Simple combinator-based parsing for Scala 
Group:			Development/Libraries/Java
Source0:		%{name}-%{version}.tar.xz
Patch0:			0001-Sources-updated.patch
BuildRoot:		%{_tmppath}/%{name}-%{version}-build
BuildRequires:	xz
BuildRequires:	scala-parser-combinators-kit == af84a9056b471d713b1e814802812fb7ebd81740
BuildRequires:	scala >= 2.12.4
BuildRequires:	sbt >= 1.1.1
BuildRequires:	fdupes
BuildArch:		noarch
#Provides:		mvn(:) == 
Requires:		scala >= 2.12.4

Simple combinator-based parsing for Scala. Formerly part of the Scala standard
library, now a separate community-maintained module.

%package scaladoc
Summary:		API documentation for %{name}
Group:			Documentation/HTML
Requires:		scala-scaladoc

%description scaladoc
This package contains the API documentation for %{name}.

%setup -q -c -n src
%patch0 -p2
cp -f %{SOURCE1} .
cp -LRf %{_datadir}/tetra ../kit

cd ..
sh src/


# js/target/scala-2.12/scala-parser-combinators_sjs0.6_2.12-1.1.0-SNAPSHOT.jar
# jvm/target/scala-2.12/scala-parser-combinators_2.12-1.1.0-SNAPSHOT.jar
# target/scala-2.12/root_2.12-0.1-SNAPSHOT.jar

cd %{name}-%{version}
%{__install} -d %{buildroot}%{_scaladir}/lib
%{__install} -D -m 644 jvm/target/scala-2.12/%{name}_2.12-%{version}-SNAPSHOT.jar %{buildroot}%{_scaladir}/lib/%{name}-%{version}.jar
%{__ln_s} %{name}-%{version}.jar %{buildroot}%{_scaladir}/lib/%{name}.jar
%{__install} -D -m 644 js/target/scala-2.12/%{name}_sjs0.6_2.12-%{version}-SNAPSHOT.jar %{buildroot}%{_scaladir}/lib/%{name}_sjs0.6-%{version}.jar
%{__ln_s} %{name}_sjs0.6-%{version}.jar %{buildroot}%{_scaladir}/lib/%{name}_sjs0.6.jar

%{__install} -d %{buildroot}%{_scaladocdir}/%{name}{,_sjs0.6}
%{__cp} -pr jvm/target/scala-2.12/api/* -d %{buildroot}%{_scaladocdir}/%{name}
%{__cp} -pr js/target/scala-2.12/api/* -d %{buildroot}%{_scaladocdir}/%{name}_sjs0.6

%fdupes %{buildroot}%{_scaladocdir}


%files scaladoc