Blob Blame History Raw
%define rhugversion 20031215
%define rhugsource1 apache-%{name}-%{version} upstream
%define rhugpatches 6

Summary: Build tool for Java applications
Name: ant
Version: 1.5.2
Release: 24.1
URL: http://ant.apache.org/
Source: rhug-jakarta-%{name}-%{rhugversion}.tar.bz2
Source1: apache-%{name}-%{version}-src.tar.bz2
Source2: ant.conf
Source3: README.anthome
Patch1: %{name}-rhjpp.patch
Patch6: %{name}-interpreter.patch
Patch7: %{name}-bz104986.patch
Patch8: %{name}-gcj34.patch
License: Apache Software License
Group: Development/Tools
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildPrereq: gcc34-c++
BuildPrereq: gcc34-java 
BuildPrereq: xerces-j >= 2.2.1-12
BuildPrereq: commons-logging >= 1.0.2-13
BuildPrereq: jakarta-regexp >= 1.2-13
BuildPrereq: xalan-j >= 2.4.1-12
BuildPrereq: bcel >= 5.0-11
BuildPrereq: jaf >= 20030319-2
BuildPrereq: javamail >= 20031006-2
BuildPrereq: junit >= 3.8.1-2
Requires: gcc34-java 
Requires: xerces-j >= 2.2.1-12
Requires: commons-logging >= 1.0.2-13
Requires: jakarta-regexp >= 1.2-13
Requires: xalan-j >= 2.4.1-12
Requires: bcel >= 5.0-11
Requires: jaf >= 20030319-2
Requires: javamail >= 20031006-2
Requires: junit >= 3.8.1-2
Requires: ant-core = %{version}-%{release}

%description
Ant is a platform-independant build tool for Java applications that is
used by Apache Jakarta and XML projects.

%package core
Summary: The core classes required by Ant
Group: System Environment/Libraries
Prereq: redhat-java-rpm-scripts >= 1.0.2-2
Requires: libgcj34 
Requires: xerces-j >= 2.2.1-12
Requires: commons-logging >= 1.0.2-13
Requires: jakarta-regexp >= 1.2-13
Requires: xalan-j >= 2.4.1-12
Requires: bcel >= 5.0-11
Requires: jaf >= 20030319-2
Requires: javamail >= 20031006-2

%description core
The core classes required by Ant.

%package optional
Summary: Optional tasks for Ant
Group: System Environment/Libraries
Prereq: redhat-java-rpm-scripts >= 1.0.2-2
Requires: libgcj34 
Requires: xerces-j >= 2.2.1-12
Requires: xalan-j >= 2.4.1-12
Requires: junit >= 3.8.1-2
Requires: ant-core = %{version}-%{release}

%description optional
Optional tasks for Ant.

%package devel
Summary: CNI headers for developing Ant applications
Group: Development/Libraries
Requires: ant-core = %{version}-%{release}

%description devel
The ant-devel package contains the headers required to develop
Cygnus Native Interface (CNI) extensions that use Ant.

%prep
%setup -q -a 1
mv %{rhugsource1}
%patch1 -p0 -b .rhjpp
%patch6 -p0 -b .interpreter
%patch7 -p0 -b .bz104986
%patch8 -p0 -b .gcj34
mv ChangeLog ChangeLog.rhug
mv TODO TODO.rhug
for f in version.txt defaultManifest.mf; do
    f=upstream/src/main/org/apache/tools/ant/$f
    sed -e "s:@VERSION@:%{version}-%{release}:g"\
        -e "s:@DATE@:`date '+%B %e %Y'`:g" \
	< $f > $f.tmp && mv -f $f.tmp $f
done

%build
CC=gcc34 CXX=g++34 GCJ=gcj34 GCJH=gcjh34 \
./configure \
    --disable-static \
    --prefix=%{_prefix} \
    --libdir=%{_libdir}
make

%install
rm -rf ${RPM_BUILD_ROOT}
%makeinstall
rm -f ${RPM_BUILD_ROOT}%{_libdir}/*.la
find ${RPM_BUILD_ROOT}%{_libdir} -type l | xargs rm -f

# Install stuff for classic-ant
install -m 755 upstream/src/script/ant ${RPM_BUILD_ROOT}%{_bindir}/classic-ant
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}
install -m 644 $RPM_SOURCE_DIR/ant.conf ${RPM_BUILD_ROOT}%{_sysconfdir}
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/ant/lib
install -m 644 $RPM_SOURCE_DIR/README.anthome \
    ${RPM_BUILD_ROOT}%{_datadir}/ant/README
for i in ant ant-optional; do
    ln -s ../../java/$i-%{version}.jar \
        ${RPM_BUILD_ROOT}%{_datadir}/ant/lib/$i.jar
done
for i in activation bcel commons-logging jakarta-regexp \
         java_cup junit mail xalan xerces; do
    ln -s ../../java/`ls -l %{_datadir}/java/$i.jar | sed -e 's:.* -> ::'` \
	${RPM_BUILD_ROOT}%{_datadir}/ant/lib/$i.jar
done

%post core
%{_sbindir}/javaconfig \
    %{_libdir}/lib-org-apache-tools-ant.so \
    %{_libdir}/lib-org-apache-tools-bzip2.so \
    %{_libdir}/lib-org-apache-tools-mail.so \
    %{_libdir}/lib-org-apache-tools-tar.so \
    %{_libdir}/lib-org-apache-tools-zip.so \
    %{_datadir}/java/ant.jar

%postun core
%{_sbindir}/javaconfig \
    %{_libdir}/lib-org-apache-tools-ant.so \
    %{_libdir}/lib-org-apache-tools-bzip2.so \
    %{_libdir}/lib-org-apache-tools-mail.so \
    %{_libdir}/lib-org-apache-tools-tar.so \
    %{_libdir}/lib-org-apache-tools-zip.so \
    %{_datadir}/java/ant.jar

%post optional
%{_sbindir}/javaconfig \
    %{_libdir}/lib-org-apache-tools-ant-taskdefs-optional.so \
    %{_libdir}/lib-org-apache-tools-ant-types-optional.so \
    %{_libdir}/lib-org-apache-tools-ant-util-optional.so \
    %{_datadir}/java/ant-optional.jar

%postun optional
%{_sbindir}/javaconfig \
    %{_libdir}/lib-org-apache-tools-ant-taskdefs-optional.so \
    %{_libdir}/lib-org-apache-tools-ant-types-optional.so \
    %{_libdir}/lib-org-apache-tools-ant-util-optional.so \
    %{_datadir}/java/ant-optional.jar

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc *.rhug upstream/{LICENSE,README,WHATSNEW,welcome.html,docs}
%config(noreplace) %{_sysconfdir}/ant.conf
%{_bindir}/*
%{_datadir}/ant

%files core
%defattr(-,root,root)
%{_libdir}/lib-org-apache-tools-ant-%{version}.so
%{_libdir}/lib-org-apache-tools-bzip2-%{version}.so
%{_libdir}/lib-org-apache-tools-mail-%{version}.so
%{_libdir}/lib-org-apache-tools-tar-%{version}.so
%{_libdir}/lib-org-apache-tools-zip-%{version}.so
%{_datadir}/java/ant-%{version}.jar

%files optional
%defattr(-,root,root)
%{_libdir}/lib-org-apache-tools-ant-taskdefs-optional-%{version}.so
%{_libdir}/lib-org-apache-tools-ant-types-optional-%{version}.so
%{_libdir}/lib-org-apache-tools-ant-util-optional-%{version}.so
%{_datadir}/java/ant-optional-%{version}.jar

%files devel
%defattr(-,root,root)
%{_includedir}/org/apache/tools/*

%changelog
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Wed Feb 18 2004 Gary Benson <gbenson@redhat.com> 1.5.2-24
- Rebuild for Fedora.

* Tue Feb 17 2004 Gary Benson <gbenson@redhat.com>
- Move the 'interpreter is gij' logic deeper (#113699).

* Mon Feb  2 2004 Gary Benson <gbenson@redhat.com>
- Pick up xerces-j's XML libraries from their new location.

* Mon Dec 22 2003 Gary Benson <gbenson@redhat.com>
- Split ant-libs into -core and -optional subpackages.

* Mon Dec 15 2003 Gary Benson <gbenson@redhat.com>
- Apply hammer multilib fix to all multilib archs.
- Correctly link local libraries on hammer.

* Fri Dec 12 2003 Gary Benson <gbenson@redhat.com>
- Upgraded to fluorinated RHUG tarball.
- Moved all optional stuff from lib-org-apache-tools-ant.so.
- Moved TraXLiaison from ant-optional.jar to ant.jar.

* Wed Nov 12 2003 Gary Benson <gbenson@redhat.com> 1.5.2-23
- Rebuild to fix linking on hammer.

* Tue Nov 11 2003 Gary Benson <gbenson@redhat.com> 1.5.2-22
- Install links to JAF, JavaMail and JUnit jarfiles for classic-ant.
- Build all optional tasks that we are able to.

* Thu Nov  6 2003 Gary Benson <gbenson@redhat.com> 1.5.2-21
- Enable JavaMail in mail sending tasks.
- Enable the JUnit tasks.

* Thu Sep 25 2003 Gary Benson <gbenson@redhat.com> 1.5.2-20
- Fix bad bytecode in jarfile (#104986).
- Change group to Development/Tools.
- Split libraries into a separate subpackage.
- Install stuff to allow ant to be run under a normal JVM (#104635).

* Fri Sep 19 2003 Gary Benson <gbenson@redhat.com> 1.5.2-19
- Remove workarounds for broken dependencies in xerces-j and xalan-j.
- Use gij as the name of the interpreter to spawn when running under
  libgcj.

* Fri Sep  5 2003 Gary Benson <gbenson@redhat.com> 1.5.2-18
- Ensure we have a working javaconfig.

* Thu Sep  4 2003 Gary Benson <gbenson@redhat.com>
- Remove workarounds used to support alpha releases.

* Tue Aug 26 2003 Gary Benson <gbenson@redhat.com> 1.5.2-17
- Reinstate 64-bit workaround and rebuild with new compiler.

* Thu Aug  7 2003 Gary Benson <gbenson@redhat.com> 1.5.2-16
- Remove 64-bit workaround and rebuild with new compiler.

* Mon Jul 28 2003 Gary Benson <gbenson@redhat.com> 1.5.2-15
- Add missing resources to jarfile (#100977).

* Fri Jul 25 2003 Gary Benson <gbenson@redhat.com>
- Clarify the -devel subpackage's summary and description.
- Remove unnecessary -devel dependencies (#99077).

* Tue Jul  1 2003 Gary Benson <gbenson@redhat.com>
- Remove redundant --libdir configure option.

* Mon Jun 30 2003 Gary Benson <gbenson@redhat.com> 1.5.2-14
- Rebuild with new compiler and enable ia64 build.
- Enable hammer compiler hack on ia64 also.

* Fri Jun 13 2003 Gary Benson <gbenson@redhat.com>
- Add the rpm's release to the version embedded in the libraries.

* Fri Jun  6 2003 Gary Benson <gbenson@redhat.com> 1.5.2-13
- Rebuild with new compiler.

* Thu Jun  5 2003 Gary Benson <gbenson@redhat.com>
- Add build time dependency on C++ compiler.

* Thu May 29 2003 Gary Benson <gbenson@redhat.com> 1.5.2-12
- Rebuild with new compiler.

* Fri May 23 2003 Gary Benson <gbenson@redhat.com> 1.5.2-11
- Move unversioned library symlink into main package.

* Sat May  3 2003 Gary Benson <gbenson@redhat.com> 1.5.2-10
- Rebuild again to pick up rebuilt BCEL and Xalan.

* Fri May  2 2003 Tom Tromey <tromey@redhat.com> 1.5.2-9
- Rebuild with new compiler.

* Wed Apr 30 2003 Gary Benson <gbenson@redhat.com> 1.5.2-8
- Enable the Xalan and BCEL tasks.

* Mon Apr 14 2003 Gary Benson <gbenson@redhat.com>
- Require gcj-ssa since we use it to compile java code.

* Fri Apr 11 2003 Gary Benson <gbenson@redhat.com> 1.5.2-7
- Fix linking on hammer.

* Fri Apr 11 2003 Gary Benson <gbenson@redhat.com> 1.5.2-6
- Reenable tasks that were disabled on hammer by working
  around the compiler failure more effectively.

* Wed Apr  9 2003 Gary Benson <gbenson@redhat.com> 1.5.2-5
- Compile resources with libtool to enable hammer builds.

* Mon Apr  7 2003 Tom Tromey <tromey@redhat.com> 1.5.2-4
- Rebuild with new compiler.

* Fri Apr  4 2003 Gary Benson <gbenson@redhat.com>
- Use gcj-ssa instead of gcj for the compiler.

* Wed Apr  2 2003 Gary Benson <gbenson@redhat.com>
- Rebuild against the new xerces.

* Fri Mar 28 2003 Gary Benson <gbenson@redhat.com> 1.5.2-2
- Substitute @VERSION@ and @DATE@ into the files that need it.

* Mon Mar 24 2003 Gary Benson <gbenson@redhat.com> 1.5.2-1
- Initial Red Hat Linux build.

* Fri Mar 21 2003 Gary Benson <gbenson@redhat.com>
- Upgraded to latest version.

* Wed Nov 27 2002 Gary Benson <gbenson@redhat.com>
- Initial RHUG build.