%global scala_short_version 2.10
Name: parboiled
Version: 1.1.6
Release: 16%{?dist}
Summary: Java/Scala library providing parsing of input text based on PEGs
License: ASL 2.0
URL: http://parboiled.org/
Source0: https://github.com/sirthias/parboiled/archive/%{version}.tar.gz
# for build see https://github.com/sirthias/parboiled/wiki/Building-parboiled
Source1: http://repo1.maven.org/maven2/org/parboiled/%{name}-core/%{version}/%{name}-core-%{version}.pom
Source2: http://repo1.maven.org/maven2/org/parboiled/%{name}-java/%{version}/%{name}-java-%{version}.pom
# customized aggregator pom
Source3: %{name}-pom.xml
Source4: http://repo1.maven.org/maven2/org/parboiled/%{name}-scala_%{scala_short_version}/%{version}/%{name}-scala_%{scala_short_version}-%{version}.pom
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)
%endif
BuildArch: noarch
%description
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
Summary: Parboiled for Scala
%description scala
An internal Scala DSL for efficiently defining your parser rules.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
This package contains javadoc for %{name}.
%prep
%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" "
" %{name}-${m}
%pom_add_plugin org.apache.maven.plugins:maven-jar-plugin %{name}-${m} "
\${project.build.outputDirectory}/META-INF/MANIFEST.MF
"
done
%pom_add_plugin org.apache.felix:maven-bundle-plugin %{name}-core "
true
org.parboiled.core
org.parboiled.core
\${project.version}
org.parboiled.core.*
bundle-manifest
process-classes
manifest
"
%pom_add_plugin org.apache.felix:maven-bundle-plugin %{name}-java "
true
org.parboiled.java
org.parboiled.java
\${project.version}
org.parboiled.core
org.parboiled.java.*
bundle-manifest
process-classes
manifest
"
%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" "%{name}-scala"
%mvn_file :%{name}-scala_%{scala_short_version} %{name}/scala
%mvn_package :%{name}-scala_%{scala_short_version} scala
%build
# test skipped unavailable dep org.scalatest scalatest_2.9.0 1.6.1
%mvn_build -f -- -Dproject.build.sourceEncoding=UTF-8
%install
%mvn_install
%files -f .mfiles
%doc CHANGELOG README.markdown
%license LICENSE
%files scala -f .mfiles-scala
%license LICENSE
%files javadoc -f .mfiles-javadoc
%license LICENSE
%changelog
* Fri Jul 26 2019 Fedora Release Engineering - 1.1.6-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering - 1.1.6-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering - 1.1.6-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Feb 08 2018 Fedora Release Engineering - 1.1.6-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering - 1.1.6-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering - 1.1.6-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Jun 21 2016 gil cattaneo 1.1.6-10
- add missing build requires
* Thu Feb 04 2016 Fedora Release Engineering - 1.1.6-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering - 1.1.6-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon May 25 2015 gil cattaneo 1.1.6-7
- drop ExcludeArch for ARM
* Thu May 21 2015 gil cattaneo 1.1.6-6
- disable paraboiled-scala on ARM (rhbz#1223754)
* Wed Feb 11 2015 gil cattaneo 1.1.6-5
- introduce license macro
* Fri Jun 06 2014 Fedora Release Engineering - 1.1.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu Mar 27 2014 Michal Srb - 1.1.6-3
- Port to objectweb-asm 5.0.1
* Thu Mar 20 2014 gil cattaneo 1.1.6-2
- add scala support
* Tue Nov 26 2013 gil cattaneo 1.1.6-1
- update to 1.1.6 rhbz#1034875
* Sat Aug 03 2013 Fedora Release Engineering - 1.0.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Jul 03 2013 gil cattaneo 1.0.2-5
- switch to XMvn
- minor changes to adapt to current guideline
* Wed Feb 06 2013 Java SIG - 1.0.2-4
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
- Replace maven BuildRequires with maven-local
* Tue Feb 05 2013 gil cattaneo 1.0.2-3
- fix unowned directory rhbz#907517
* Fri Jul 20 2012 Fedora Release Engineering - 1.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Jun 12 2012 gil cattaneo 1.0.2-1
- initial rpm