Files
jsap/jsap.spec

83 lines
2.6 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package jsap
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
Name: jsap
Version: 2.2+git.1611080120.ed4eb51
Release: 0
Summary: Java Simple Argument Parser
License: Apache-2.0
Group: Development/Libraries/Java
URL: http://martiansoftware.com/%{name}/
Source0: %{name}-%{version}.tar.xz
Patch0: 00-use-system-jars.patch
BuildRequires: ant
BuildRequires: ant-junit
BuildRequires: java-javadoc
BuildRequires: javapackages-local
BuildRequires: xmlto
BuildRequires: xmvn-install
BuildRequires: xstream-javadoc
BuildRequires: mvn(com.thoughtworks.xstream:xstream)
BuildArch: noarch
%description
JSAP not only syntactically validates your programs command line arguments,
but it converts those arguments into objects you specify. If you tell JSAP that
one of your parameters is an Integer, for example, and the user does not
provide a String that can be converted to an Integer when invoking the program,
JSAP will throw a ParseException when you have it parse the command line. If no
exception is thrown, you are guaranteed an Integer when you request that
parameters value from your program. Theres a pretty big (and growing) list of
return types suppored by JSAP, including Integers, Floats, Dates, URLs, and
even java.awt.Colors; you can also add your own in a matter of minutes.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q
%patch -P 0 -p1
%{mvn_file} : %{name}
%build
build-jar-repository -s lib junit xstream ant
%{ant} \
-Dj2se.apiurl=file:%{_javadocdir}/java \
-Dxstream.apiurl=file:%{_javadocdir}/xstream \
jar javadoc
%install
%{mvn_artifact} pom.xml dist/%{name}-$(echo %{version} |sed -e 's/+.*//').jar
%{mvn_alias} : it.unimi.di:jsap
%mvn_install -J doc/javadoc
rm -rf doc/javadoc
%files -f .mfiles
%license LICENSE-2.0.txt
%doc doc/*
%files javadoc -f .mfiles-javadoc
%license LICENSE-2.0.txt
%changelog