2009-05-25 02:51:11 +00:00
|
|
|
#
|
2012-11-02 06:31:09 +00:00
|
|
|
# spec file for package qdox
|
2009-05-25 02:51:11 +00:00
|
|
|
#
|
2024-04-10 14:17:39 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2009-05-25 02:51:11 +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.
|
|
|
|
|
2018-10-29 10:52:32 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2009-05-25 02:51:11 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: qdox
|
2024-04-10 14:17:39 +00:00
|
|
|
Version: 2.1.0
|
2012-11-02 06:31:09 +00:00
|
|
|
Release: 0
|
2019-01-10 08:21:56 +00:00
|
|
|
Summary: Tool to extract class/interface/method definitions from sources
|
2011-12-06 17:58:29 +00:00
|
|
|
License: Apache-2.0
|
2009-05-25 02:51:11 +00:00
|
|
|
Group: Development/Libraries/Java
|
2019-01-01 12:48:49 +00:00
|
|
|
URL: https://github.com/paul-hammant/qdox
|
2021-04-30 07:02:27 +00:00
|
|
|
Source0: https://repo1.maven.org/maven2/com/thoughtworks/qdox/qdox/%{version}/%{name}-%{version}-project.tar.bz2
|
2022-01-13 11:49:56 +00:00
|
|
|
Source1: qdox-build.xml
|
2022-03-12 06:11:00 +00:00
|
|
|
Patch0: Port-to-JFlex-1.7.0.patch
|
2022-01-13 11:49:56 +00:00
|
|
|
BuildRequires: ant
|
2009-05-25 02:51:11 +00:00
|
|
|
BuildRequires: byaccj
|
2019-01-01 12:48:49 +00:00
|
|
|
BuildRequires: fdupes
|
2019-01-15 08:48:31 +00:00
|
|
|
BuildRequires: java-cup-bootstrap
|
2019-01-01 12:48:49 +00:00
|
|
|
BuildRequires: java-devel
|
2024-04-10 14:29:06 +00:00
|
|
|
BuildRequires: javapackages-local >= 6
|
2019-01-15 09:11:13 +00:00
|
|
|
BuildRequires: jflex-bootstrap
|
2017-06-09 10:29:08 +00:00
|
|
|
BuildArch: noarch
|
2009-05-25 02:51:11 +00:00
|
|
|
|
|
|
|
%description
|
2019-01-10 08:21:56 +00:00
|
|
|
QDox is a parser for extracting class/interface/method definitions
|
|
|
|
from source files complete with JavaDoc @tags. It is designed to be
|
|
|
|
used by active code generators or documentation tools.
|
2009-05-25 02:51:11 +00:00
|
|
|
|
|
|
|
%package javadoc
|
2019-01-01 12:48:49 +00:00
|
|
|
Summary: Javadoc for %{name}
|
2009-05-25 02:51:11 +00:00
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description javadoc
|
2019-01-01 12:48:49 +00:00
|
|
|
API docs for %{name}.
|
2009-05-25 02:51:11 +00:00
|
|
|
|
|
|
|
%prep
|
2021-04-30 05:27:10 +00:00
|
|
|
%setup -q
|
2022-01-13 11:49:56 +00:00
|
|
|
cp %{SOURCE1} build.xml
|
2024-02-20 13:47:30 +00:00
|
|
|
%patch -P 0 -p1
|
2019-01-01 12:48:49 +00:00
|
|
|
find -name *.jar -delete
|
|
|
|
find -name *.class -delete
|
|
|
|
rm -rf bootstrap
|
|
|
|
# We don't need these plugins
|
|
|
|
%pom_remove_plugin :animal-sniffer-maven-plugin
|
2022-01-13 11:49:56 +00:00
|
|
|
%pom_remove_plugin :maven-assembly-plugin
|
2019-01-01 12:48:49 +00:00
|
|
|
%pom_remove_plugin :maven-failsafe-plugin
|
2022-01-13 11:49:56 +00:00
|
|
|
%pom_remove_plugin :maven-invoker-plugin
|
|
|
|
%pom_remove_plugin :jflex-maven-plugin
|
2019-01-01 12:48:49 +00:00
|
|
|
%pom_remove_plugin :maven-enforcer-plugin
|
2022-01-13 11:49:56 +00:00
|
|
|
%pom_remove_plugin :exec-maven-plugin
|
2009-05-25 02:51:11 +00:00
|
|
|
|
2019-04-08 11:23:54 +00:00
|
|
|
%pom_remove_parent .
|
|
|
|
|
2009-05-25 02:51:11 +00:00
|
|
|
%build
|
2022-01-12 12:16:00 +00:00
|
|
|
# Generate scanners (upstream does this with maven-jflex-plugin)
|
2022-01-12 11:00:50 +00:00
|
|
|
jflex -d src/main/java/com/thoughtworks/qdox/parser/impl src/grammar/lexer.flex
|
|
|
|
jflex -d src/main/java/com/thoughtworks/qdox/parser/impl src/grammar/commentlexer.flex
|
2009-05-25 02:51:11 +00:00
|
|
|
|
2022-01-12 12:16:00 +00:00
|
|
|
# Generate parsers (upstream does this with exec-maven-plugin)
|
|
|
|
(cd ./src/main/java/com/thoughtworks/qdox/parser/impl
|
|
|
|
byaccj -v -Jnorun -Jnoconstruct -Jclass=DefaultJavaCommentParser -Jpackage=com.thoughtworks.qdox.parser.impl ../../../../../../../grammar/commentparser.y
|
|
|
|
byaccj -v -Jnorun -Jnoconstruct -Jclass=Parser -Jimplements=CommentHandler -Jsemantic=Value -Jpackage=com.thoughtworks.qdox.parser.impl -Jstack=500 ../../../../../../../grammar/parser.y
|
|
|
|
)
|
2009-05-25 02:51:11 +00:00
|
|
|
|
2024-04-10 14:17:39 +00:00
|
|
|
%ant -Dproject.version=%{version} jar javadoc
|
2019-01-01 12:48:49 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
# jar
|
|
|
|
install -dm 0755 %{buildroot}%{_javadir}
|
2022-01-13 11:49:56 +00:00
|
|
|
install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
|
2018-10-29 10:52:32 +00:00
|
|
|
# pom
|
2019-01-01 12:48:49 +00:00
|
|
|
install -dm 0755 %{buildroot}%{_mavenpomdir}
|
2024-04-10 14:29:06 +00:00
|
|
|
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
|
2019-01-01 12:48:49 +00:00
|
|
|
%add_maven_depmap %{name}.pom %{name}.jar -a qdox:qdox
|
|
|
|
# javadoc
|
|
|
|
mkdir -p %{buildroot}%{_javadocdir}/%{name}
|
2022-01-13 11:49:56 +00:00
|
|
|
cp -aL target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
2019-01-01 12:48:49 +00:00
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
|
|
|
|
|
|
|
%files -f .mfiles
|
|
|
|
%license LICENSE.txt
|
|
|
|
%doc README.md
|
2018-10-29 10:52:32 +00:00
|
|
|
|
2019-01-01 12:48:49 +00:00
|
|
|
%files javadoc
|
|
|
|
%{_javadocdir}/%{name}
|
2018-10-29 10:52:32 +00:00
|
|
|
%license LICENSE.txt
|
2009-05-25 02:51:11 +00:00
|
|
|
|
|
|
|
%changelog
|