File args4j.spec of Package args4j

#
# spec file for package args4j
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


Name:           args4j
Version:        2.0.9
Release:        0
Summary:        Java commandline parser
License:        MIT
Group:          Java/Development
Url:            http://args4j.kohsuke.org/
Source0:        %{name}-%{version}.tar.bz2
BuildRequires:  ant >= 1.7.0
BuildRequires:  ant-apache-regexp
BuildRequires:  ant-contrib
BuildRequires:  ant-junit
BuildRequires:  ant-nodeps
BuildRequires:  javapackages-tools
Requires:       java >= 1.5
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
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)

%package        javadoc
Summary:        Javadoc for Java commandline parser
Group:          Development/Libraries/Java

%description    javadoc
This package contains the API documentation for %{name}.

%prep
%setup -q

%build
mkdir -p build/generated-sources
ant

%install
install -d -m 0755 %{buildroot}%{_javadir}
install -m 644 dist/%{name}.jar  %{buildroot}%{_javadir}/%{name}-%{version}.jar
ln -sf %{_javadir}/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar

# Java doc
install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr dist/javadoc %{buildroot}%{_javadocdir}/%{name}/

%files
%defattr(-,root,root,-)
%{_javadir}/*

%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}

%changelog
openSUSE Build Service is sponsored by