2007-01-16 00:18:36 +01:00
|
|
|
#
|
2022-03-18 20:28:07 +01:00
|
|
|
# spec file
|
2007-01-16 00:18:36 +01:00
|
|
|
#
|
2023-11-22 06:52:59 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2019-02-06 09:55:03 +01:00
|
|
|
# Copyright (c) 2000-2005, JPackage Project
|
2007-01-16 00:18:36 +01:00
|
|
|
#
|
2009-06-19 00:34:06 +02: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.
|
|
|
|
|
2019-02-06 09:55:03 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:18:36 +01:00
|
|
|
#
|
|
|
|
|
2009-06-19 00:34:06 +02:00
|
|
|
|
2019-04-09 16:57:14 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "bootstrap"
|
|
|
|
%bcond_without bootstrap
|
|
|
|
%else
|
|
|
|
%bcond_with bootstrap
|
|
|
|
%endif
|
|
|
|
%global base_name javacc
|
2023-11-22 06:52:59 +01:00
|
|
|
Version: 7.0.13
|
2013-09-26 07:04:36 +02:00
|
|
|
Release: 0
|
2019-02-06 10:08:21 +01:00
|
|
|
Summary: A Parser and Scanner Generator for Java
|
2019-02-06 10:10:55 +01:00
|
|
|
License: BSD-3-Clause
|
2013-09-26 07:04:36 +02:00
|
|
|
Group: Development/Libraries/Java
|
2022-03-18 20:28:07 +01:00
|
|
|
URL: https://javacc.org
|
2022-04-30 08:10:35 +02:00
|
|
|
Source0: https://github.com/javacc/javacc/archive/refs/tags/%{base_name}-%{version}.tar.gz
|
2013-09-26 07:04:36 +02:00
|
|
|
BuildRequires: ant
|
2022-03-18 20:28:07 +01:00
|
|
|
BuildRequires: java-devel >= 1.8
|
2015-07-30 15:18:41 +02:00
|
|
|
BuildArch: noarch
|
2019-04-09 16:57:14 +02:00
|
|
|
%if %{with bootstrap}
|
|
|
|
Name: %{base_name}-bootstrap
|
2019-04-09 17:05:24 +02:00
|
|
|
BuildRequires: javapackages-tools
|
2019-04-09 16:57:14 +02:00
|
|
|
Provides: %{base_name}
|
|
|
|
%else
|
|
|
|
Name: %{base_name}
|
|
|
|
BuildRequires: %{base_name}
|
2019-04-09 17:05:24 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: javapackages-local
|
|
|
|
# Explicit javapackages-tools requires since scripts use
|
|
|
|
# /usr/share/java-utils/java-functions
|
|
|
|
Requires: javapackages-tools
|
2019-04-09 16:57:14 +02:00
|
|
|
Provides: %{base_name}-bootstrap
|
|
|
|
Obsoletes: %{base_name}-bootstrap
|
|
|
|
%endif
|
2007-01-16 00:18:36 +01:00
|
|
|
|
2015-07-30 15:18:41 +02:00
|
|
|
%description
|
2019-02-06 10:08:21 +01:00
|
|
|
Java Compiler Compiler (JavaCC) is the most popular parser generator
|
|
|
|
for use with Java applications. A parser generator is a tool that reads
|
|
|
|
a grammar specification and converts it to a Java program that can
|
|
|
|
recognize matches to the grammar. In addition to the parser generator
|
|
|
|
itself, JavaCC provides other standard capabilities related to parser
|
|
|
|
generation such as tree building (via a tool called JJTree included
|
|
|
|
with JavaCC), actions, debugging, etc.
|
2007-01-16 00:18:36 +01:00
|
|
|
|
|
|
|
%package manual
|
2019-02-06 09:55:03 +01:00
|
|
|
Summary: Manual for %{name}
|
2019-02-06 10:10:55 +01:00
|
|
|
Group: Documentation/Other
|
2007-01-16 00:18:36 +01:00
|
|
|
|
|
|
|
%description manual
|
2019-02-06 09:55:03 +01:00
|
|
|
Manual for %{name}.
|
2007-01-16 00:18:36 +01:00
|
|
|
|
|
|
|
%package demo
|
2019-02-06 09:55:03 +01:00
|
|
|
Summary: Examples for %{name}
|
2007-01-16 00:18:36 +01:00
|
|
|
Group: Development/Libraries/Java
|
2019-02-06 09:55:03 +01:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2007-01-16 00:18:36 +01:00
|
|
|
|
|
|
|
%description demo
|
2019-02-06 09:55:03 +01:00
|
|
|
Examples for %{name}.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc for %{name}
|
2019-02-06 10:10:55 +01:00
|
|
|
Group: Documentation/HTML
|
2019-02-06 09:55:03 +01:00
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
This package contains the API documentation for %{name}.
|
2007-01-16 00:18:36 +01:00
|
|
|
|
|
|
|
%prep
|
2022-04-30 16:25:51 +02:00
|
|
|
%setup -n %{base_name}-%{base_name}-%{version}
|
2019-04-09 16:57:14 +02:00
|
|
|
rm -f lib/*.jar
|
|
|
|
%if %{without bootstrap}
|
|
|
|
rm -f bootstrap/javacc.jar
|
|
|
|
build-jar-repository -s -p bootstrap javacc
|
2019-02-06 09:55:03 +01:00
|
|
|
|
|
|
|
find ./examples -type f -exec sed -i 's/\r//' {} \;
|
2022-04-30 08:10:35 +02:00
|
|
|
rm examples/JavaGrammars/cpp/.gitignore
|
2007-01-16 00:18:36 +01:00
|
|
|
|
2019-02-06 10:08:21 +01:00
|
|
|
# The pom dependencies are wrong
|
|
|
|
%pom_xpath_remove pom:project/pom:dependencies
|
2019-04-09 17:05:24 +02:00
|
|
|
%endif
|
2019-02-06 09:55:03 +01:00
|
|
|
|
2019-02-06 10:08:21 +01:00
|
|
|
%build
|
2022-04-30 08:10:35 +02:00
|
|
|
%{ant} -Dant.build.javac.{source,target}=8 \
|
2019-04-09 16:57:14 +02:00
|
|
|
%if %{with bootstrap}
|
|
|
|
jar
|
|
|
|
%else
|
2019-02-06 09:55:03 +01:00
|
|
|
jar javadoc
|
2019-04-09 16:57:14 +02:00
|
|
|
%endif
|
2019-02-06 09:55:03 +01:00
|
|
|
|
2007-01-16 00:18:36 +01:00
|
|
|
%install
|
2019-02-06 10:08:21 +01:00
|
|
|
# jar
|
2022-04-30 08:10:35 +02:00
|
|
|
install -dm0755 %{buildroot}%{_javadir}
|
|
|
|
install -pm0644 target/%{base_name}-%{version}.jar %{buildroot}%{_javadir}/%{base_name}.jar
|
2019-04-09 16:57:14 +02:00
|
|
|
|
|
|
|
%if %{without bootstrap}
|
|
|
|
|
2019-02-06 10:08:21 +01:00
|
|
|
# pom
|
2022-04-30 08:10:35 +02:00
|
|
|
install -dm0755 %{buildroot}%{_mavenpomdir}
|
|
|
|
install -pm0644 pom.xml %{buildroot}%{_mavenpomdir}/%{base_name}.pom
|
2019-04-09 16:57:14 +02:00
|
|
|
%add_maven_depmap %{base_name}.pom %{base_name}.jar
|
2019-02-06 10:08:21 +01:00
|
|
|
# javadoc
|
2022-04-30 08:10:35 +02:00
|
|
|
install -dm0755 %{buildroot}%{_javadocdir}/%{name}
|
2019-02-06 10:08:21 +01:00
|
|
|
cp -pr target/javadoc/* %{buildroot}%{_javadocdir}/%{name}/
|
2019-02-06 09:55:03 +01:00
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
2022-04-30 08:10:35 +02:00
|
|
|
%fdupes -s docs
|
2019-02-06 09:55:03 +01:00
|
|
|
%fdupes -s examples
|
|
|
|
|
|
|
|
%jpackage_script javacc '' '' javacc javacc true
|
|
|
|
ln -s %{_bindir}/javacc %{buildroot}%{_bindir}/javacc.sh
|
|
|
|
%jpackage_script jjdoc '' '' javacc jjdoc true
|
|
|
|
%jpackage_script jjtree '' '' javacc jjtree true
|
|
|
|
|
2019-04-09 16:57:14 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{with bootstrap}
|
|
|
|
%files
|
|
|
|
%{_javadir}/%{base_name}.jar
|
|
|
|
%else
|
2022-03-18 20:28:07 +01:00
|
|
|
|
2019-02-06 09:55:03 +01:00
|
|
|
%files -f .mfiles
|
|
|
|
%{_bindir}/javacc
|
|
|
|
%{_bindir}/javacc.sh
|
|
|
|
%{_bindir}/jjdoc
|
|
|
|
%{_bindir}/jjtree
|
2019-04-09 16:57:14 +02:00
|
|
|
%endif
|
|
|
|
%license LICENSE
|
2022-04-30 08:10:35 +02:00
|
|
|
%doc README.md
|
2007-01-16 00:18:36 +01:00
|
|
|
|
2019-04-09 16:57:14 +02:00
|
|
|
%if %{without bootstrap}
|
2007-01-16 00:18:36 +01:00
|
|
|
%files manual
|
2022-04-30 08:10:35 +02:00
|
|
|
%doc docs/*
|
2007-01-16 00:18:36 +01:00
|
|
|
|
|
|
|
%files demo
|
2019-02-06 09:55:03 +01:00
|
|
|
%doc examples
|
|
|
|
|
2019-02-06 10:08:21 +01:00
|
|
|
%files javadoc
|
2019-02-06 09:55:03 +01:00
|
|
|
%license LICENSE
|
2019-02-06 10:08:21 +01:00
|
|
|
%{_javadocdir}/%{name}
|
2019-04-09 16:57:14 +02:00
|
|
|
%endif
|
2007-01-16 00:18:36 +01:00
|
|
|
|
2008-01-28 16:00:10 +01:00
|
|
|
%changelog
|