2014-07-18 12:59:13 +00:00
|
|
|
#
|
2014-07-18 13:24:31 +00:00
|
|
|
# spec file for package args4j
|
2014-07-18 12:59:13 +00:00
|
|
|
#
|
2024-09-30 04:23:22 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2014-07-18 12:59:13 +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.
|
2014-07-18 13:24:31 +00:00
|
|
|
|
2018-10-19 17:38:46 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-07-18 12:59:13 +00:00
|
|
|
#
|
|
|
|
|
2014-07-18 13:24:31 +00:00
|
|
|
|
2019-09-24 15:43:41 +00:00
|
|
|
%bcond_with tests
|
2014-07-18 12:59:13 +00:00
|
|
|
Name: args4j
|
2019-09-24 15:43:41 +00:00
|
|
|
Version: 2.33
|
2014-07-18 13:24:31 +00:00
|
|
|
Release: 0
|
2019-09-24 15:43:41 +00:00
|
|
|
Summary: Java command line arguments parser
|
2014-07-18 13:24:31 +00:00
|
|
|
License: MIT
|
2016-07-01 18:17:25 +00:00
|
|
|
Group: Development/Libraries/Java
|
2019-09-24 15:43:41 +00:00
|
|
|
URL: https://args4j.kohsuke.org
|
|
|
|
Source0: https://github.com/kohsuke/%{name}/archive/%{name}-site-%{version}.tar.gz
|
|
|
|
Source1: %{name}-build.tar.xz
|
|
|
|
BuildRequires: ant
|
2017-09-15 08:27:03 +00:00
|
|
|
BuildRequires: fdupes
|
2022-03-23 23:09:09 +00:00
|
|
|
BuildRequires: java-devel >= 1.8
|
2024-09-30 04:23:22 +00:00
|
|
|
BuildRequires: javapackages-local >= 6
|
2014-07-18 12:59:13 +00:00
|
|
|
BuildArch: noarch
|
2019-09-24 15:43:41 +00:00
|
|
|
%if %{with tests}
|
|
|
|
BuildRequires: ant-junit
|
|
|
|
BuildRequires: mockito
|
|
|
|
%endif
|
2014-07-18 13:24:31 +00:00
|
|
|
|
2014-07-18 12:59:13 +00:00
|
|
|
%description
|
2014-07-18 13:24:31 +00:00
|
|
|
args4j is a small Java class library that makes it easy
|
|
|
|
to parse command line options/arguments in your CUI application.
|
|
|
|
- It makes the command line parsing very easy by using annotations
|
|
|
|
- You can generate the usage screen very easily
|
|
|
|
- You can generate HTML/XML that lists all options for your documentation
|
|
|
|
- Fully supports localization
|
|
|
|
- It is designed to parse javac like options (as opposed to GNU-style
|
|
|
|
where ls -lR is considered to have two options l and R)
|
2014-07-18 12:59:13 +00:00
|
|
|
|
2019-09-24 15:43:41 +00:00
|
|
|
%package tools
|
|
|
|
Summary: Development-time tool for generating additional artifacts
|
2014-07-18 13:24:31 +00:00
|
|
|
Group: Development/Libraries/Java
|
2019-09-24 15:43:41 +00:00
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description tools
|
|
|
|
This package contains args4j development-time tool for generating
|
|
|
|
additional artifacts.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: API documentation for %{name}
|
|
|
|
Group: Documentation/HTML
|
2014-07-18 13:24:31 +00:00
|
|
|
|
2019-09-24 15:43:41 +00:00
|
|
|
%description javadoc
|
2014-07-18 13:24:31 +00:00
|
|
|
This package contains the API documentation for %{name}.
|
2014-07-18 12:59:13 +00:00
|
|
|
|
2014-07-18 13:24:31 +00:00
|
|
|
%prep
|
2019-09-24 15:43:41 +00:00
|
|
|
%setup -q -n %{name}-%{name}-site-%{version} -a 1
|
|
|
|
|
|
|
|
# removing classpath addition
|
|
|
|
sed -i 's/<addClasspath>true/<addClasspath>false/g' %{name}-tools/pom.xml
|
|
|
|
|
|
|
|
# fix ant group id
|
|
|
|
sed -i 's/<groupId>ant/<groupId>org.apache.ant/g' %{name}-tools/pom.xml
|
|
|
|
|
|
|
|
# removing bundled stuff
|
|
|
|
find -name '*.class' -exec rm -f '{}' \;
|
|
|
|
find -name '*.jar' -exec rm -f '{}' \;
|
|
|
|
|
|
|
|
%pom_remove_plugin :maven-shade-plugin %{name}-tools
|
|
|
|
%pom_remove_plugin -r :maven-site-plugin
|
|
|
|
|
|
|
|
# XMvn cannot generate requires on dependecies with scope "system"
|
|
|
|
%pom_xpath_remove "pom:profile[pom:id[text()='jdk-tools-jar']]" %{name}-tools
|
|
|
|
|
|
|
|
# we don't need these now
|
|
|
|
%pom_disable_module args4j-maven-plugin
|
|
|
|
%pom_disable_module args4j-maven-plugin-example
|
|
|
|
|
2014-07-18 12:59:13 +00:00
|
|
|
%build
|
2019-09-24 15:43:41 +00:00
|
|
|
mkdir -p lib
|
|
|
|
%if %{with tests}
|
|
|
|
build-jar-repository -s lib cglib/cglib mockito/mockito-core objectweb-asm/asm objenesis/objenesis
|
2024-10-02 15:34:55 +00:00
|
|
|
ant package javadoc
|
2019-09-24 15:43:41 +00:00
|
|
|
%else
|
2024-09-30 04:23:22 +00:00
|
|
|
ant -Dtest.skip=true package javadoc
|
2019-09-24 15:43:41 +00:00
|
|
|
%endif
|
2014-07-18 12:59:13 +00:00
|
|
|
|
|
|
|
%install
|
2019-09-24 15:43:41 +00:00
|
|
|
# jar
|
|
|
|
install -dm 0755 %{buildroot}%{_javadir}/%{name}
|
|
|
|
install -pm 0644 %{name}/target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar
|
|
|
|
(cd %{buildroot}%{_javadir} && ln -s %{name}/%{name}.jar %{name}.jar)
|
|
|
|
install -pm 0644 %{name}-tools/target/%{name}-tools-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}-tools.jar
|
|
|
|
(cd %{buildroot}%{_javadir} && ln -s %{name}/%{name}-tools.jar %{name}-tools.jar)
|
2014-07-18 12:59:13 +00:00
|
|
|
|
2018-10-19 17:38:46 +00:00
|
|
|
# pom
|
2019-09-24 15:43:41 +00:00
|
|
|
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
|
2024-09-30 04:23:22 +00:00
|
|
|
%{mvn_install_pom} %{name}/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom
|
2019-09-24 15:43:41 +00:00
|
|
|
%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar
|
2024-09-30 04:23:22 +00:00
|
|
|
%{mvn_install_pom} %{name}-tools/pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}-tools.pom
|
2019-09-24 15:43:41 +00:00
|
|
|
%add_maven_depmap %{name}/%{name}-tools.pom %{name}/%{name}-tools.jar -f tools
|
|
|
|
|
|
|
|
# javadoc
|
|
|
|
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
cp -r %{name}/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/%{name}
|
|
|
|
cp -r %{name}-tools/target/site/apidocs %{buildroot}%{_javadocdir}/%{name}/%{name}-tools
|
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
|
|
|
|
|
|
|
%files -f .mfiles
|
|
|
|
%{_javadir}/%{name}*.jar
|
|
|
|
%license %{name}/LICENSE.txt
|
|
|
|
|
|
|
|
%files tools -f .mfiles-tools
|
2014-07-18 13:24:31 +00:00
|
|
|
|
|
|
|
%files javadoc
|
2014-07-18 12:59:13 +00:00
|
|
|
%{_javadocdir}/%{name}
|
2019-09-24 15:43:41 +00:00
|
|
|
%license %{name}/LICENSE.txt
|
2014-07-18 12:59:13 +00:00
|
|
|
|
|
|
|
%changelog
|