* performance improvements in directory scanning * XSLT task honors classpath again (bugrep 49271) * distinction between core tasks and optional tasks is abolished * new task augment allows to add attributes or nested elements to previously defined references * Lexically scoped local properties, i.e. properties that are only defined inside a target, sequential block or similar environment. This is very useful inside of <macrodef>s where a macro can now define a temporary property that will disappear once the task has finished. * <import> can now import from any file- or URL-providing resource - this includes <javaresource>. This means <import> can read build file snippets from JARs or fixed server URLs. There are several other improvements in the area of import. * Various improvements to the directory scanning code that help with symbolic link cycles (as can be found on MacOS X Java installations for example) and improve scanning performance. For big directory trees the improvement is dramatic. * The way developers can extend Ant's property expansion algorithm has been rewritten (breaking the older API) to be easier to use and be more powerful. The whole local properties mechanism is implemented using that API and could be implemented in a separate library without changes in Ant's core. Things like the yet-to-be-released props Antlib can now provide often required "scripty" fuctions without touching Ant itself. At the same time the if and unless attributes have been rewritten to do the expected thing if applied to a property expansion (i.e. if="${foo}" will mean "yes, do it" if ${foo} expands to true, in Ant 1.7.1 it would mean "no" unless a property named "true" existed). This adds "testing conditions" as a new use-case to property expansion. * A new top-level element <extension-point> assists in writing re-usable build files that are meant to be imported. <extension-point> has a name and a dependency-list like <target> and can be used like a <target> from the command line or a dependency-list but the importing build file can add targets to the <extension-point>'s depends list. * Ant now requires Java 1.4 or later new task include provides an alternative to <import> that should be preferred when you don't want to override any targets * numerous bug fixes and improvements as documented in Bugzilla and in WHATSNEW - merge the nodeps and trax packages to main one - build ant-antlr.spec using openjdk - add ant-apache-xalan2 and ant-testutil OBS-URL: https://build.opensuse.org/package/show/Java:packages/ant?expand=0&rev=16
874 lines
27 KiB
RPMSpec
874 lines
27 KiB
RPMSpec
# Copyright (c) 2000-2009, JPackage Project
|
|
# All rights reserved.
|
|
#
|
|
# Redistribution and use in source and binary forms, with or without
|
|
# modification, are permitted provided that the following conditions
|
|
# are met:
|
|
#
|
|
# 1. Redistributions of source code must retain the above copyright
|
|
# notice, this list of conditions and the following disclaimer.
|
|
# 2. Redistributions in binary form must reproduce the above copyright
|
|
# notice, this list of conditions and the following disclaimer in the
|
|
# documentation and/or other materials provided with the
|
|
# distribution.
|
|
# 3. Neither the name of the JPackage Project nor the names of its
|
|
# contributors may be used to endorse or promote products derived
|
|
# from this software without specific prior written permission.
|
|
#
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
#
|
|
%define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
|
|
%define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
|
|
%define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
|
|
%define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
|
|
|
|
##### WARNING: please do not edit this auto generated spec file. Use the ant.spec! #####
|
|
%global bootstrap 0
|
|
|
|
%if %with bootstrap
|
|
%global build_javadoc 0
|
|
%else
|
|
%global build_javadoc 1
|
|
%endif
|
|
|
|
%global with_manifest_only 0
|
|
|
|
%global ant_home %{_datadir}/ant
|
|
|
|
%global major_version 1.8
|
|
%global cvs_version 1.8.2
|
|
|
|
Name: ant-antlr
|
|
Version: 1.8.2
|
|
Release: 0
|
|
License: ASL 2.0
|
|
%if %bootstrap
|
|
Summary: Build tool for java
|
|
%else
|
|
Summary: Antlr Task for ant
|
|
%endif
|
|
URL: http://ant.apache.org/
|
|
Group: Development/Tools/Building
|
|
Source0: http://www.apache.org/dist/ant/source/apache-ant-%{cvs_version}-src.tar.bz2
|
|
Source2: apache-ant-%{major_version}.ant.conf
|
|
Source1000: pre_checkin.sh
|
|
|
|
Patch1: apache-ant-bz163689.patch
|
|
Patch3: apache-ant-no-test-jar.patch
|
|
Patch4: apache-ant-class-path-in-manifest.patch
|
|
|
|
%if %bootstrap
|
|
BuildRequires: java-1_5_0-gcj-compat-devel
|
|
%else
|
|
BuildRequires: java-devel >= 1.5.0
|
|
%endif
|
|
BuildRequires: jpackage-utils >= 1.7.5
|
|
BuildRequires: antlr-bootstrap
|
|
BuildRequires: unzip
|
|
BuildRequires: xerces-j2-bootstrap
|
|
BuildRequires: xml-commons-apis-bootstrap
|
|
%if ! %bootstrap
|
|
BuildRequires: xalan-j2
|
|
BuildRequires: ant = %{version}
|
|
BuildRequires: junit
|
|
BuildRequires: xml-commons-apis
|
|
BuildRequires: xerces-j2
|
|
#!BuildIgnore: antlr
|
|
%endif
|
|
%if %bootstrap
|
|
Requires: xerces-j2 >= 2.7.1-2
|
|
Requires: jaxp_parser_impl
|
|
Requires: xml-commons-apis
|
|
Requires: xml-commons-resolver
|
|
Requires: jpackage-utils >= 1.7.5
|
|
Requires: java-devel >= 1.5.0
|
|
Obsoletes: apache-ant < %{version}
|
|
Provides: apache-ant = %{version}
|
|
Obsoletes: ant-nodeps < %{version}
|
|
Provides: ant-nodeps = %{version}
|
|
Obsoletes: ant-trax < %{version}
|
|
Provides: ant-trax = %{version}
|
|
%else
|
|
# ant-antlr requires
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: antlr
|
|
Provides: ant-antlr = %{version}-%{release}
|
|
%endif
|
|
BuildArch: noarch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
Apache Ant is a Java-based build tool. In theory, it is kind of like
|
|
Make, but without Make's wrinkles.
|
|
|
|
Why another build tool when there is already make, gnumake, nmake, jam,
|
|
and others? Because all those tools have limitations that Ant's
|
|
original author could not live with when developing software across
|
|
multiple platforms. Make-like tools are inherently shell-based--they
|
|
evaluate a set of dependencies then execute commands, not unlike what
|
|
you would issue in a shell. This means that you can easily extend these
|
|
tools by using or writing any program for the OS that you are working
|
|
on. However, this also means that you limit yourself to the OS, or at
|
|
least the OS type, such as Unix, that you are working on.
|
|
|
|
Makefiles are inherently evil as well. Anybody who has worked on them
|
|
for any time has run into the dreaded tab problem. "Is my command not
|
|
executing because I have a space in front of my tab???" said the
|
|
original author of Ant way too many times. Tools like Jam took care of
|
|
this to a great degree, but still have yet another format to use and
|
|
remember.
|
|
|
|
Ant is different. Instead of a model where it is extended with
|
|
shell-based commands, Ant is extended using Java classes. Instead of
|
|
writing shell commands, the configuration files are XML-based, calling
|
|
out a target tree where various tasks are executed. Each task is run by
|
|
an object that implements a particular task interface.
|
|
|
|
Granted, this removes some of the expressive power that is inherent by
|
|
being able to construct a shell command such as `find . -name foo -exec
|
|
rm {}`, but it gives you the ability to be cross-platform--to work
|
|
anywhere and everywhere. If you really need to execute a shell command,
|
|
Ant has an <exec> task that allows different commands to be executed
|
|
based on the OS used.
|
|
|
|
|
|
%if %bootstrap
|
|
|
|
%package -n ant-jmf
|
|
License: Apache Software License ..
|
|
Summary: Optional jmf tasks for ant
|
|
Group: Development/Tools/Building
|
|
Requires: ant = %{version}
|
|
Provides: ant-jmf = %{version}-%{release}
|
|
|
|
%description -n ant-jmf
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains optional jmf tasks for Apache Ant.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n ant-swing
|
|
License: Apache Software License ..
|
|
Summary: Optional swing tasks for ant
|
|
Group: Development/Tools/Building
|
|
Requires: ant = %{version}
|
|
Provides: ant-swing = %{version}-%{release}
|
|
|
|
%description -n ant-swing
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains optional swing tasks for Apache Ant.
|
|
|
|
|
|
|
|
|
|
|
|
%package -n ant-scripts
|
|
License: Apache Software License ..
|
|
Summary: Additional scripts for ant
|
|
Group: Development/Tools/Building
|
|
AutoReqProv: no
|
|
Requires: ant = %{version}
|
|
Requires: %{_bindir}/perl
|
|
Requires: %{_bindir}/python
|
|
|
|
%description -n ant-scripts
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains additional perl and python scripts for Apache
|
|
Ant.
|
|
|
|
|
|
|
|
%endif #if bootstrap
|
|
%if ! %bootstrap
|
|
|
|
%package -n ant-apache-bsf
|
|
License: Apache Software License ..
|
|
Summary: Optional apache bsf tasks for ant
|
|
Group: Development/Tools/Building
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: bsf
|
|
BuildRequires: bsf
|
|
Provides: ant-apache-bsf = %{version}-%{release}
|
|
|
|
%description -n ant-apache-bsf
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains optional apache bsf tasks for Apache Ant.
|
|
|
|
|
|
|
|
%package -n ant-apache-resolver
|
|
License: Apache Software License ..
|
|
Summary: Optional apache resolver tasks for ant
|
|
Group: Development/Tools/Building
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: xml-commons-resolver
|
|
BuildRequires: xml-commons-resolver
|
|
Provides: ant-apache-resolver = %{version}-%{release}
|
|
|
|
%description -n ant-apache-resolver
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains optional apache resolver tasks for Apache Ant.
|
|
|
|
|
|
|
|
%package -n ant-commons-logging
|
|
License: Apache Software License ..
|
|
Summary: Optional commons logging tasks for ant
|
|
Group: Development/Tools/Building
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: jakarta-commons-logging
|
|
BuildRequires: jakarta-commons-logging
|
|
Provides: ant-commons-logging = %{version}-%{release}
|
|
|
|
%description -n ant-commons-logging
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains optional commons logging tasks for Apache Ant.
|
|
|
|
|
|
|
|
%package -n ant-commons-net
|
|
License: Apache Software License ..
|
|
Summary: Optional commons net tasks for ant
|
|
Group: Development/Tools/Building
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: jakarta-commons-net
|
|
BuildRequires: jakarta-commons-net
|
|
Provides: ant-commons-net = %{version}-%{release}
|
|
|
|
%description -n ant-commons-net
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains optional commons net tasks for Apache Ant.
|
|
|
|
|
|
|
|
# Disable because we don't ship the dependencies
|
|
%if 0
|
|
|
|
%package -n ant-jai
|
|
|
|
|
|
Summary: Optional jai tasks for ant
|
|
Group: Development/Tools/Building
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: jai
|
|
BuildRequires: jai
|
|
Provides: ant-jai = %{version}-%{release}
|
|
|
|
%description -n ant-jai
|
|
Optional jai tasks for ant.
|
|
%endif
|
|
|
|
%package -n ant-apache-bcel
|
|
License: Apache Software License ..
|
|
Summary: Optional apache bcel tasks for ant
|
|
Group: Development/Tools/Building
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: bcel
|
|
BuildRequires: bcel
|
|
Provides: ant-apache-bcel = %{version}
|
|
Provides: ant-jakarta-bcel = %{version}
|
|
Obsoletes: ant-jakarta-bcel < %{version}
|
|
|
|
%description -n ant-apache-bcel
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains optional apache bcel tasks for Apache Ant.
|
|
|
|
|
|
|
|
%package -n ant-apache-log4j
|
|
License: Apache Software License ..
|
|
Summary: Optional apache log4j tasks for ant
|
|
Group: Development/Tools/Building
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: log4j
|
|
BuildRequires: log4j-mini
|
|
Provides: ant-apache-log4j = %{version}
|
|
Provides: ant-jakarta-log4j = %{version}
|
|
Obsoletes: ant-jakarta-log4j < %{version}
|
|
|
|
%description -n ant-apache-log4j
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains optional apache log4j tasks for Apache Ant.
|
|
|
|
|
|
|
|
%package -n ant-apache-oro
|
|
License: Apache Software License ..
|
|
Summary: Optional apache oro tasks for ant
|
|
Group: Development/Tools/Building
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: oro
|
|
BuildRequires: oro
|
|
Provides: ant-apache-oro = %{version}
|
|
Provides: ant-jakarta-oro = %{version}
|
|
Obsoletes: ant-jakarta-oro < %{version}
|
|
|
|
%description -n ant-apache-oro
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains optional apache oro tasks for Apache Ant.
|
|
|
|
|
|
|
|
%package -n ant-apache-regexp
|
|
License: Apache Software License ..
|
|
Summary: Optional apache regexp tasks for ant
|
|
Group: Development/Tools/Building
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: regexp
|
|
BuildRequires: regexp
|
|
Provides: ant-apache-regexp = %{version}
|
|
Provides: ant-jakarta-regexp = %{version}
|
|
Obsoletes: ant-jakarta-regexp < %{version}
|
|
|
|
%description -n ant-apache-regexp
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains optional apache regexp tasks for Apache Ant.
|
|
|
|
%package -n ant-apache-xalan2
|
|
Summary: Optional apache xalan2 tasks for ant
|
|
Group: Development/Tools/Building
|
|
BuildRequires: regexp
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: regexp
|
|
Provides: ant-apache-xalan2 = %{version}
|
|
|
|
%description -n ant-apache-xalan2
|
|
Optional apache xalan2 tasks for %{name}.
|
|
|
|
|
|
%package -n ant-javamail
|
|
License: Other uncritical OpenSource License ; Common Development and Distribution License
|
|
Summary: Optional javamail tasks for ant
|
|
Group: Development/Tools/Building
|
|
BuildRequires: javamail >= 1.2-5jpp
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: javamail >= 1.2-5jpp
|
|
Provides: ant-javamail = %{version}
|
|
|
|
%description -n ant-javamail
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains optional javamail tasks for Apache Ant.
|
|
|
|
|
|
|
|
%package -n ant-jdepend
|
|
License: Apache Software License ..
|
|
Summary: Optional jdepend tasks for ant
|
|
Group: Development/Tools/Building
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: jdepend
|
|
BuildRequires: jdepend
|
|
Provides: ant-jdepend = %{version}
|
|
|
|
%description -n ant-jdepend
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains optional jdepend tasks for Apache Ant.
|
|
|
|
|
|
|
|
%package -n ant-jsch
|
|
License: Apache Software License ..
|
|
Summary: Optional jsch tasks for ant
|
|
Group: Development/Tools/Building
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: jsch
|
|
BuildRequires: jsch
|
|
Provides: ant-jsch = %{version}
|
|
|
|
%description -n ant-jsch
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains optional jsch tasks for Apache Ant.
|
|
|
|
|
|
|
|
%package -n ant-junit
|
|
License: Apache Software License ..
|
|
Summary: Optional junit tasks for ant
|
|
Group: Development/Tools/Building
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: junit
|
|
Provides: ant-junit = %{version}
|
|
|
|
%description -n ant-junit
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains optional JUnit tasks for Apache Ant.
|
|
|
|
%package -n ant-testutil
|
|
Summary: Test utility classes for ant
|
|
Group: Development/Tools/Building
|
|
Requires: ant = %(echo `rpm -q --queryformat '%{VERSION}' ant`)
|
|
Requires: junit
|
|
Provides: ant-testutil = %{version}
|
|
|
|
%description -n ant-testutil
|
|
Test utility tasks for %{name}.
|
|
|
|
|
|
|
|
%package -n ant-manual
|
|
License: Apache Software License ..
|
|
Summary: Manual for ant
|
|
Group: Development/Tools/Building
|
|
|
|
%description -n ant-manual
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains the manual for Apache Ant.
|
|
|
|
|
|
|
|
%package -n ant-javadoc
|
|
License: Apache Software License ..
|
|
Summary: Javadoc for ant
|
|
Group: Development/Tools/Building
|
|
|
|
%description -n ant-javadoc
|
|
Apache Ant is a Java-based build tool.
|
|
|
|
This package contains the javadoc documentation for Apache Ant.
|
|
|
|
|
|
|
|
%endif
|
|
|
|
%prep
|
|
%setup -q -n apache-ant-%{cvs_version}
|
|
#Fixup version
|
|
find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT//
|
|
#https://issues.apache.org/bugzilla/show_bug.cgi?id=47669
|
|
sed -i -e "s|IMAGE_FILE_TYPE|BINARY_FILE_TYPE|g" src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
|
|
|
|
# Fix some places where copies of classes are included in the wrong jarfiles
|
|
|
|
# Disable the style and xmlvalidate tasks on ppc64 and s390x (#163689).
|
|
%ifarch ppc64 s390x
|
|
%patch1 -p1 -b .sav1
|
|
%endif
|
|
|
|
# Update ant to work with recent versions of GNU Classpath
|
|
# When bootstrapping, we don't have junit
|
|
%patch3 -p1
|
|
|
|
# Fix class-path-in-manifest rpmlint warning
|
|
%patch4
|
|
|
|
# clean jar files
|
|
%{_bindir}/find -name "*.jar" | %{_bindir}/xargs -t rm
|
|
|
|
#install jars
|
|
%if ! %bootstrap
|
|
build-jar-repository -s -p lib/optional xerces-j2 xml-commons-jaxp-1.3-apis antlr-bootstrap bcel javamail/mailapi jdepend junit log4j oro regexp bsf commons-logging commons-net jsch xalan-j2 xml-commons-resolver
|
|
%endif
|
|
|
|
# Fix file-not-utf8 rpmlint warning
|
|
iconv KEYS -f iso-8859-1 -t utf-8 -o KEYS.utf8
|
|
mv KEYS.utf8 KEYS
|
|
iconv LICENSE -f iso-8859-1 -t utf-8 -o LICENSE.utf8
|
|
mv LICENSE.utf8 LICENSE
|
|
|
|
# Provides: exclude perl(oata), perl(examples)
|
|
cat <<__EOF__ > %{name}-perl.prov
|
|
#!/bin/sh
|
|
/usr/lib/rpm/perl.prov \$* | grep -v '^perl(oata)$' | grep -v '^perl(examples)$'
|
|
__EOF__
|
|
%define __perl_provides %{_builddir}/apache-ant-%{cvs_version}/%{name}-perl.prov
|
|
chmod +x %{__perl_provides}
|
|
|
|
|
|
# Requires: exclude bogus perl(the)
|
|
cat <<__EOF__ > %{name}-perl.req
|
|
#!/bin/sh
|
|
/usr/lib/rpm/perl.req \$* | grep -v '^perl(the)$'
|
|
__EOF__
|
|
%define __perl_requires %{_builddir}/apache-ant-%{cvs_version}/%{name}-perl.req
|
|
chmod +x %{__perl_requires}
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
%build
|
|
export OPT_JAR_LIST=:
|
|
%if ! %bootstrap
|
|
export CLASSPATH=$(build-classpath xerces-j2 xml-commons-jaxp-1.3-apis antlr bcel jaf javamail/mailapi jdepend junit log4j oro regexp bsf commons-logging commons-net jsch xalan-j2 xml-commons-resolver)
|
|
%{ant} -Dbuild.sysclasspath=first distribution
|
|
%{ant} javadocs
|
|
%else
|
|
export GC_MAXIMUM_HEAP_SIZE="134217728" #128M
|
|
export JAVA_HOME=%{java_home}
|
|
export CLASSPATH=$JAVA_HOME/lib/tools.jar
|
|
export BOOTJAVAC_OPTS="-C -Wno-deprecated"
|
|
sh -x ./build.sh --noconfig jars
|
|
%endif
|
|
|
|
%install
|
|
# ANT_HOME and subdirs
|
|
mkdir -p %{buildroot}%{ant_home}/{lib,etc}
|
|
# jars
|
|
install -d -m 755 %{buildroot}%{_javadir}/ant
|
|
install -d -m 755 %{buildroot}%{_datadir}/maven2/poms
|
|
|
|
for jar in build/lib/*.jar
|
|
do
|
|
jarname=$(basename $jar .jar)
|
|
pomname="JPP.%{name}-${jarname}.pom"
|
|
|
|
#Determine where to put it
|
|
case $jarname in
|
|
#These go into %%{_javadir}, pom files have different names
|
|
ant | ant-bootstrap | ant-launcher)
|
|
%if %bootstrap
|
|
destdir=%{buildroot}%{_javadir}; destname="";pomname="JPP-$jarname.pom"
|
|
%else
|
|
continue
|
|
%endif
|
|
;;
|
|
#Bootstracp builds an incomplete ant-junit, don't ship it
|
|
%if %bootstrap
|
|
ant-junit) continue;;
|
|
%endif
|
|
#These go into %%{_javadir}/ant
|
|
*) destdir=%{buildroot}%{_javadir}/ant; destname="/ant";
|
|
esac
|
|
|
|
#instal jar
|
|
install -m 644 ${jar} ${destdir}/${jarname}.jar
|
|
# jar aliases
|
|
ln -sf ../../java${destname}/${jarname}.jar %{buildroot}%{ant_home}/lib/${jarname}.jar
|
|
|
|
#bootstrap does not have a pom
|
|
[ $jarname == ant-bootstrap ] && continue
|
|
|
|
#install pom
|
|
install -m 644 src/etc/poms/${jarname}/pom.xml %{buildroot}%{_datadir}/maven2/poms/${pomname}
|
|
%add_to_maven_depmap org.apache.ant ${jarname} %{version} JPP${destname} ${jarname}
|
|
done
|
|
|
|
%if %bootstrap
|
|
# add backward compatibility for nodeps jar that is now part of
|
|
# main jar
|
|
%add_to_maven_depmap org.apache.ant ant-nodeps %{version} JPP ant
|
|
|
|
#ant-parent pom
|
|
install -m 644 src/etc/poms/pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP-ant-parent.pom
|
|
%add_to_maven_depmap org.apache.ant ant-parent %{version} JPP ant-parent
|
|
|
|
# scripts: remove dos and os/2 scripts
|
|
rm -f src/script/*.bat
|
|
rm -f src/script/*.cmd
|
|
|
|
# XSLs
|
|
cp -p src/etc/*.xsl %{buildroot}%{ant_home}/etc
|
|
rm -f %{buildroot}%{ant_home}/etc/{maudit-frames,jdepend,jdepend-frames,junit-frames,junit-noframes}.xsl
|
|
%else
|
|
cp -p src/etc/{maudit-frames,jdepend,jdepend-frames,junit-frames,junit-noframes}.xsl %{buildroot}%{ant_home}/etc
|
|
%endif
|
|
|
|
%if %bootstrap
|
|
# install everything else
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
cp -p src/script/* %{buildroot}%{_bindir}/
|
|
%endif
|
|
%if %bootstrap
|
|
# default ant.conf
|
|
mkdir -p %{buildroot}%{_sysconfdir}
|
|
cp -p %{SOURCE2} %{buildroot}%{_sysconfdir}/ant.conf
|
|
|
|
# OPT_JAR_LIST fragments
|
|
mkdir -p %{buildroot}%{_sysconfdir}/%{name}.d
|
|
echo "ant/ant-jmf" > %{buildroot}%{_sysconfdir}/%{name}.d/jmf
|
|
echo "ant/ant-swing" > %{buildroot}%{_sysconfdir}/%{name}.d/swing
|
|
%else
|
|
echo "antlr ant/ant-antlr" > %{buildroot}%{_sysconfdir}/ant.d/antlr
|
|
echo "bsf ant/ant-apache-bsf" > %{buildroot}%{_sysconfdir}/ant.d/apache-bsf
|
|
echo "xml-commons-resolver ant/ant-apache-resolver" > %{buildroot}%{_sysconfdir}/ant.d/apache-resolver
|
|
echo "jakarta-commons-logging ant/ant-commons-logging" > %{buildroot}%{_sysconfdir}/ant.d/commons-logging
|
|
echo "jakarta-commons-net ant/ant-commons-net" > %{buildroot}%{_sysconfdir}/ant.d/commons-net
|
|
#echo "jai ant/ant-jai" > %{buildroot}%{_sysconfdir}/ant.d/jai
|
|
echo "bcel ant/ant-apache-bcel" > %{buildroot}%{_sysconfdir}/ant.d/apache-bcel
|
|
echo "log4j ant/ant-apache-log4j" > %{buildroot}%{_sysconfdir}/ant.d/apache-log4j
|
|
echo "oro ant/ant-apache-oro" > %{buildroot}%{_sysconfdir}/ant.d/apache-oro
|
|
echo "regexp ant/ant-apache-regexp" > %{buildroot}%{_sysconfdir}/ant.d/apache-regexp
|
|
echo "xalan-j2 ant/ant-apache-xalan2" > %{buildroot}%{_sysconfdir}/ant.d/apache-xalan2
|
|
echo "javamail jaf ant/ant-javamail" > %{buildroot}%{_sysconfdir}/ant.d/javamail
|
|
echo "jdepend ant/ant-jdepend" > %{buildroot}%{_sysconfdir}/ant.d/jdepend
|
|
echo "jsch ant/ant-jsch" > %{buildroot}%{_sysconfdir}/ant.d/jsch
|
|
echo "junit ant/ant-junit" > %{buildroot}%{_sysconfdir}/ant.d/junit
|
|
echo "testutil ant/ant-testutil" > %{buildroot}%{_sysconfdir}/ant.d/testutil
|
|
%endif
|
|
%if ! %bootstrap
|
|
# javadoc
|
|
mkdir -p %{buildroot}%{_javadocdir}/ant
|
|
cp -pr build/javadocs/* %{buildroot}%{_javadocdir}/ant
|
|
%endif
|
|
# fix link between manual and javadoc
|
|
(cd docs/manual; ln -sf %{_javadocdir}/%{name} api)
|
|
%if %bootstrap
|
|
find %{buildroot}%{_datadir}/ant/etc -type f -name "*.xsl" \
|
|
-a ! -name ant-update.xsl \
|
|
-a ! -name changelog.xsl \
|
|
-a ! -name coverage-frames.xsl \
|
|
-a ! -name junit-frames-xalan1.xsl \
|
|
-a ! -name log.xsl \
|
|
-a ! -name mmetrics-frames.xsl \
|
|
-a ! -name tagdiff.xsl \
|
|
| xargs -t rm
|
|
%endif
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
# -----------------------------------------------------------------------------
|
|
|
|
%post
|
|
%update_maven_depmap
|
|
|
|
%postun
|
|
%update_maven_depmap
|
|
|
|
%if %bootstrap
|
|
%files
|
|
%defattr(0644,root,root,0755)
|
|
%doc KEYS LICENSE NOTICE README WHATSNEW
|
|
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
|
%attr(0755,root,root) %{_bindir}/ant
|
|
%attr(0755,root,root) %{_bindir}/antRun
|
|
%{_javadir}/%{name}.jar
|
|
%{_javadir}/%{name}-launcher.jar
|
|
%{_javadir}/%{name}-bootstrap.jar
|
|
%dir %{_javadir}/%{name}
|
|
%dir %{ant_home}
|
|
%dir %{ant_home}/etc
|
|
%{ant_home}/etc/ant-update.xsl
|
|
%{ant_home}/etc/changelog.xsl
|
|
%{ant_home}/etc/coverage-frames.xsl
|
|
%{ant_home}/etc/mmetrics-frames.xsl
|
|
%{ant_home}/etc/log.xsl
|
|
%{ant_home}/etc/tagdiff.xsl
|
|
%{ant_home}/etc/junit-frames-xalan1.xsl
|
|
# % {ant_home}/etc/common2master.xsl
|
|
# % {ant_home}/etc/printFailingTests.xsl
|
|
%dir %{ant_home}/lib
|
|
%dir %{_sysconfdir}/%{name}.d
|
|
%{ant_home}/lib/ant.jar
|
|
%{ant_home}/lib/ant-bootstrap.jar
|
|
%{ant_home}/lib/ant-launcher.jar
|
|
%dir %{_sysconfdir}/ant.d
|
|
# % {_datadir}/maven2/poms/*
|
|
%{_datadir}/maven2/poms/JPP-ant-launcher.pom
|
|
%{_datadir}/maven2/poms/JPP-ant-parent.pom
|
|
%{_datadir}/maven2/poms/JPP-ant.pom
|
|
%config(noreplace) %{_mavendepmapfragdir}/*
|
|
%config(noreplace) %dir %{_sysconfdir}/maven/fragments
|
|
%dir %{_datadir}/maven2
|
|
%dir %{_datadir}/maven2/poms
|
|
|
|
%else
|
|
# ant-antlr filelist
|
|
%files
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/ant/ant-antlr.jar
|
|
%{ant_home}/lib/ant-antlr.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/antlr
|
|
%{_datadir}/maven2/poms/JPP.ant-ant-antlr.pom
|
|
%config %{_mavendepmapfragdir}/ant-antlr
|
|
%dir %{_datadir}/maven2/
|
|
%dir %{_datadir}/maven2/poms
|
|
%endif
|
|
|
|
### Basic ant subpackages
|
|
%if %bootstrap
|
|
%files -n ant-jmf
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/ant/ant-jmf.jar
|
|
%{ant_home}/lib/ant-jmf.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/jmf
|
|
%{_datadir}/maven2/poms/JPP.ant-ant-jmf.pom
|
|
|
|
%files -n ant-swing
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/ant/ant-swing.jar
|
|
%{ant_home}/lib/ant-swing.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/swing
|
|
%{_datadir}/maven2/poms/JPP.ant-ant-swing.pom
|
|
|
|
%files -n ant-scripts
|
|
%defattr(0755,root,root,0755)
|
|
%{_bindir}/*.pl
|
|
%{_bindir}/*.py*
|
|
%endif #if bootstrap
|
|
|
|
%if ! %bootstrap
|
|
%files -n ant-apache-bsf
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/ant/ant-apache-bsf.jar
|
|
%{ant_home}/lib/ant-apache-bsf.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/apache-bsf
|
|
%{_datadir}/maven2/poms/JPP.ant-ant-apache-bsf.pom
|
|
%dir %{_datadir}/maven2/
|
|
%dir %{_datadir}/maven2/poms
|
|
|
|
%files -n ant-apache-resolver
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/ant/ant-apache-resolver.jar
|
|
%{ant_home}/lib/ant-apache-resolver.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/apache-resolver
|
|
%{_datadir}/maven2/poms/JPP.ant-ant-apache-resolver.pom
|
|
%dir %{_datadir}/maven2/
|
|
%dir %{_datadir}/maven2/poms
|
|
|
|
%files -n ant-commons-logging
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/ant/ant-commons-logging.jar
|
|
%{ant_home}/lib/ant-commons-logging.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/commons-logging
|
|
%{_datadir}/maven2/poms/JPP.ant-ant-commons-logging.pom
|
|
%dir %{_datadir}/maven2/
|
|
%dir %{_datadir}/maven2/poms
|
|
|
|
%files -n ant-commons-net
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/ant/ant-commons-net.jar
|
|
%{ant_home}/lib/ant-commons-net.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/commons-net
|
|
%{_datadir}/maven2/poms/JPP.ant-ant-commons-net.pom
|
|
%dir %{_datadir}/maven2/
|
|
%dir %{_datadir}/maven2/poms
|
|
# Disable as we dont ship the dependencies
|
|
%if 0
|
|
|
|
%files -n ant-jai
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/ant/ant-jai.jar
|
|
%{ant_home}/lib/ant-jai.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/jai
|
|
%endif
|
|
|
|
%files -n ant-apache-bcel
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/ant/ant-apache-bcel.jar
|
|
%{_javadir}/ant/ant-jakarta-bcel.jar
|
|
%{ant_home}/lib/ant-apache-bcel.jar
|
|
%{ant_home}/lib/ant-jakarta-bcel.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/apache-bcel
|
|
%{_datadir}/maven2/poms/JPP.ant-ant-apache-bcel.pom
|
|
%dir %{_datadir}/maven2/
|
|
%dir %{_datadir}/maven2/poms
|
|
|
|
%files -n ant-apache-log4j
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/ant/ant-apache-log4j.jar
|
|
%{_javadir}/ant/ant-jakarta-log4j.jar
|
|
%{ant_home}/lib/ant-apache-log4j.jar
|
|
%{ant_home}/lib/ant-jakarta-log4j.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/apache-log4j
|
|
%{_datadir}/maven2/poms/JPP.ant-ant-apache-log4j.pom
|
|
%dir %{_datadir}/maven2/
|
|
%dir %{_datadir}/maven2/poms
|
|
|
|
%files -n ant-apache-oro
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/ant/ant-apache-oro.jar
|
|
%{_javadir}/ant/ant-jakarta-oro.jar
|
|
%{ant_home}/lib/ant-apache-oro.jar
|
|
%{ant_home}/lib/ant-jakarta-oro.jar
|
|
%dir %{_datadir}/maven2/
|
|
%dir %{_datadir}/maven2/poms
|
|
|
|
%files -n ant-apache-regexp
|
|
%defattr(-,root,root,-)
|
|
%{_javadir}/ant/ant-apache-regexp.jar
|
|
%{ant_home}/lib/ant-apache-regexp.jar
|
|
%config(noreplace) %{_sysconfdir}/ant/apache-regexp
|
|
%{_datadir}/maven2/poms/JPP.ant-ant-apache-regexp.pom
|
|
%dir %{_datadir}/maven2/
|
|
%dir %{_datadir}/maven2/poms
|
|
|
|
%files -n ant-apache-xalan2
|
|
%defattr(-,root,root,-)
|
|
%{_javadir}/ant/ant-apache-xalan2.jar
|
|
%{ant_home}/lib/ant-apache-xalan2.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/apache-xalan2
|
|
|
|
%files -n ant-javamail
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/ant/ant-javamail.jar
|
|
%{ant_home}/lib/ant-javamail.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/javamail
|
|
%{_datadir}/maven2/poms/JPP.ant-ant-javamail.pom
|
|
%dir %{_datadir}/maven2/
|
|
%dir %{_datadir}/maven2/poms
|
|
|
|
%files -n ant-jdepend
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/ant/ant-jdepend.jar
|
|
%{ant_home}/lib/ant-jdepend.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/jdepend
|
|
%{ant_home}/etc/jdepend.xsl
|
|
%{ant_home}/etc/jdepend-frames.xsl
|
|
%{_datadir}/maven2/poms/JPP.ant-ant-jdepend.pom
|
|
%dir %{_datadir}/maven2/
|
|
%dir %{_datadir}/maven2/poms
|
|
|
|
%files -n ant-jsch
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/ant/ant-jsch.jar
|
|
%{ant_home}/lib/ant-jsch.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/jsch
|
|
%{_datadir}/maven2/poms/JPP.ant-ant-jsch.pom
|
|
%dir %{_datadir}/maven2/
|
|
%dir %{_datadir}/maven2/poms
|
|
|
|
%files -n ant-junit
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/ant/ant-junit.jar
|
|
%{ant_home}/lib/ant-junit.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/junit
|
|
%{ant_home}/etc/junit-frames.xsl
|
|
%{ant_home}/etc/junit-noframes.xsl
|
|
%{_datadir}/maven2/poms/JPP.ant-ant-junit.pom
|
|
%dir %{_datadir}/maven2/
|
|
%dir %{_datadir}/maven2/poms
|
|
|
|
%files -n ant-testutil
|
|
%defattr(-,root,root,-)
|
|
%{_javadir}/ant/ant-testutil.jar
|
|
%{ant_home}/lib/ant-testutil.jar
|
|
%config(noreplace) %{_sysconfdir}/ant.d/testutil
|
|
|
|
%files -n ant-manual
|
|
%defattr(0644,root,root,0755)
|
|
%doc docs/*
|
|
|
|
%files -n ant-javadoc
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadocdir}/ant-%{version}
|
|
%endif
|
|
|
|
%changelog
|