Package parboiled: Specfile

Group: Development/Java
# BEGIN SourceDeps(oneline):
BuildRequires: rpm-build-java
# END SourceDeps(oneline)
BuildRequires: /proc
BuildRequires: jpackage-generic-compat
# see
%define _localstatedir %{_var}
%global scala_short_version 2.10
Name:          parboiled
Version:       1.1.6
Release:       alt1_13jpp8
Summary:       Java/Scala library providing parsing of input text based on PEGs
License:       ASL 2.0
# for build see
# customized aggregator pom
Source3:       %{name}-pom.xml
Patch0:        %{name}-1.1.6-scala-use-antrun-plugin.patch
Patch1:        parboiled-port-to-objectweb-asm-5.0.1.patch

BuildRequires: maven-local
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
BuildRequires: mvn(org.ow2.asm:asm)
BuildRequires: mvn(org.ow2.asm:asm-analysis)
BuildRequires: mvn(org.ow2.asm:asm-tree)
BuildRequires: mvn(org.ow2.asm:asm-util)
BuildRequires: mvn(org.scala-lang:scala-compiler)
BuildRequires: mvn(org.scala-lang:scala-library)

%if 0
# test deps
BuildRequires: mvn(org.scalatest:scalatest_2.9.3)
BuildRequires: mvn(org.testng:testng)

BuildArch:     noarch

parboiled is a mixed Java/Scala library providing for lightweight and
easy-to-use, yet powerful and elegant parsing of arbitrary input text
based on Parsing expression grammars (PEGs). PEGs are an alternative to
context free grammars (CFGs) for formally specifying syntax, they
make a good replacement for regular expressions and generally have quite
a few advantages over the "traditional" way of building parser via CFGs.

%package scala
Group: Development/Java
Summary:       Parboiled for Scala

%description scala
An internal Scala DSL for efficiently defining your parser rules.

%package javadoc
Group: Development/Java
Summary:       Javadoc for %{name}
BuildArch: noarch

%description javadoc
This package contains javadoc for %{name}.

%setup -q

find . -name "*.class" -delete
find . -name "*.jar" -delete

cp -p %{SOURCE1} %{name}-core/pom.xml
cp -p %{SOURCE2} %{name}-java/pom.xml
cp -p %{SOURCE4} %{name}-scala/pom.xml

for m in core java; do
%pom_xpath_inject "pom:project" "

</build>" %{name}-${m}

%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin %{name}-${m} "

%pom_add_plugin org.apache.felix:maven-bundle-plugin %{name}-core "

%pom_add_plugin org.apache.felix:maven-bundle-plugin %{name}-java "

%patch0 -p0
%patch1 -p1

cp -p %{SOURCE3} pom.xml
sed -i "s|@VERSION@|%{version}|" pom.xml

%mvn_file :%{name}-core %{name}/core
%mvn_file :%{name}-java %{name}/java
%mvn_package :%{name}-project __noinstall
%pom_xpath_inject "pom:modules" "<module>%{name}-scala</module>"
%mvn_file :%{name}-scala_%{scala_short_version} %{name}/scala
%mvn_package :%{name}-scala_%{scala_short_version} scala


# test skipped unavailable dep org.scalatest scalatest_2.9.0 1.6.1
%mvn_build -f --

%files -f .mfiles
%doc CHANGELOG README.markdown
%doc --no-dereference LICENSE

%files scala -f .mfiles-scala
%doc --no-dereference LICENSE

%files javadoc -f .mfiles-javadoc
%doc --no-dereference LICENSE

* Thu Apr 19 2018 Igor Vlasenko <> 1.1.6-alt1_13jpp8
- java update

* Thu Nov 09 2017 Igor Vlasenko <> 1.1.6-alt1_12jpp8
- fc27 update

* Sun Oct 22 2017 Igor Vlasenko <> 1.1.6-alt1_11jpp8
- new jpp release

* Fri Dec 16 2016 Igor Vlasenko <> 1.1.6-alt1_10jpp8
- new fc release

* Tue Nov 22 2016 Igor Vlasenko <> 1.1.6-alt1_9jpp8
- new fc release

* Wed Feb 03 2016 Igor Vlasenko <> 1.1.6-alt1_8jpp8
- new version

* Mon Jan 25 2016 Igor Vlasenko <> 1.1.6-alt0.1jpp
- bootstrap pack of jars created with jppbootstrap script
- temporary package to satisfy circular dependencies

* Mon Sep 08 2014 Igor Vlasenko <> 1.0.2-alt2_6jpp7
- new release

* Thu Aug 07 2014 Igor Vlasenko <> 1.0.2-alt2_3jpp7
- rebuild with maven-local

* Tue Mar 05 2013 Igor Vlasenko <> 1.0.2-alt1_3jpp7
- fc update

* Mon Sep 17 2012 Igor Vlasenko <> 1.0.2-alt1_2jpp7
- new version