2019-02-15 12:45:57 +00:00
|
|
|
#
|
|
|
|
# spec file for package parboiled
|
|
|
|
#
|
2019-02-15 12:55:17 +00:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2019-02-15 12:45:57 +00:00
|
|
|
#
|
|
|
|
# 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 https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%global scala_short_version 2.10
|
|
|
|
Name: parboiled
|
|
|
|
Version: 1.1.6
|
|
|
|
Release: 0
|
|
|
|
Summary: Java/Scala library providing parsing of input text based on PEGs
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
URL: http://parboiled.org/
|
|
|
|
Source0: https://github.com/sirthias/parboiled/archive/%{version}.tar.gz
|
2019-02-15 12:55:17 +00:00
|
|
|
Source1: %{name}-%{version}-build.tar.xz
|
2019-02-15 12:45:57 +00:00
|
|
|
# for build see https://github.com/sirthias/parboiled/wiki/Building-parboiled
|
2019-02-15 12:55:17 +00:00
|
|
|
Source2: http://repo1.maven.org/maven2/org/parboiled/%{name}-core/%{version}/%{name}-core-%{version}.pom
|
|
|
|
Source3: http://repo1.maven.org/maven2/org/parboiled/%{name}-java/%{version}/%{name}-java-%{version}.pom
|
2019-02-15 12:45:57 +00:00
|
|
|
Source4: http://repo1.maven.org/maven2/org/parboiled/%{name}-scala_%{scala_short_version}/%{version}/%{name}-scala_%{scala_short_version}-%{version}.pom
|
2019-02-15 12:55:17 +00:00
|
|
|
Patch0: parboiled-port-to-objectweb-asm-5.0.1.patch
|
|
|
|
BuildRequires: ant
|
|
|
|
BuildRequires: ant-scala
|
2019-02-15 12:45:57 +00:00
|
|
|
BuildRequires: fdupes
|
2019-02-15 12:55:17 +00:00
|
|
|
BuildRequires: javapackages-local
|
|
|
|
BuildRequires: objectweb-asm
|
2019-02-15 12:45:57 +00:00
|
|
|
BuildConflicts: java-devel >= 9
|
2019-02-15 12:55:17 +00:00
|
|
|
Requires: mvn(org.ow2.asm:asm)
|
|
|
|
Requires: mvn(org.ow2.asm:asm-analysis)
|
|
|
|
Requires: mvn(org.ow2.asm:asm-tree)
|
|
|
|
Requires: mvn(org.ow2.asm:asm-util)
|
2019-02-15 12:45:57 +00:00
|
|
|
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
|
2019-02-15 12:55:17 +00:00
|
|
|
Group: Development/Libraries/Java
|
|
|
|
Requires: mvn(org.parboiled:parboiled-core) = 1.1.6
|
|
|
|
Requires: mvn(org.scala-lang:scala-library)
|
2019-02-15 12:45:57 +00:00
|
|
|
|
|
|
|
%description scala
|
|
|
|
An internal Scala DSL for efficiently defining your parser rules.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc for %{name}
|
2019-02-15 12:55:17 +00:00
|
|
|
Group: Documentation/HTML
|
2019-02-15 12:45:57 +00:00
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
This package contains javadoc for %{name}.
|
|
|
|
|
|
|
|
%prep
|
2019-02-15 12:55:17 +00:00
|
|
|
%setup -q -a1
|
2019-02-15 12:45:57 +00:00
|
|
|
|
|
|
|
find . -name "*.class" -delete
|
|
|
|
find . -name "*.jar" -delete
|
|
|
|
|
2019-02-15 12:55:17 +00:00
|
|
|
%patch0 -p1
|
2019-02-15 12:45:57 +00:00
|
|
|
|
|
|
|
%build
|
2019-02-15 12:55:17 +00:00
|
|
|
mkdir -p lib
|
|
|
|
build-jar-repository -s lib objectweb-asm
|
|
|
|
%{ant} -Dscala.libDir=%{_datadir}/scala/lib package javadoc
|
2019-02-15 12:45:57 +00:00
|
|
|
|
|
|
|
%install
|
2019-02-15 12:55:17 +00:00
|
|
|
# jars
|
|
|
|
install -dm 0755 %{buildroot}%{_javadir}/%{name}
|
|
|
|
for i in core java scala; do
|
|
|
|
install -pm 0644 %{name}-${i}/target/%{name}-${i}*%{version}.jar %{buildroot}%{_javadir}/%{name}/${i}.jar
|
|
|
|
done
|
|
|
|
# poms
|
|
|
|
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
|
|
|
|
install -pm 0644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/%{name}/core.pom
|
|
|
|
%add_maven_depmap %{name}/core.pom %{name}/core.jar
|
|
|
|
install -pm 0644 %{SOURCE3} %{buildroot}%{_mavenpomdir}/%{name}/java.pom
|
|
|
|
%add_maven_depmap %{name}/java.pom %{name}/java.jar
|
|
|
|
install -pm 0644 %{SOURCE4} %{buildroot}%{_mavenpomdir}/%{name}/scala.pom
|
|
|
|
%add_maven_depmap %{name}/scala.pom %{name}/scala.jar -f scala
|
|
|
|
# javadoc
|
|
|
|
for i in core java scala; do
|
|
|
|
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}/${i}
|
|
|
|
cp -pr %{name}-${i}/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/${i}/
|
|
|
|
done
|
2019-02-15 12:45:57 +00:00
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
|
|
|
|
|
|
|
%files -f .mfiles
|
|
|
|
%doc CHANGELOG README.markdown
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
%files scala -f .mfiles-scala
|
|
|
|
%license LICENSE
|
|
|
|
|
2019-02-15 12:55:17 +00:00
|
|
|
%files javadoc
|
2019-02-15 12:45:57 +00:00
|
|
|
%license LICENSE
|
2019-02-15 12:55:17 +00:00
|
|
|
%{_javadocdir}/%{name}
|
2019-02-15 12:45:57 +00:00
|
|
|
|
|
|
|
%changelog
|