2019-02-15 12:45:57 +00:00
|
|
|
#
|
2024-02-15 14:28:50 +00:00
|
|
|
# spec file for package parboiled
|
2019-02-15 12:45:57 +00:00
|
|
|
#
|
2024-02-15 14:28:50 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-10-14 05:34:13 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "scala"
|
|
|
|
%bcond_without scala
|
|
|
|
%else
|
|
|
|
%bcond_with scala
|
|
|
|
%endif
|
2023-10-14 05:24:27 +00:00
|
|
|
%global scala_short_version 2.13
|
2023-10-14 05:34:13 +00:00
|
|
|
%global base_name parboiled
|
|
|
|
%if %{with scala}
|
|
|
|
Name: %{base_name}-scala
|
|
|
|
Summary: Parboiled for Scala
|
|
|
|
%else
|
|
|
|
Name: %{base_name}
|
2023-10-14 05:42:04 +00:00
|
|
|
Summary: Java library providing parsing of input text based on PEGs
|
2023-10-14 05:34:13 +00:00
|
|
|
%endif
|
2023-10-11 07:32:42 +00:00
|
|
|
Version: 1.4.1
|
2019-11-27 08:42:33 +00:00
|
|
|
Release: 0
|
2023-10-11 08:15:45 +00:00
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Libraries/Java
|
2019-02-15 12:45:57 +00:00
|
|
|
URL: http://parboiled.org/
|
|
|
|
Source0: https://github.com/sirthias/parboiled/archive/%{version}.tar.gz
|
2023-10-14 05:34:13 +00:00
|
|
|
Source1: %{base_name}-build.tar.xz
|
2019-02-15 12:45:57 +00:00
|
|
|
# for build see https://github.com/sirthias/parboiled/wiki/Building-parboiled
|
2023-10-14 05:34:13 +00:00
|
|
|
Source2: https://repo1.maven.org/maven2/org/parboiled/%{base_name}-core/%{version}/%{base_name}-core-%{version}.pom
|
|
|
|
Source3: https://repo1.maven.org/maven2/org/parboiled/%{base_name}-java/%{version}/%{base_name}-java-%{version}.pom
|
|
|
|
Source4: https://repo1.maven.org/maven2/org/parboiled/%{base_name}-scala_%{scala_short_version}/%{version}/%{base_name}-scala_%{scala_short_version}-%{version}.pom
|
2023-10-11 08:03:37 +00:00
|
|
|
Patch0: restore-java8-compatibility.patch
|
2019-02-15 12:55:17 +00:00
|
|
|
BuildRequires: ant
|
2019-02-15 12:45:57 +00:00
|
|
|
BuildRequires: fdupes
|
2023-10-11 08:15:45 +00:00
|
|
|
BuildRequires: java-devel >= 1.8
|
2023-10-14 05:34:13 +00:00
|
|
|
BuildRequires: javapackages-local >= 6
|
|
|
|
%if %{with scala}
|
|
|
|
BuildRequires: parboiled
|
2023-10-14 05:24:27 +00:00
|
|
|
BuildRequires: scala-ant
|
2023-10-14 05:34:13 +00:00
|
|
|
%else
|
|
|
|
BuildRequires: objectweb-asm
|
|
|
|
%endif
|
2023-10-11 08:15:45 +00:00
|
|
|
BuildArch: noarch
|
2019-02-15 12:45:57 +00:00
|
|
|
|
|
|
|
%description
|
2023-10-14 05:34:13 +00:00
|
|
|
%if %{with scala}
|
2023-10-14 05:24:27 +00:00
|
|
|
An internal Scala DSL for efficiently defining your parser rules.
|
|
|
|
|
2023-10-14 05:34:13 +00:00
|
|
|
%endif
|
|
|
|
parboiled is a mixed Java library providing parsing of
|
2023-10-14 05:24:27 +00:00
|
|
|
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 replacement for regular expressions
|
|
|
|
and generally have some advantages over the "traditional" way of
|
|
|
|
building parser via CFGs.
|
|
|
|
|
2019-02-15 12:45:57 +00:00
|
|
|
%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
|
2023-10-14 05:41:18 +00:00
|
|
|
This package contains javadoc for %{base_name}.
|
2019-02-15 12:45:57 +00:00
|
|
|
|
|
|
|
%prep
|
2023-10-14 05:34:13 +00:00
|
|
|
%setup -q -n %{base_name}-%{version} -a1
|
2024-02-21 10:53:09 +00:00
|
|
|
%patch -P 0 -p1
|
2019-02-15 12:45:57 +00:00
|
|
|
|
2023-10-14 05:42:46 +00:00
|
|
|
cp %{SOURCE2} %{base_name}-core/pom.xml
|
2023-10-14 05:41:18 +00:00
|
|
|
cp %{SOURCE3} %{base_name}-java/pom.xml
|
|
|
|
cp %{SOURCE4} %{base_name}-scala/pom.xml
|
2019-11-27 08:42:33 +00:00
|
|
|
|
2019-02-15 12:45:57 +00:00
|
|
|
%build
|
2019-02-15 12:55:17 +00:00
|
|
|
mkdir -p lib
|
2019-11-27 08:42:33 +00:00
|
|
|
build-jar-repository -s lib \
|
2023-10-14 05:34:13 +00:00
|
|
|
%if %{with scala}
|
2023-10-14 05:46:15 +00:00
|
|
|
%{base_name} scala
|
2023-10-14 05:34:13 +00:00
|
|
|
%else
|
|
|
|
objectweb-asm
|
|
|
|
%endif
|
2019-11-27 08:42:33 +00:00
|
|
|
%{ant} \
|
2023-10-14 05:34:13 +00:00
|
|
|
%if %{with scala}
|
|
|
|
-f build-scala.xml \
|
|
|
|
%endif
|
2019-11-27 08:42:33 +00:00
|
|
|
package javadoc
|
2019-02-15 12:45:57 +00:00
|
|
|
|
|
|
|
%install
|
2023-10-14 05:34:13 +00:00
|
|
|
%if %{with scala}
|
|
|
|
%global modules scala
|
|
|
|
%else
|
|
|
|
%global modules core java
|
|
|
|
%endif
|
|
|
|
install -dm 0755 %{buildroot}%{_javadir}/%{base_name}
|
|
|
|
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{base_name}
|
2019-11-27 08:42:33 +00:00
|
|
|
for i in %{modules}; do
|
|
|
|
# jar
|
2023-10-14 05:34:13 +00:00
|
|
|
install -pm 0644 %{base_name}-${i}/target/%{base_name}-${i}*%{version}.jar %{buildroot}%{_javadir}/%{base_name}/${i}.jar
|
2019-11-27 08:42:33 +00:00
|
|
|
# pom
|
2023-10-14 05:34:13 +00:00
|
|
|
%{mvn_install_pom} %{base_name}-${i}/pom.xml %{buildroot}%{_mavenpomdir}/%{base_name}/${i}.pom
|
|
|
|
%add_maven_depmap %{base_name}/${i}.pom %{base_name}/${i}.jar
|
2019-11-27 08:42:33 +00:00
|
|
|
# javadoc
|
2023-10-14 05:34:13 +00:00
|
|
|
install -dm 0755 %{buildroot}%{_javadocdir}/%{base_name}/${i}
|
|
|
|
cp -pr %{base_name}-${i}/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{base_name}/${i}/
|
2019-02-15 12:55:17 +00:00
|
|
|
done
|
2019-02-15 12:45:57 +00:00
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
|
|
|
|
|
|
|
%files -f .mfiles
|
|
|
|
%doc CHANGELOG README.markdown
|
|
|
|
%license LICENSE
|
|
|
|
|
2019-02-15 12:55:17 +00:00
|
|
|
%files javadoc
|
2019-02-15 12:45:57 +00:00
|
|
|
%license LICENSE
|
2023-10-14 05:34:13 +00:00
|
|
|
%{_javadocdir}/%{base_name}
|
2019-02-15 12:45:57 +00:00
|
|
|
|
|
|
|
%changelog
|