Bootstrap Maven as non-modular packages

Resolves: rhbz#1951482
This commit is contained in:
Mikolaj Izdebski 2021-06-08 20:17:56 +02:00
parent a1be913c47
commit d5217cecac
2 changed files with 151 additions and 111 deletions

46
ant-build.xml.patch Normal file
View File

@ -0,0 +1,46 @@
--- build.xml~ 2021-05-17 12:32:48.406394876 +0200
+++ build.xml 2021-05-17 12:32:39.990389601 +0200
@@ -145,8 +145,6 @@
-->
<pathelement location="${src.junit}"/>
<pathelement location="${tests.etc.dir}"/>
- <!-- Otherwise many tests fail with "com.sun.tools.javac.Main is not on the classpath.": -->
- <pathelement location="${java.home}/../lib/tools.jar"/>
</path>
<!--
@@ -819,7 +817,6 @@
</metainf>
<manifest>
<attribute name="Main-Class" value="org.apache.tools.ant.Main"/>
- <attribute name="Class-Path" value="ant.jar xalan.jar"/>
</manifest>
</jar>
@@ -1562,7 +1559,25 @@
verbose="${javadoc.verbose}"
additionalparam="${javadoc.doclint.none}">
- <packageset dir="${java.dir}"/>
+ <fileset dir="${java.dir}">
+ <include name="**/*.java"/>
+ <exclude name="org/apache/tools/ant/taskdefs/email/MimeMailer.java"/>
+ <exclude name="org/apache/tools/ant/taskdefs/optional/NetRexxC.java"/>
+ <exclude name="org/apache/tools/ant/taskdefs/optional/image/Image.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/Arc.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/BasicShape.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/Draw.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/DrawOperation.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/Ellipse.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/ImageOperation.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/Rectangle.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/Rotate.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/Scale.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/Text.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/TransformOperation.java"/>
+ <exclude name="org/apache/tools/ant/types/optional/image/ColorMapper.java"/>
+ <exclude name="org/apache/tools/ant/taskdefs/optional/image/ImageIOTask.java"/>
+ </fileset>
<!-- hide some meta information for javadoc -->
<tag name="todo" description="To do:" scope="all"/>

216
ant.spec
View File

@ -1,3 +1,7 @@
# Workaround for rhbz#1969370: __bootstrap macro is not defined in
# CentOS Stream, See https://bugzilla.redhat.com/1969370
%global __bootstrap ~bootstrap
# Copyright (c) 2000-2008, JPackage Project # Copyright (c) 2000-2008, JPackage Project
# All rights reserved. # All rights reserved.
# #
@ -28,16 +32,13 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# #
%bcond_without tests %bcond_without bootstrap
%bcond_with javadoc
%bcond_without junit5
%global ant_home %{_datadir}/ant %global ant_home %{_datadir}/ant
Name: ant Name: ant
Epoch: 0
Version: 1.10.9 Version: 1.10.9
Release: 3%{?dist} Release: 4%{?dist}
Summary: Java build tool Summary: Java build tool
Summary(it): Tool per la compilazione di programmi java Summary(it): Tool per la compilazione di programmi java
Summary(fr): Outil de compilation pour java Summary(fr): Outil de compilation pour java
@ -48,14 +49,19 @@ Source2: apache-ant-1.8.ant.conf
# manpage # manpage
Source3: ant.asciidoc Source3: ant.asciidoc
BuildRequires: javapackages-local Patch0: %{name}-build.xml.patch
BuildRequires: java-devel >= 1:1.8.0
BuildRequires: ant >= 1.10.2
BuildRequires: ant-junit
BuildRequires: asciidoc BuildRequires: asciidoc
BuildRequires: xmlto BuildRequires: xmlto
BuildRequires: javapackages-local
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
BuildRequires: java-devel >= 1:1.8.0
BuildRequires: ant >= 1.10.2
BuildRequires: ant-junit
BuildRequires: mvn(antlr:antlr) BuildRequires: mvn(antlr:antlr)
BuildRequires: mvn(bcel:bcel) BuildRequires: mvn(bcel:bcel)
BuildRequires: mvn(bsf:bsf) BuildRequires: mvn(bsf:bsf)
@ -65,7 +71,7 @@ BuildRequires: mvn(commons-net:commons-net)
BuildRequires: mvn(javax.mail:mail) BuildRequires: mvn(javax.mail:mail)
BuildRequires: mvn(jdepend:jdepend) BuildRequires: mvn(jdepend:jdepend)
BuildRequires: mvn(junit:junit) BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.apache.logging.log4j:log4j-1.2-api) BuildRequires: mvn(log4j:log4j:1.2.13)
BuildRequires: mvn(org.tukaani:xz) BuildRequires: mvn(org.tukaani:xz)
BuildRequires: mvn(oro:oro) BuildRequires: mvn(oro:oro)
BuildRequires: mvn(regexp:regexp) BuildRequires: mvn(regexp:regexp)
@ -74,15 +80,14 @@ BuildRequires: mvn(xml-resolver:xml-resolver)
BuildRequires: mvn(org.hamcrest:hamcrest-core) BuildRequires: mvn(org.hamcrest:hamcrest-core)
BuildRequires: mvn(org.hamcrest:hamcrest-library) BuildRequires: mvn(org.hamcrest:hamcrest-library)
%if %{with junit5}
BuildRequires: junit5 BuildRequires: junit5
%endif %endif
# Theoretically Ant might be usable with just JRE, but typical Ant # Theoretically Ant might be usable with just JRE, but typical Ant
# workflow requires full JDK, so we recommend it here. # workflow requires full JDK, so we recommend it here.
%{?fedora:Recommends}%{!?fedora:Requires}: java-devel >= 1:1.8.0 Recommends: java-devel >= 1:1.8.0
Requires: %{name}-lib = %{epoch}:%{version}-%{release} Requires: %{name}-lib = %{version}-%{release}
# Require full javapackages-tools since the ant script uses # Require full javapackages-tools since the ant script uses
# /usr/share/java-utils/java-functions # /usr/share/java-utils/java-functions
Requires: javapackages-tools Requires: javapackages-tools
@ -116,9 +121,21 @@ Summary: Core part of %{name}
%description lib %description lib
Core part of Apache Ant that can be used as a library. Core part of Apache Ant that can be used as a library.
%package junit
Summary: Optional junit tasks for %{name}
Requires: %{name} = %{version}-%{release}
%description junit
Optional junit tasks for %{name}.
%description junit -l fr
Taches junit optionelles pour %{name}.
%if %{without bootstrap}
%package jmf %package jmf
Summary: Optional jmf tasks for %{name} Summary: Optional jmf tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description jmf %description jmf
Optional jmf tasks for %{name}. Optional jmf tasks for %{name}.
@ -128,7 +145,7 @@ Taches jmf optionelles pour %{name}.
%package swing %package swing
Summary: Optional swing tasks for %{name} Summary: Optional swing tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description swing %description swing
Optional swing tasks for %{name}. Optional swing tasks for %{name}.
@ -138,7 +155,7 @@ Taches swing optionelles pour %{name}.
%package antlr %package antlr
Summary: Optional antlr tasks for %{name} Summary: Optional antlr tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description antlr %description antlr
Optional antlr tasks for %{name}. Optional antlr tasks for %{name}.
@ -148,7 +165,7 @@ Taches antlr optionelles pour %{name}.
%package apache-bsf %package apache-bsf
Summary: Optional apache bsf tasks for %{name} Summary: Optional apache bsf tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description apache-bsf %description apache-bsf
Optional apache bsf tasks for %{name}. Optional apache bsf tasks for %{name}.
@ -158,7 +175,7 @@ Taches apache bsf optionelles pour %{name}.
%package apache-resolver %package apache-resolver
Summary: Optional apache resolver tasks for %{name} Summary: Optional apache resolver tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description apache-resolver %description apache-resolver
Optional apache resolver tasks for %{name}. Optional apache resolver tasks for %{name}.
@ -168,7 +185,7 @@ Taches apache resolver optionelles pour %{name}.
%package commons-logging %package commons-logging
Summary: Optional commons logging tasks for %{name} Summary: Optional commons logging tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description commons-logging %description commons-logging
Optional commons logging tasks for %{name}. Optional commons logging tasks for %{name}.
@ -178,7 +195,7 @@ Taches commons logging optionelles pour %{name}.
%package commons-net %package commons-net
Summary: Optional commons net tasks for %{name} Summary: Optional commons net tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description commons-net %description commons-net
Optional commons net tasks for %{name}. Optional commons net tasks for %{name}.
@ -186,22 +203,9 @@ Optional commons net tasks for %{name}.
%description commons-net -l fr %description commons-net -l fr
Taches commons net optionelles pour %{name}. Taches commons net optionelles pour %{name}.
# Disable because we don't ship the dependencies
%if 0
%package jai
Summary: Optional jai tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
%description jai
Optional jai tasks for %{name}.
%description jai -l fr
Taches jai optionelles pour %{name}.
%endif
%package apache-bcel %package apache-bcel
Summary: Optional apache bcel tasks for %{name} Summary: Optional apache bcel tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description apache-bcel %description apache-bcel
Optional apache bcel tasks for %{name}. Optional apache bcel tasks for %{name}.
@ -211,7 +215,7 @@ Taches apache bcel optionelles pour %{name}.
%package apache-log4j %package apache-log4j
Summary: Optional apache log4j tasks for %{name} Summary: Optional apache log4j tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description apache-log4j %description apache-log4j
Optional apache log4j tasks for %{name}. Optional apache log4j tasks for %{name}.
@ -221,7 +225,7 @@ Taches apache log4j optionelles pour %{name}.
%package apache-oro %package apache-oro
Summary: Optional apache oro tasks for %{name} Summary: Optional apache oro tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description apache-oro %description apache-oro
Optional apache oro tasks for %{name}. Optional apache oro tasks for %{name}.
@ -231,7 +235,7 @@ Taches apache oro optionelles pour %{name}.
%package apache-regexp %package apache-regexp
Summary: Optional apache regexp tasks for %{name} Summary: Optional apache regexp tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description apache-regexp %description apache-regexp
Optional apache regexp tasks for %{name}. Optional apache regexp tasks for %{name}.
@ -241,7 +245,7 @@ Taches apache regexp optionelles pour %{name}.
%package apache-xalan2 %package apache-xalan2
Summary: Optional apache xalan2 tasks for %{name} Summary: Optional apache xalan2 tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description apache-xalan2 %description apache-xalan2
Optional apache xalan2 tasks for %{name}. Optional apache xalan2 tasks for %{name}.
@ -251,14 +255,14 @@ Taches apache xalan2 optionelles pour %{name}.
%package imageio %package imageio
Summary: Optional imageio tasks for %{name} Summary: Optional imageio tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description imageio %description imageio
Optional imageio tasks for %{name}. Optional imageio tasks for %{name}.
%package javamail %package javamail
Summary: Optional javamail tasks for %{name} Summary: Optional javamail tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description javamail %description javamail
Optional javamail tasks for %{name}. Optional javamail tasks for %{name}.
@ -268,7 +272,7 @@ Taches javamail optionelles pour %{name}.
%package jdepend %package jdepend
Summary: Optional jdepend tasks for %{name} Summary: Optional jdepend tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description jdepend %description jdepend
Optional jdepend tasks for %{name}. Optional jdepend tasks for %{name}.
@ -278,7 +282,7 @@ Taches jdepend optionelles pour %{name}.
%package jsch %package jsch
Summary: Optional jsch tasks for %{name} Summary: Optional jsch tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description jsch %description jsch
Optional jsch tasks for %{name}. Optional jsch tasks for %{name}.
@ -286,38 +290,26 @@ Optional jsch tasks for %{name}.
%description jsch -l fr %description jsch -l fr
Taches jsch optionelles pour %{name}. Taches jsch optionelles pour %{name}.
%package junit
Summary: Optional junit tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
%description junit
Optional junit tasks for %{name}.
%description junit -l fr
Taches junit optionelles pour %{name}.
%if %{with junit5}
%package junit5 %package junit5
Summary: Optional junit5 tasks for %{name} Summary: Optional junit5 tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description junit5 %description junit5
Optional junit5 tasks for %{name}. Optional junit5 tasks for %{name}.
%description junit5 -l fr %description junit5 -l fr
Taches junit5 optionelles pour %{name}. Taches junit5 optionelles pour %{name}.
%endif
%package testutil %package testutil
Summary: Test utility classes for %{name} Summary: Test utility classes for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description testutil %description testutil
Test utility tasks for %{name}. Test utility tasks for %{name}.
%package xz %package xz
Summary: Optional xz tasks for %{name} Summary: Optional xz tasks for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description xz %description xz
Optional xz tasks for %{name}. Optional xz tasks for %{name}.
@ -343,13 +335,13 @@ Javadoc for %{name}.
%description javadoc -l fr %description javadoc -l fr
Javadoc pour %{name}. Javadoc pour %{name}.
%endif
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
%prep %prep
%setup -q -n apache-ant-%{version} %setup -q -n apache-ant-%{version}
%patch0 -p0
# Fix class-path-in-manifest rpmlint warning
%pom_xpath_remove 'attribute[@name="Class-Path"]' build.xml
# clean jar files # clean jar files
find . -name "*.jar" | xargs -t rm find . -name "*.jar" | xargs -t rm
@ -362,9 +354,10 @@ rm src/tests/junit/org/apache/tools/ant/types/selectors/SignedSelectorTest.java
src/tests/junit/org/apache/tools/mail/MailMessageTest.java src/tests/junit/org/apache/tools/mail/MailMessageTest.java
#install jars #install jars
build-jar-repository -s -p lib/optional antlr bcel javamail/mailapi jdepend junit log4j/log4j-1.2-api oro regexp bsf commons-logging commons-net jsch xalan-j2 xml-commons-resolver xalan-j2-serializer hamcrest/core hamcrest/library xz-java %if %{with bootstrap}
%if %{with junit5} build-jar-repository -s -p lib/optional javapackages-bootstrap/junit javapackages-bootstrap/hamcrest-core
build-jar-repository -s -p lib/optional junit5 opentest4j %else
build-jar-repository -s -p lib/optional antlr bcel javamail/mailapi jdepend junit log4j-1 oro regexp bsf commons-logging commons-net jsch xalan-j2 xml-commons-resolver xalan-j2-serializer hamcrest/core hamcrest/library xz-java junit5 opentest4j
%endif %endif
# fix hardcoded paths in ant script and conf # fix hardcoded paths in ant script and conf
@ -388,21 +381,14 @@ mv LICENSE.utf8 LICENSE
# We want a hard dep on antlr # We want a hard dep on antlr
%pom_xpath_remove pom:optional src/etc/poms/ant-antlr/pom.xml %pom_xpath_remove pom:optional src/etc/poms/ant-antlr/pom.xml
%if %{without junit5}
%pom_xpath_inject 'target[@name="javadocs"]/javadoc/packageset' '<exclude name="**/junitlauncher"/>' build.xml
%endif
# fix javamail dependency coordinates (remove once javamail is updated) # fix javamail dependency coordinates (remove once javamail is updated)
%pom_change_dep -r com.sun.mail:jakarta.mail javax.mail:mail src/etc/poms/ant-javamail/pom.xml %pom_change_dep -r com.sun.mail:jakarta.mail javax.mail:mail src/etc/poms/ant-javamail/pom.xml
# switch from log4j 1.2 compat package to log4j 1.2 API shim
%pom_change_dep log4j:log4j org.apache.logging.log4j:log4j-1.2-api:2.13.3 src/etc/poms/ant-apache-log4j/pom.xml
%build %build
%{ant} jars test-jar %if %{with bootstrap}
%{ant} jars
%if %with javadoc %else
%{ant} javadocs %{ant} jars test-jar javadocs
%endif %endif
# typeset the manpage # typeset the manpage
@ -412,9 +398,6 @@ xmlto man man/%{name}.xml -o man
#remove empty jai and netrexx jars. Due to missing dependencies they contain only manifests. #remove empty jai and netrexx jars. Due to missing dependencies they contain only manifests.
rm -fr build/lib/ant-jai.jar build/lib/ant-netrexx.jar rm -fr build/lib/ant-jai.jar build/lib/ant-netrexx.jar
%if %{without junit5}
rm -f build/lib/ant-junitlauncher.jar
%endif
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
%install %install
@ -426,6 +409,16 @@ mkdir -p $RPM_BUILD_ROOT%{ant_home}/{lib,etc,bin}
%mvn_file ':{ant,ant-bootstrap,ant-launcher}' %{name}/@1 @1 %mvn_file ':{ant,ant-bootstrap,ant-launcher}' %{name}/@1 @1
%if %{with bootstrap}
mv build/lib build/lib0
mkdir build/lib/
mv build/lib0/ant.jar build/lib/
mv build/lib0/ant-bootstrap.jar build/lib/
mv build/lib0/ant-launcher.jar build/lib/
mv build/lib0/ant-junit.jar build/lib/
mv build/lib0/ant-junit4.jar build/lib/
%endif
for jar in build/lib/*.jar for jar in build/lib/*.jar
do do
# Make sure that installed JARs are not empty # Make sure that installed JARs are not empty
@ -462,6 +455,11 @@ rm -f src/script/*.bat
rm -f src/script/*.cmd rm -f src/script/*.cmd
# XSLs # XSLs
%if %{with bootstrap}
rm src/etc/jdepend-frames.xsl
rm src/etc/jdepend.xsl
rm src/etc/maudit-frames.xsl
%endif
cp -p src/etc/*.xsl $RPM_BUILD_ROOT%{ant_home}/etc cp -p src/etc/*.xsl $RPM_BUILD_ROOT%{ant_home}/etc
# install everything else # install everything else
@ -476,6 +474,11 @@ cp -p %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
# OPT_JAR_LIST fragments # OPT_JAR_LIST fragments
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d
echo "junit hamcrest/core ant/ant-junit" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/junit
echo "junit hamcrest/core ant/ant-junit4" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/junit4
%if %{without bootstrap}
echo "ant/ant-jmf" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/jmf echo "ant/ant-jmf" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/jmf
echo "ant/ant-swing" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/swing echo "ant/ant-swing" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/swing
echo "antlr ant/ant-antlr" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/antlr echo "antlr ant/ant-antlr" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/antlr
@ -483,9 +486,8 @@ echo "rhino bsf ant/ant-apache-bsf" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/ap
echo "xml-commons-resolver ant/ant-apache-resolver" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/apache-resolver echo "xml-commons-resolver ant/ant-apache-resolver" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/apache-resolver
echo "apache-commons-logging ant/ant-commons-logging" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/commons-logging echo "apache-commons-logging ant/ant-commons-logging" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/commons-logging
echo "apache-commons-net ant/ant-commons-net" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/commons-net echo "apache-commons-net ant/ant-commons-net" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/commons-net
#echo "jai ant/ant-jai" > $RPM_BUILD_ROOT%%{_sysconfdir}/%%{name}.d/jai
echo "bcel ant/ant-apache-bcel" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/apache-bcel echo "bcel ant/ant-apache-bcel" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/apache-bcel
echo "log4j/log4j-1.2-api log4j/log4j-api log4j/log4j-core ant/ant-apache-log4j" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/apache-log4j echo "log4j12 ant/ant-apache-log4j" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/apache-log4j
echo "oro ant/ant-apache-oro" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/apache-oro echo "oro ant/ant-apache-oro" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/apache-oro
echo "regexp ant/ant-apache-regexp" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/apache-regexp echo "regexp ant/ant-apache-regexp" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/apache-regexp
echo "xalan-j2 xalan-j2-serializer ant/ant-apache-xalan2" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/apache-xalan2 echo "xalan-j2 xalan-j2-serializer ant/ant-apache-xalan2" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/apache-xalan2
@ -493,29 +495,24 @@ echo "ant/ant-imageio" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/imageio
echo "javamail jaf ant/ant-javamail" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/javamail echo "javamail jaf ant/ant-javamail" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/javamail
echo "jdepend ant/ant-jdepend" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/jdepend echo "jdepend ant/ant-jdepend" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/jdepend
echo "jsch ant/ant-jsch" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/jsch echo "jsch ant/ant-jsch" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/jsch
echo "junit hamcrest/core ant/ant-junit" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/junit echo "junit5 hamcrest/core junit opentest4j ant/ant-junitlauncher" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/junitlauncher
echo "junit hamcrest/core ant/ant-junit4" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/junit4
echo "testutil ant/ant-testutil" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/testutil echo "testutil ant/ant-testutil" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/testutil
echo "xz-java ant/ant-xz" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/xz echo "xz-java ant/ant-xz" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/xz
%if %{with junit5}
echo "junit5 hamcrest/core junit opentest4j ant/ant-junitlauncher" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/junitlauncher
%endif
%if %with javadoc
# javadoc # javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
cp -pr build/javadocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} cp -pr build/javadocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%endif
# fix link between manual and javadoc # fix link between manual and javadoc
(cd manual; ln -sf %{_javadocdir}/%{name} api) (cd manual; ln -sf %{_javadocdir}/%{name} api)
%endif
# manpage # manpage
install -d -m 755 %{buildroot}%{_mandir}/man1/ install -d -m 755 %{buildroot}%{_mandir}/man1/
install -p -m 644 man/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 install -p -m 644 man/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
%if %with tests %if %{without bootstrap}
%check %check
LC_ALL=C.UTF-8 %{ant} test LC_ALL=C.UTF-8 %{ant} test
%endif %endif
@ -547,6 +544,19 @@ LC_ALL=C.UTF-8 %{ant} test
%{ant_home}/lib/%{name}-launcher.jar %{ant_home}/lib/%{name}-launcher.jar
%{ant_home}/lib/%{name}-bootstrap.jar %{ant_home}/lib/%{name}-bootstrap.jar
%files junit -f .mfiles-junit
%{ant_home}/lib/%{name}-junit.jar
%{ant_home}/lib/%{name}-junit4.jar
%config(noreplace) %{_sysconfdir}/%{name}.d/junit
%config(noreplace) %{_sysconfdir}/%{name}.d/junit4
%{ant_home}/etc/junit-frames.xsl
%{ant_home}/etc/junit-noframes.xsl
%{ant_home}/etc/junit-frames-xalan1.xsl
%{ant_home}/etc/junit-frames-saxon.xsl
%{ant_home}/etc/junit-noframes-saxon.xsl
%if %{without bootstrap}
%files jmf -f .mfiles-jmf %files jmf -f .mfiles-jmf
%{ant_home}/lib/%{name}-jmf.jar %{ant_home}/lib/%{name}-jmf.jar
%config(noreplace) %{_sysconfdir}/%{name}.d/jmf %config(noreplace) %{_sysconfdir}/%{name}.d/jmf
@ -575,13 +585,6 @@ LC_ALL=C.UTF-8 %{ant} test
%{ant_home}/lib/%{name}-commons-net.jar %{ant_home}/lib/%{name}-commons-net.jar
%config(noreplace) %{_sysconfdir}/%{name}.d/commons-net %config(noreplace) %{_sysconfdir}/%{name}.d/commons-net
# Disable as we dont ship the dependencies
%if 0
%files jai -f .mfiles-jai
%{ant_home}/lib/%{name}-jai.jar
%config(noreplace) %{_sysconfdir}/%{name}.d/jai
%endif
%files apache-bcel -f .mfiles-apache-bcel %files apache-bcel -f .mfiles-apache-bcel
%{ant_home}/lib/%{name}-apache-bcel.jar %{ant_home}/lib/%{name}-apache-bcel.jar
%config(noreplace) %{_sysconfdir}/%{name}.d/apache-bcel %config(noreplace) %{_sysconfdir}/%{name}.d/apache-bcel
@ -621,22 +624,9 @@ LC_ALL=C.UTF-8 %{ant} test
%{ant_home}/lib/%{name}-jsch.jar %{ant_home}/lib/%{name}-jsch.jar
%config(noreplace) %{_sysconfdir}/%{name}.d/jsch %config(noreplace) %{_sysconfdir}/%{name}.d/jsch
%files junit -f .mfiles-junit
%{ant_home}/lib/%{name}-junit.jar
%{ant_home}/lib/%{name}-junit4.jar
%config(noreplace) %{_sysconfdir}/%{name}.d/junit
%config(noreplace) %{_sysconfdir}/%{name}.d/junit4
%{ant_home}/etc/junit-frames.xsl
%{ant_home}/etc/junit-noframes.xsl
%{ant_home}/etc/junit-frames-xalan1.xsl
%{ant_home}/etc/junit-frames-saxon.xsl
%{ant_home}/etc/junit-noframes-saxon.xsl
%if %{with junit5}
%files junit5 -f .mfiles-junitlauncher %files junit5 -f .mfiles-junitlauncher
%{ant_home}/lib/%{name}-junitlauncher.jar %{ant_home}/lib/%{name}-junitlauncher.jar
%config(noreplace) %{_sysconfdir}/%{name}.d/junitlauncher %config(noreplace) %{_sysconfdir}/%{name}.d/junitlauncher
%endif
%files testutil -f .mfiles-testutil %files testutil -f .mfiles-testutil
%{ant_home}/lib/%{name}-testutil.jar %{ant_home}/lib/%{name}-testutil.jar
@ -650,17 +640,21 @@ LC_ALL=C.UTF-8 %{ant} test
%license LICENSE NOTICE %license LICENSE NOTICE
%doc manual/* %doc manual/*
%if %with javadoc
%files javadoc %files javadoc
%license LICENSE NOTICE %license LICENSE NOTICE
%{_javadocdir}/%{name} %{_javadocdir}/%{name}
%endif %endif
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
%changelog %changelog
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 0:1.10.9-3 * Tue Jun 08 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.10.9-4
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Bootstrap Maven for CentOS Stream 9
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.10.9-3
- Bootstrap build
- Non-bootstrap build
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.10.9-2 * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.10.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild