- Add endorsed dir and create symlinks for xml-commons-apis and

jaxp_parser_impl there, and add the option when running ant.
- Add missing BR
- Fix some rpmlint issues
This commit is contained in:
Permaine Cheung 2007-02-21 17:43:05 +00:00
parent 21d738a7d4
commit 9c28439ef3
2 changed files with 111 additions and 76 deletions

175
ant.spec
View File

@ -39,7 +39,7 @@
Name: ant
Version: 1.6.5
Release: %{jpprelease}.2
Release: %{jpprelease}.3%{?dist}
Epoch: 0
Summary: Ant build tool for java
Summary(it): Tool per la compilazione di programmi java
@ -59,31 +59,35 @@ Patch2: apache-ant-1.6.5-javah.patch
Patch4: apache-ant-jars.patch
#Patch5: apache-ant-bz163689.patch
Patch6: apache-ant-1.6.5-jvm1.5-detect.patch
Patch7: apache-ant-1.6.5-endorsed.patch
Requires: xerces-j2
Requires: jaxp_parser_impl
Requires: jpackage-utils >= 0:1.5
Requires: java-devel
Requires: xml-commons-apis
BuildRequires: xerces-j2
BuildRequires: jaxp_parser_impl
BuildRequires: jpackage-utils >= 0:1.5
BuildRequires: java-devel
BuildRequires: coreutils
BuildRequires: xml-commons-apis
BuildRequires: coreutils
BuildRequires: xml-commons-apis
%if ! %{gcj_support}
BuildArch: noarch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Obsoletes: ant-optional ant-optional-full
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Obsoletes: ant-optional < %{epoch}:%{version}-%{jpprelease}
Obsoletes: ant-optional-full < %{epoch}:%{version}-%{jpprelease}
# Allow subpackages not in Fedora to be installed from JPackage
Provides: %{name} = %{epoch}:%{version}-%{jpprelease}
Provides: %{name} = %{epoch}:%{version}-%{jpprelease}
# RHEL3 and FC2
Obsoletes: %{name}-libs <= 0:1.5.2, %{name}-core <= 0:1.5.2
Obsoletes: %{name}-libs <= 0:1.5.2, %{name}-core <= 0:1.5.2
# FC4
Obsoletes: %{name}-jmf <= 1.6.2-3jpp_12fc
Obsoletes: %{name}-jmf <= 1.6.2-3jpp_12fc
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description
@ -114,9 +118,9 @@ Provides: %{name}-xalan1 = %{epoch}:%{version}-%{release}
Provides: %{name}-xslp = %{epoch}:%{version}-%{release}
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description manifest-only
@ -132,9 +136,9 @@ Provides: ant-antlr = %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description antlr
@ -153,9 +157,9 @@ Provides: ant-apache-bsf = %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description apache-bsf
@ -174,9 +178,9 @@ Provides: ant-apache-resolver = %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description apache-resolver
@ -195,9 +199,9 @@ Provides: ant-commons-logging = %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description commons-logging
@ -218,9 +222,9 @@ Provides: ant-commons-net = %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description commons-net
@ -239,9 +243,9 @@ Provides: ant-jai = %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description jai
@ -259,13 +263,13 @@ Requires: bcel
BuildRequires: bcel
Provides: ant-apache-bcel = %{epoch}:%{version}-%{release}
Provides: ant-jakarta-bcel = %{epoch}:%{version}-%{release}
Obsoletes: ant-jakarta-bcel
Obsoletes: ant-jakarta-bcel < %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description apache-bcel
@ -282,13 +286,13 @@ Requires: log4j
BuildRequires: log4j
Provides: ant-apache-log4j = %{epoch}:%{version}-%{release}
Provides: ant-jakarta-log4j = %{epoch}:%{version}-%{release}
Obsoletes: ant-jakarta-log4j
Obsoletes: ant-jakarta-log4j < %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description apache-log4j
@ -305,13 +309,13 @@ Requires: oro
BuildRequires: oro
Provides: ant-apache-oro = %{epoch}:%{version}-%{release}
Provides: ant-jakarta-oro = %{epoch}:%{version}-%{release}
Obsoletes: ant-jakarta-oro
Obsoletes: ant-jakarta-oro < %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description apache-oro
@ -328,13 +332,13 @@ Requires: regexp
BuildRequires: regexp
Provides: ant-apache-regexp = %{epoch}:%{version}-%{release}
Provides: ant-jakarta-regexp = %{epoch}:%{version}-%{release}
Obsoletes: ant-jakarta-regexp
Obsoletes: ant-jakarta-regexp < %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description apache-regexp
@ -355,9 +359,9 @@ Provides: ant-javamail = %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description javamail
@ -376,9 +380,9 @@ Provides: ant-jdepend = %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description jdepend
@ -395,9 +399,9 @@ Provides: ant-jmf = %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description jmf
@ -416,9 +420,9 @@ Provides: ant-jsch = %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description jsch
@ -437,9 +441,9 @@ Provides: ant-junit = %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description junit
@ -456,9 +460,9 @@ Provides: ant-nodeps = %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description nodeps
@ -475,9 +479,9 @@ Provides: ant-swing = %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description swing
@ -493,13 +497,13 @@ Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: jaxp_transform_impl
Provides: ant-trax = %{epoch}:%{version}-%{release}
# The ant-xalan jar has been merged into the ant-trax one
Obsoletes: ant-xalan2
Obsoletes: ant-xalan2 < %{epoch}:%{version}-%{release}
Conflicts: ant-optional-clean, ant-optional-full
%if %{gcj_support}
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
BuildRequires: java-gcj-compat-devel
Requires(post): java-gcj-compat
Requires(postun): java-gcj-compat
%endif
%description trax
@ -568,9 +572,14 @@ Javadoc pour %{name}.
%patch6 -b .sav
# Add endorsed option when running ant
%patch7 -p1
# clean jar files
find . -name "*.jar" -exec rm -f {} \;
rm src/script/ant.orig
# -----------------------------------------------------------------------------
%build
@ -638,6 +647,13 @@ cp -p build/lib/%{name}-trax.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/%{name}-trax
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
# endorsed jars
mkdir -p $RPM_BUILD_ROOT%{_javadir}/%{name}/endorsed
pushd $RPM_BUILD_ROOT%{_javadir}/%{name}/endorsed
ln -sf $(build-classpath xml-commons-apis)
ln -sf $(build-classpath xerces-j2) jaxp_parser_impl.jar
popd
# scripts: remove dos and os/2 scripts
rm -f src/script/*.bat
rm -f src/script/*.cmd
@ -1021,6 +1037,7 @@ fi
%{_javadir}/%{name}-%{version}.jar
%{_javadir}/%{name}-launcher-%{version}.jar
%dir %{_javadir}/%{name}
%{_javadir}/%{name}/endorsed
%dir %{ant_home}
%dir %{ant_home}/etc
%{ant_home}/etc/ant-update.xsl
@ -1284,6 +1301,12 @@ fi
# -----------------------------------------------------------------------------
%changelog
* Tue Feb 20 2007 Permaine Cheung <pcheung@redhat.com> 1.6.5-2jpp.3
- Add endorsed dir and create symlinks for xml-commons-apis and
jaxp_parser_impl there, and add the option when running ant.
- Add missing BR
- Fix some rpmlint issues
* Wed Aug 30 2006 Deepak Bhole <dbhole@redhat.com> 1.6.5-2jpp.2
- Re-enabling style and xmlvalidate task on ppc64 and s390x.
@ -1384,7 +1407,7 @@ fi
- Add alpha to the list of build architectures (#157522).
* Thu May 5 2005 Gary Benson <gbenson at redhat.com> 0:1.6.2-3jpp_6fc
- Add dependencies for %post and %postun scriptlets (#156901).
- Add dependencies for post and postun scriptlets (#156901).
* Fri Apr 29 2005 Gary Benson <gbenson at redhat.com> 0:1.6.2-3jpp_5fc
- BC-compile the two core jars.
@ -1437,7 +1460,7 @@ fi
* Tue Mar 23 2004 Randy Watler <rwatler at finali.com> - 0:1.6.1-1jpp
- Update to Ant 1.6.1
- Change ant launch script to source instead of patch
- Move optional components to ant subdirectory: %{_javadir}/%{name}
- Move optional components to ant subdirectory: {_javadir}/{name}
- Remove os/2 scripts and set JAVA_HOME for build
* Wed Feb 11 2004 Randy Watler <rwatler at finali.com> - 0:1.6.0-1jpp
@ -1582,7 +1605,7 @@ fi
matching package
- added jdepend 2.2
- remove require oro, since ant could works without it
- ant lib is now in %{_javadir}/%{name}, put external jars here
- ant lib is now in {_javadir}/{name}, put external jars here
* Tue May 07 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.4.1-12jpp
- hardcoded distribution and vendor tag

View File

@ -0,0 +1,12 @@
--- ./src/script/ant 2007-02-20 22:52:16.000000000 -0500
+++ ./src/script/ant 2007-02-20 22:52:34.000000000 -0500
@@ -292,6 +292,9 @@ else
ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\""
fi
fi
+
+ANT_OPTS="$ANT_OPTS -Djava.endorsed.dirs=/usr/share/java/ant/endorsed"
+
ant_exec_command="exec \"$JAVACMD\" $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\" $ant_exec_args"
if $ant_exec_debug ; then
echo $ant_exec_command