- 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

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,10 +59,13 @@ 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
@ -71,8 +74,9 @@ 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}
# RHEL3 and FC2
@ -259,7 +263,7 @@ 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}
@ -282,7 +286,7 @@ 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}
@ -305,7 +309,7 @@ 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}
@ -328,7 +332,7 @@ 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}
@ -493,7 +497,7 @@ 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}
@ -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