File axis.spec of Package axis

#
# spec file for package axis (Version 1.4)
#
# Copyright (c) 2009 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/
#

# norootforbuild
# icecream 0


Name:           axis
BuildRequires:  ant ant-jdepend ant-nodeps antlr classpath classpathx-mail gnu-jaf jakarta-commons-discovery jakarta-commons-httpclient3 jakarta-commons-logging jpackage-utils junit libtool log4j-mini perl servletapi5 unzip update-alternatives wsdl4j xerces-j2
BuildRequires:  java-1_5_0-gcj-compat-devel
%define name       axis
%define version    1.4
%define archivever 1_4
%define release    2jpp
%define section    free
Version:        1.4
Release:        265
Summary:        Apache implementation of the SOAP
License:        The Apache Software License
Group:          Development/Languages/Java
Url:            http://ws.apache.org/axis/
Source0:        %{name}-src-%{archivever}.tar.bz2
Patch0:         unimplemented-dom3-methods.patch
Patch1:         axis-1.4-gcc44_build.patch
# Mandatory requires
# optional requires
Requires:       java
Requires:       jpackage-utils >= 1.5
Requires:       jaf
Requires:       jakarta-commons-discovery
Requires:       jakarta-commons-logging
Requires:       jakarta-commons-httpclient3
Requires:       javamail
Requires:       jaxp_parser_impl
Requires:       log4j
Requires:       wsdl4j
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Apache Axis is an implementation of the SOAP ("Simple Object Access
Protocol") submission to W3C.



Authors:
--------
    Andras Avar
    David Chappell
    Glen Daniels
    Doug Davis
    Eric Friedman
    Chris Haddad
    Tom Jordahl
    Dominik Kacprzak
    Rick Kellogg
    Toshiyuki Kimura (Toshi)
    Steve Loughran
    Jaime Meritt
    Yuhichi Nakamura
    Thomas Sandholm
    Igor Sedukhin
    Davanum Srinivas
    Sanjiva Weerawarana
    Changshin Lee (a.k.a. Ias)
    Srinath Perera
    Venkat Reddy
    Jarek Gawor
    Jongjin Choi
    Guillaume Sauthier
    Chaminda Divitotawela
    Nuwan Gurusinghe
    Susantha Kumara
    Damitha Kumarage
    Nadika Ranasinghe
    Sanjaya Sinharage
    Roshan Weerasuriya
    Sanjiva Weerawarana

%package javadoc
License:        The Apache Software License
PreReq:         coreutils
Summary:        Api documentation for axis
Group:          Documentation/Other

%description javadoc
Api documentation for axis



Authors:
--------
    Andras Avar
    David Chappell
    Glen Daniels
    Doug Davis
    Eric Friedman
    Chris Haddad
    Tom Jordahl
    Dominik Kacprzak
    Rick Kellogg
    Toshiyuki Kimura (Toshi)
    Steve Loughran
    Jaime Meritt
    Yuhichi Nakamura
    Thomas Sandholm
    Igor Sedukhin
    Davanum Srinivas
    Sanjiva Weerawarana
    Changshin Lee (a.k.a. Ias)
    Srinath Perera
    Venkat Reddy
    Jarek Gawor
    Jongjin Choi
    Guillaume Sauthier
    Chaminda Divitotawela
    Nuwan Gurusinghe
    Susantha Kumara
    Damitha Kumarage
    Nadika Ranasinghe
    Sanjaya Sinharage
    Roshan Weerasuriya
    Sanjiva Weerawarana

%package manual
License:        The Apache Software License
Summary:        Manual for axis
Group:          Documentation/Other

%description manual
Manual for axis



Authors:
--------
    Andras Avar
    David Chappell
    Glen Daniels
    Doug Davis
    Eric Friedman
    Chris Haddad
    Tom Jordahl
    Dominik Kacprzak
    Rick Kellogg
    Toshiyuki Kimura (Toshi)
    Steve Loughran
    Jaime Meritt
    Yuhichi Nakamura
    Thomas Sandholm
    Igor Sedukhin
    Davanum Srinivas
    Sanjiva Weerawarana
    Changshin Lee (a.k.a. Ias)
    Srinath Perera
    Venkat Reddy
    Jarek Gawor
    Jongjin Choi
    Guillaume Sauthier
    Chaminda Divitotawela
    Nuwan Gurusinghe
    Susantha Kumara
    Damitha Kumarage
    Nadika Ranasinghe
    Sanjaya Sinharage
    Roshan Weerasuriya
    Sanjiva Weerawarana

%prep
%setup -q -n %{name}-%{archivever}
%patch0 -p1
%if %suse_version >= 1120
%patch1 -p1 -b gcc44-build
%endif
# Remove provided binaries
find . -name "*.jar" -exec rm -f {} \;
find . -name "*.zip" -exec rm -f {} \;
find . -name "*.class" -exec rm -f {} \;

%build
export GC_MAXIMUM_HEAP_SIZE="134217728" #128M
[ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java
CLASSPATH=$(build-classpath wsdl4j jakarta-commons-discovery jakarta-commons-httpclient3 jakarta-commons-logging log4j activation javamail servletapi5)
export CLASSPATH=$CLASSPATH:$(build-classpath oro junit jdepend jimi xml-security jsse httpunit jms castor 2>/dev/null)
export OPT_JAR_LIST="ant/ant-nodeps"
export LC_ALL="en_US.UTF-8" # necessary for javadoc
ant -Dcompile.ime=true \
    -Dwsdl4j.jar=$(build-classpath wsdl4j) \
    -Dcommons-discovery.jar=$(build-classpath jakarta-commons-discovery) \
    -Dcommons-logging.jar=$(build-classpath jakarta-commons-logging) \
    -Dcommons-httpclient.jar=$(build-classpath jakarta-commons-httpclient3) \
    -Dlog4j-core.jar=$(build-classpath log4j) \
    -Dactivation.jar=$(build-classpath jaf) \
    -Dmailapi.jar=$(build-classpath javamail/mailapi) \
    -Dxerces.jar=$(build-classpath jaxp_parser_impl) \
    -Dservlet.jar=$(build-classpath servletapi5) \
    -Dregexp.jar=$(build-classpath oro 2>/dev/null) \
    -Djunit.jar=$(build-classpath junit 2>/dev/null) \
    -Djimi.jar=$(build-classpath jimi 2>/dev/null) \
    -Djsse.jar=$(build-classpath jsse/jsse 2>/dev/null) \
    -Dsource=1.4 \
    -Dtarget=1.4 \
    clean compile javadocs

%install
### Jar files
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
pushd build/lib
   install -m 644 axis.jar axis-ant.jar saaj.jar jaxrpc.jar \
           $RPM_BUILD_ROOT%{_javadir}/%{name}
popd
pushd $RPM_BUILD_ROOT%{_javadir}/%{name}
   for jar in *.jar ; do
      vjar=$(echo $jar | sed s+.jar+-%{version}.jar+g)
      mv $jar $vjar
      ln -fs $vjar $jar
   done
popd
### Javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr build/javadocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
pushd docs
   rm -fr apiDocs
   ln -fs %{_javadocdir}/%{name} apiDocs
popd

%clean
rm -rf $RPM_BUILD_ROOT

%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}

%postun javadoc
if [ "$1" = "0" ]; then
    rm -f %{_javadocdir}/%{name}
fi

%files
%defattr(0644,root,root,0755)
%doc LICENSE README release-notes.html changelog.html
%dir %{_javadir}/%{name}
%{_javadir}/%{name}/*.jar

%files javadoc
%defattr(0644,root,root,0755)
%dir %{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}-%{version}/*

%files manual
%defattr(0644,root,root,0755)
%doc docs/*

%changelog
* Thu May 21 2009 mvyskocil@suse.cz
- fixed build with new gcj44
* Thu Jul 31 2008 mvyskocil@suse.cz
- replace gnu-javamail dependency to classpathx-mail [bnc#411839]
  - the classpathx-foo is consistent with jpackage.org project
* Wed Jul 16 2008 coolo@suse.de
- avoid another build cycle
* Tue Apr 22 2008 mvyskocil@suse.cz
- fixed build with new gcj (memory consupmtion limit)
* Thu Jan 17 2008 skh@suse.de
- remove glibj from build-classpath call as we don't have classpath
  packages
* Wed May 02 2007 dbornkessel@suse.de
- added unzip to BuildRequires
* Thu Jan 05 2006 dbornkessel@suse.de
- Current version 1.2.3 from JPackage.org
openSUSE Build Service is sponsored by