packages jakarta-commons-cli.spec
      Pages: < 1 >  DOWNLOAD      
%define        javahome   %{_jvmdir}/jdk
Name:          jakarta-commons-cli
Version:       1.1
Release:       3mamba
Summary:       Jakarta Commons CLI (Command Line Interface) Package
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      Silvan Calarco <silvan.calarco@...>
URL:           http://commons.apache.org/cli/
Source0:       http://apache.fis.uniroma2.it/commons/cli/source/commons-cli-%{version}-src.tar.gz
Source1:       http://mirrors.ibiblio.org/pub/mirrors/maven/commons-cli/poms/commons-cli-%{version}.pom
Patch0:        jakarta-commons-cli-1.1-MultiOptions.patch
License:       Apache License Version 2.0
BuildRequires: apache-ant
BuildRequires: jakarta-commons-lang
BuildRequires: jakarta-commons-logging
BuildRequires: java-gcj-compat
BuildRequires: java-junit3
BuildRequires: jpackage-utils
Requires:      jakarta-commons-lang
Requires:      jakarta-commons-logging
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
The Apache Commons CLI library provides an API for processing command line interfaces. 

%package javadoc
Group:          Documentation
Summary:        Javadoc for %{name}

%description javadoc
Jakarta Commons CLI (Command Line Interface) Package

This package contains javadoc for %{name}.

%prep
%setup -q -n commons-cli-%{version}-src
%patch0 -p0 -b .sav

%build
export JAVA_HOME=%javahome
export CLASSPATH=$(build-classpath commons-logging commons-lang junit-3.8.2 ant/ant-junit)
CLASSPATH=$CLASSPATH:target/commons-cli.jar:target/test-classes:target/classes
 # for tests
mkdir lib
ant \
  -Dbuild.sysclasspath=only \
  -Dfinal.name=commons-cli \
  jar dist \
%if "%{stage1}" != "1"
  test
%endif

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}
mkdir -p %{buildroot}%{_datadir}/maven2/poms

install -p -m 644 dist/commons-cli.jar \
	%{buildroot}%{_javadir}/%{name}-%{version}.jar

%add_to_maven_depmap commons-cli commons-cli %{version} JPP jakarta-commons-cli
install -pm 644 %{SOURCE1} %{buildroot}%{_datadir}/maven2/poms/JPP-jakarta-commons-cli.pom

(
  cd %{buildroot}%{_javadir}
  for jar in *-%{version}*; do
    ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"`
  done
)

(
  cd %{buildroot}%{_javadir}
  for jar in *-%{version}*; do
    ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
  done
)

mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/%{name}-%{version}

#%{_bindir}/aot-compile-rpm

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root)
%{_javadir}/commons-cli-%{version}.jar
%{_javadir}/commons-cli.jar
%{_javadir}/jakarta-commons-cli-%{version}.jar
%{_javadir}/jakarta-commons-cli.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc LICENSE.txt README.txt

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

%changelog
* Thu Mar 24 2011 gil <puntogil@...> 1.1-3mamba
- rebuilt with java-gcj-compat support

* Sat Oct 30 2010 gil <puntogil@...> 1.1-2mamba
- rebuilt devel
- add maven pom

* Fri Mar 06 2009 gil <puntogil@...> 1.1-1mamba
- package created by autospec