%define with_maven 1 Name: ws-commons-java5 Version: 1.0.1 Release: %mkrel 2 Summary: Apache Webservices Java 5 Classes Group: Development/Java License: ASL 2.0 Url: http://ws.apache.org/commons/ws-commons-java5/ Source0: http://www.apache.org/dist/ws/commons/java5/sources/%{name}-%{version}-src.tar.gz Source1: %{name}-%{version}-autogeneratedfiles.tar.gz BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: xml-commons-apis %if !%with_maven BuildRequires: ant BuildRequires: junit %else BuildRequires: maven-assembly-plugin BuildRequires: maven-compiler-plugin BuildRequires: maven-eclipse-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-source-plugin BuildRequires: maven-ant-plugin %endif Requires: xml-commons-apis Requires: java Requires: jpackage-utils Requires(post): jpackage-utils Requires(postun): jpackage-utils BuildArch: noarch %description This is a small collection of classes, which are part of the Java 5 Core. In other words, you do not need this library, if you are running Java 5, or later. The Java 5 classes are used by projects like Apache JaxMe, Apache XML-RPC, or the the ws-common-utils. %package javadoc Summary: Javadocs for %{name} Group: Development/Java Requires: jpackage-utils %description javadoc This package contains javadoc for %{name} %prep %setup -q chmod -R go=u-w * for f in $(find . -name "*.jar"); do mv $f $f.no done %if !%with_maven tar -xf %SOURCE1 %endif %build %if %with_maven mvn-rpmbuild ant:ant install javadoc:aggregate %else # TODO %endif %install install -d -m 755 $RPM_BUILD_ROOT%{_javadir} install -pm 644 target/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom %add_to_maven_depmap org.apache.ws.commons %{name} %{version} JPP %{name} install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} %post %update_maven_depmap %postun %update_maven_depmap %files %{_javadir}/%{name}.jar %{_mavenpomdir}/* %{_mavendepmapfragdir}/* %doc LICENSE.txt %files javadoc %{_javadocdir}/%{name} %changelog * Mon Jan 14 2013 umeabot <umeabot> 1.0.1-2.mga3 + Revision: 385861 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Wed Nov 09 2011 gil <gil> 1.0.1-1.mga2 + Revision: 166019 - imported package ws-commons-java5