Accepting request 246737 from openSUSE:Factory:Staging:H:DVD
- to bootstrap 13.2 we need another split because bsf depends on things that depend on junit and as antlr requires bsf, we need a 3rd step -> split ant-junit to build in between ant and ant-antlr OBS-URL: https://build.opensuse.org/request/show/246737 OBS-URL: https://build.opensuse.org/package/show/Java:packages/ant?expand=0&rev=60
This commit is contained in:
committed by
Git OBS Bridge
parent
92685e5b52
commit
f6a22379bd
153
ant.spec
153
ant.spec
@@ -18,7 +18,9 @@
|
||||
#
|
||||
|
||||
|
||||
%global bootstrap 1
|
||||
%bcond_without bootstrap
|
||||
%bcond_with junit
|
||||
%bcond_with antlr
|
||||
|
||||
# disable javadoc build on arm platform - it delays a build a lot
|
||||
# mvyskocil: ifarch does not work for noarch packages ...
|
||||
@@ -48,7 +50,7 @@ Patch0: apache-ant-no-test-jar.patch
|
||||
Patch1: apache-ant-class-path-in-manifest.patch
|
||||
#PATCH-FIX-SLE: fix building with old gcj by working around bugs
|
||||
Patch2: apache-ant-old-gcj-build.patch
|
||||
%if %bootstrap
|
||||
%if %{with bootstrap}
|
||||
BuildRequires: java-1_5_0-gcj-compat-devel
|
||||
#!BuildIgnore: java-1_6_0-openjdk java-1_6_0-openjdk-devel
|
||||
#!BuildIgnore: java-1_7_0-openjdk java-1_7_0-openjdk-devel
|
||||
@@ -61,15 +63,16 @@ BuildRequires: unzip
|
||||
#BuildRequires: xerces-j2-bootstrap
|
||||
#!BuildIgnore: xerces-j2-bootstrap
|
||||
BuildRequires: xml-commons-apis-bootstrap
|
||||
%if ! %bootstrap
|
||||
%if %{with junit} || %{with antlr}
|
||||
BuildRequires: ant = %{version}
|
||||
BuildRequires: junit
|
||||
BuildRequires: xalan-j2
|
||||
BuildRequires: xerces-j2
|
||||
BuildRequires: xml-commons-apis
|
||||
#!BuildIgnore: antlr
|
||||
%endif
|
||||
%if %bootstrap
|
||||
%if %{with antlr}
|
||||
BuildRequires: xerces-j2
|
||||
BuildRequires: xml-commons-apis
|
||||
%endif
|
||||
%if %{with bootstrap}
|
||||
Requires: java-devel >= 1.5.0
|
||||
Requires: javapackages-tools
|
||||
Requires: jaxp_parser_impl
|
||||
@@ -81,15 +84,26 @@ Obsoletes: ant-nodeps < %{version}
|
||||
Provides: ant-nodeps = %{version}
|
||||
Obsoletes: ant-trax < %{version}
|
||||
Provides: ant-trax = %{version}
|
||||
%else
|
||||
# ant-antlr requires
|
||||
%endif
|
||||
%if %{with antlr}
|
||||
Requires: antlr
|
||||
%requires_eq ant
|
||||
Provides: ant-antlr = %{version}-%{release}
|
||||
%endif
|
||||
%if %{with junit}
|
||||
Requires: junit4
|
||||
%requires_eq ant
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%if %{with junit}
|
||||
%description
|
||||
Apache Ant is a Java-based build tool.
|
||||
|
||||
This package contains optional JUnit tasks for Apache Ant.
|
||||
%else
|
||||
# FIXME: this should be different for antlr
|
||||
%description
|
||||
Apache Ant is a Java-based build tool. In theory, it is kind of like
|
||||
Make, but without Make's wrinkles.
|
||||
@@ -124,8 +138,9 @@ 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.
|
||||
|
||||
%endif
|
||||
|
||||
%if %bootstrap
|
||||
%if %{with bootstrap}
|
||||
%package -n ant-jmf
|
||||
Summary: Optional jmf tasks for ant
|
||||
License: Apache-2.0
|
||||
@@ -165,7 +180,8 @@ This package contains additional perl and python scripts for Apache
|
||||
Ant.
|
||||
|
||||
%endif #if bootstrap
|
||||
%if ! %bootstrap
|
||||
|
||||
%if %{with antlr}
|
||||
|
||||
%package -n ant-apache-bsf
|
||||
Summary: Optional apache bsf tasks for ant
|
||||
@@ -298,6 +314,7 @@ Summary: Optional apache xalan2 tasks for ant
|
||||
License: Apache-2.0
|
||||
Group: Development/Tools/Building
|
||||
BuildRequires: regexp
|
||||
BuildRequires: xalan-j2
|
||||
Requires: regexp
|
||||
%requires_eq ant
|
||||
|
||||
@@ -343,18 +360,6 @@ Apache Ant is a Java-based build tool.
|
||||
|
||||
This package contains optional jsch tasks for Apache Ant.
|
||||
|
||||
%package -n ant-junit
|
||||
Summary: Optional junit tasks for ant
|
||||
License: Apache-2.0
|
||||
Group: Development/Tools/Building
|
||||
Requires: junit4
|
||||
%requires_eq ant
|
||||
|
||||
%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
|
||||
License: Apache-2.0
|
||||
@@ -394,7 +399,7 @@ This package contains the javadoc documentation for Apache Ant.
|
||||
find -name build.xml -o -name pom.xml | xargs sed -i -e s/-SNAPSHOT//
|
||||
|
||||
# When bootstrapping, we don't have junit
|
||||
%if %bootstrap
|
||||
%if %{with bootstrap}
|
||||
%patch0 -p1
|
||||
%if 0%{?suse_version} < 1200
|
||||
%patch2 -p1
|
||||
@@ -418,7 +423,11 @@ rm src/tests/junit/org/apache/tools/ant/types/selectors/SignedSelectorTest.java
|
||||
#rm src/tests/junit/org/example/junit/JUnit4Skippable.java
|
||||
|
||||
#install jars
|
||||
%if ! %bootstrap
|
||||
%if %{with junit}
|
||||
build-jar-repository -s -p lib/optional junit4
|
||||
%endif
|
||||
%if %{with antlr}
|
||||
# we need to build junit in antlr, but we remove it later
|
||||
build-jar-repository -s -p lib/optional xerces-j2 xml-commons-jaxp-1.3-apis antlr-bootstrap bcel javamail/mailapi jdepend junit4 log4j oro regexp bsf commons-logging commons-net jsch xalan-j2 xml-commons-resolver
|
||||
%endif
|
||||
|
||||
@@ -432,19 +441,20 @@ mv LICENSE.utf8 LICENSE
|
||||
%build
|
||||
export OPT_JAR_LIST=:
|
||||
|
||||
%if ! %bootstrap
|
||||
%if %{with antlr} || %{with junit}
|
||||
ant -Dbuild.sysclasspath=first jars test-jar
|
||||
|
||||
#remove empty jai and netrexx jars. Due to missing dependencies they contain only manifests.
|
||||
rm -rf build/lib/ant-jai.jar build/lib/ant-netrexx.jar
|
||||
|
||||
%if 0%{?build_javadoc}
|
||||
export CLASSPATH=$(build-classpath xerces-j2 xml-commons-jaxp-1.3-apis antlr bcel jaf javamail/mailapi jdepend junit4 log4j oro regexp bsf commons-logging commons-net jsch xalan-j2 xml-commons-resolver)
|
||||
export CLASSPATH=$(build-classpath xerces-j2 xml-commons-jaxp-1.3-apis antlr bcel jaf javamail/mailapi jdepend junit4 log4j oro regexp bsf commons-logging commons-net jsch xalan-j2 xml-commons-resolver)
|
||||
ant javadocs
|
||||
%endif
|
||||
|
||||
%else
|
||||
%endif
|
||||
|
||||
%if %{with bootstrap}
|
||||
export GC_MAXIMUM_HEAP_SIZE="134217728" #128M
|
||||
export JAVA_HOME=%{java_home}
|
||||
export CLASSPATH=$JAVA_HOME/lib/tools.jar
|
||||
@@ -460,6 +470,21 @@ mkdir -p %{buildroot}%{ant_home}/{lib,etc}
|
||||
install -d -m 755 %{buildroot}%{_javadir}/ant
|
||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||
|
||||
%if ! %{with junit}
|
||||
rm build/lib/ant-junit*.jar
|
||||
%else
|
||||
# remove all others
|
||||
for i in build/lib/ant-*.jar ; do
|
||||
case $i in
|
||||
*/ant-junit*)
|
||||
;;
|
||||
*)
|
||||
rm -v $i
|
||||
;;
|
||||
esac
|
||||
done
|
||||
%endif
|
||||
|
||||
for jar in build/lib/*.jar
|
||||
do
|
||||
jarname=$(basename $jar .jar)
|
||||
@@ -469,14 +494,14 @@ do
|
||||
case $jarname in
|
||||
#These go into %%{_javadir}, pom files have different names
|
||||
ant | ant-bootstrap | ant-launcher)
|
||||
%if %bootstrap
|
||||
%if %{with bootstrap}
|
||||
destdir=%{buildroot}%{_javadir}; destname="";pomname="JPP-$jarname.pom"
|
||||
%else
|
||||
continue
|
||||
%endif
|
||||
;;
|
||||
ant-jmf|ant-swing)
|
||||
%if %bootstrap
|
||||
%if %{with bootstrap}
|
||||
destdir=%{buildroot}%{_javadir}/ant; destname="ant/";
|
||||
%else
|
||||
continue
|
||||
@@ -484,7 +509,7 @@ do
|
||||
;;
|
||||
#Bootstracp builds an incomplete ant-foo jars, don't ship them
|
||||
*)
|
||||
%if %bootstrap
|
||||
%if %{with bootstrap}
|
||||
continue
|
||||
%else
|
||||
#These go into %%{_javadir}/ant
|
||||
@@ -507,7 +532,7 @@ do
|
||||
%add_maven_depmap ${pomname} ${destname}${jarname}.jar
|
||||
done
|
||||
|
||||
%if %bootstrap
|
||||
%if %{with bootstrap}
|
||||
#ant-parent pom
|
||||
install -m 644 src/etc/poms/pom.xml %{buildroot}/%{_mavenpomdir}/JPP-ant-parent.pom
|
||||
%add_maven_depmap JPP-ant-parent.pom
|
||||
@@ -519,28 +544,39 @@ 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 %{with junit}
|
||||
cp -p src/etc/{junit-noframes,junit-frames}.xsl %{buildroot}%{ant_home}/etc
|
||||
%endif
|
||||
%if %{with antlr}
|
||||
cp -p src/etc/{maudit-frames,jdepend,jdepend-frames}.xsl %{buildroot}%{ant_home}/etc
|
||||
%endif
|
||||
|
||||
%if %bootstrap
|
||||
%if %{with bootstrap}
|
||||
# install everything else
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
cp -p src/script/* %{buildroot}%{_bindir}/
|
||||
mkdir -p %{buildroot}%{_datadir}/%{name}/bin/
|
||||
ln -sf %{_bindir}/antRun %{buildroot}/%{_datadir}/%{name}/bin/antRun
|
||||
%endif
|
||||
%if %bootstrap
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/ant.d
|
||||
|
||||
%if %{with bootstrap}
|
||||
# default ant.conf
|
||||
mkdir -p %{buildroot}%{_sysconfdir}
|
||||
cp -p %{SOURCE1} %{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
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/ant.d
|
||||
%endif
|
||||
|
||||
%if %{with junit}
|
||||
echo "junit ant/ant-junit" > %{buildroot}%{_sysconfdir}/ant.d/junit
|
||||
%endif
|
||||
|
||||
%if %{with antlr}
|
||||
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
|
||||
@@ -555,10 +591,10 @@ echo "xalan-j2 ant/ant-apache-xalan2" > %{buildroot}%{_sysconfdir}/ant.d/apache-
|
||||
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
|
||||
|
||||
%if %{with antlr}
|
||||
|
||||
%if 0%{?build_javadoc}
|
||||
mkdir -p %{buildroot}%{_javadocdir}/ant
|
||||
@@ -572,7 +608,7 @@ cp -pr build/javadocs/* %{buildroot}%{_javadocdir}/ant
|
||||
(cd manual; ln -sf %{_javadocdir}/%{name} api)
|
||||
%endif #javadoc
|
||||
|
||||
%if %bootstrap
|
||||
%if %{with bootstrap}
|
||||
find %{buildroot}%{_datadir}/ant/etc -type f -name "*.xsl" \
|
||||
-a ! -name ant-update.xsl \
|
||||
-a ! -name changelog.xsl \
|
||||
@@ -584,7 +620,7 @@ find %{buildroot}%{_datadir}/ant/etc -type f -name "*.xsl" \
|
||||
| xargs -t rm
|
||||
%endif
|
||||
|
||||
%if %bootstrap
|
||||
%if %{with bootstrap}
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
@@ -620,9 +656,9 @@ find %{buildroot}%{_datadir}/ant/etc -type f -name "*.xsl" \
|
||||
%config(noreplace) %{_mavendepmapfragdir}/*
|
||||
%dir %{_mavenpomdir}
|
||||
|
||||
%else
|
||||
# ant-antlr filelist
|
||||
%endif
|
||||
|
||||
%if %{with antlr}
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
%{_javadir}/ant/ant-antlr.jar
|
||||
@@ -633,8 +669,21 @@ find %{buildroot}%{_datadir}/ant/etc -type f -name "*.xsl" \
|
||||
%dir %{_mavenpomdir}
|
||||
%endif
|
||||
|
||||
%if %{with junit}
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
%{_javadir}/ant/ant-junit*.jar
|
||||
%{ant_home}/lib/ant-junit*.jar
|
||||
%config(noreplace) %{_sysconfdir}/ant.d/junit
|
||||
%config(noreplace) %{_mavendepmapfragdir}/ant-junit
|
||||
%{ant_home}/etc/junit-frames.xsl
|
||||
%{ant_home}/etc/junit-noframes.xsl
|
||||
%{_mavenpomdir}/JPP.ant-ant-junit*.pom
|
||||
%dir %{_mavenpomdir}
|
||||
%endif
|
||||
|
||||
### Basic ant subpackages
|
||||
%if %bootstrap
|
||||
%if %{with bootstrap}
|
||||
|
||||
%files -n ant-jmf
|
||||
%defattr(0644,root,root,0755)
|
||||
@@ -657,7 +706,7 @@ find %{buildroot}%{_datadir}/ant/etc -type f -name "*.xsl" \
|
||||
%{_bindir}/*.py*
|
||||
%endif #if bootstrap
|
||||
|
||||
%if ! %bootstrap
|
||||
%if %{with antlr}
|
||||
|
||||
%files -n ant-apache-bsf
|
||||
%defattr(0644,root,root,0755)
|
||||
@@ -767,16 +816,6 @@ find %{buildroot}%{_datadir}/ant/etc -type f -name "*.xsl" \
|
||||
%{_mavenpomdir}/JPP.ant-ant-jsch.pom
|
||||
%dir %{_mavenpomdir}
|
||||
|
||||
%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
|
||||
%{_mavenpomdir}/JPP.ant-ant-junit*.pom
|
||||
%dir %{_mavenpomdir}
|
||||
|
||||
%files -n ant-testutil
|
||||
%defattr(-,root,root,-)
|
||||
%{_javadir}/ant/ant-testutil.jar
|
||||
|
Reference in New Issue
Block a user