2009-05-25 04:51:11 +02:00
|
|
|
#
|
2012-11-02 07:31:09 +01:00
|
|
|
# spec file for package qdox
|
2009-05-25 04:51:11 +02:00
|
|
|
#
|
2024-04-10 16:17:39 +02:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2009-05-25 04:51:11 +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.
|
|
|
|
|
2018-10-29 11:52:32 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2009-05-25 04:51:11 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: qdox
|
2024-04-10 16:17:39 +02:00
|
|
|
Version: 2.1.0
|
2012-11-02 07:31:09 +01:00
|
|
|
Release: 0
|
2019-01-10 09:21:56 +01:00
|
|
|
Summary: Tool to extract class/interface/method definitions from sources
|
2011-12-06 18:58:29 +01:00
|
|
|
License: Apache-2.0
|
2009-05-25 04:51:11 +02:00
|
|
|
Group: Development/Libraries/Java
|
2019-01-01 13:48:49 +01:00
|
|
|
URL: https://github.com/paul-hammant/qdox
|
2021-04-30 09:02:27 +02:00
|
|
|
Source0: https://repo1.maven.org/maven2/com/thoughtworks/qdox/qdox/%{version}/%{name}-%{version}-project.tar.bz2
|
2022-01-13 12:49:56 +01:00
|
|
|
Source1: qdox-build.xml
|
2022-03-12 07:11:00 +01:00
|
|
|
Patch0: Port-to-JFlex-1.7.0.patch
|
2022-01-13 12:49:56 +01:00
|
|
|
BuildRequires: ant
|
2009-05-25 04:51:11 +02:00
|
|
|
BuildRequires: byaccj
|
2019-01-01 13:48:49 +01:00
|
|
|
BuildRequires: fdupes
|
2019-01-15 09:48:31 +01:00
|
|
|
BuildRequires: java-cup-bootstrap
|
2019-01-01 13:48:49 +01:00
|
|
|
BuildRequires: java-devel
|
2024-04-10 16:29:06 +02:00
|
|
|
BuildRequires: javapackages-local >= 6
|
2019-01-15 10:11:13 +01:00
|
|
|
BuildRequires: jflex-bootstrap
|
2017-06-09 12:29:08 +02:00
|
|
|
BuildArch: noarch
|
2009-05-25 04:51:11 +02:00
|
|
|
|
|
|
|
%description
|
2019-01-10 09:21:56 +01: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 04:51:11 +02:00
|
|
|
|
|
|
|
%package javadoc
|
2019-01-01 13:48:49 +01:00
|
|
|
Summary: Javadoc for %{name}
|
2009-05-25 04:51:11 +02:00
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description javadoc
|
2019-01-01 13:48:49 +01:00
|
|
|
API docs for %{name}.
|
2009-05-25 04:51:11 +02:00
|
|
|
|
|
|
|
%prep
|
2021-04-30 07:27:10 +02:00
|
|
|
%setup -q
|
2022-01-13 12:49:56 +01:00
|
|
|
cp %{SOURCE1} build.xml
|
2024-02-20 14:47:30 +01:00
|
|
|
%patch -P 0 -p1
|
2019-01-01 13:48:49 +01: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 12:49:56 +01:00
|
|
|
%pom_remove_plugin :maven-assembly-plugin
|
2019-01-01 13:48:49 +01:00
|
|
|
%pom_remove_plugin :maven-failsafe-plugin
|
2022-01-13 12:49:56 +01:00
|
|
|
%pom_remove_plugin :maven-invoker-plugin
|
|
|
|
%pom_remove_plugin :jflex-maven-plugin
|
2019-01-01 13:48:49 +01:00
|
|
|
%pom_remove_plugin :maven-enforcer-plugin
|
2022-01-13 12:49:56 +01:00
|
|
|
%pom_remove_plugin :exec-maven-plugin
|
2009-05-25 04:51:11 +02:00
|
|
|
|
2019-04-08 13:23:54 +02:00
|
|
|
%pom_remove_parent .
|
|
|
|
|
2009-05-25 04:51:11 +02:00
|
|
|
%build
|
2022-01-12 13:16:00 +01:00
|
|
|
# Generate scanners (upstream does this with maven-jflex-plugin)
|
2022-01-12 12:00:50 +01: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 04:51:11 +02:00
|
|
|
|
2022-01-12 13:16:00 +01: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 04:51:11 +02:00
|
|
|
|
2024-04-10 16:17:39 +02:00
|
|
|
%ant -Dproject.version=%{version} jar javadoc
|
2019-01-01 13:48:49 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
# jar
|
|
|
|
install -dm 0755 %{buildroot}%{_javadir}
|
2022-01-13 12:49:56 +01:00
|
|
|
install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
|
2018-10-29 11:52:32 +01:00
|
|
|
# pom
|
2019-01-01 13:48:49 +01:00
|
|
|
install -dm 0755 %{buildroot}%{_mavenpomdir}
|
2024-04-10 16:29:06 +02:00
|
|
|
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
|
2019-01-01 13:48:49 +01:00
|
|
|
%add_maven_depmap %{name}.pom %{name}.jar -a qdox:qdox
|
|
|
|
# javadoc
|
|
|
|
mkdir -p %{buildroot}%{_javadocdir}/%{name}
|
2022-01-13 12:49:56 +01:00
|
|
|
cp -aL target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
2019-01-01 13:48:49 +01:00
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
|
|
|
|
|
|
|
%files -f .mfiles
|
|
|
|
%license LICENSE.txt
|
|
|
|
%doc README.md
|
2018-10-29 11:52:32 +01:00
|
|
|
|
2019-01-01 13:48:49 +01:00
|
|
|
%files javadoc
|
|
|
|
%{_javadocdir}/%{name}
|
2018-10-29 11:52:32 +01:00
|
|
|
%license LICENSE.txt
|
2009-05-25 04:51:11 +02:00
|
|
|
|
|
|
|
%changelog
|