Implement ant_minimal bcond
This commit is contained in:
parent
71a50d9a51
commit
0654f40efc
26
ant.spec
26
ant.spec
@ -30,6 +30,12 @@
|
|||||||
|
|
||||||
%bcond_with bootstrap
|
%bcond_with bootstrap
|
||||||
|
|
||||||
|
%if %{without bootstrap}
|
||||||
|
%bcond_with ant_minimal
|
||||||
|
%else
|
||||||
|
%bcond_without ant_minimal
|
||||||
|
%endif
|
||||||
|
|
||||||
%global ant_home %{_datadir}/ant
|
%global ant_home %{_datadir}/ant
|
||||||
|
|
||||||
Name: ant
|
Name: ant
|
||||||
@ -61,7 +67,9 @@ BuildRequires: javapackages-local
|
|||||||
BuildRequires: java-devel >= 1:1.8.0
|
BuildRequires: java-devel >= 1:1.8.0
|
||||||
BuildRequires: ant >= 1.10.2
|
BuildRequires: ant >= 1.10.2
|
||||||
BuildRequires: ant-junit
|
BuildRequires: ant-junit
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{without ant_minimal}
|
||||||
BuildRequires: mvn(antlr:antlr)
|
BuildRequires: mvn(antlr:antlr)
|
||||||
BuildRequires: mvn(bcel:bcel)
|
BuildRequires: mvn(bcel:bcel)
|
||||||
BuildRequires: mvn(bsf:bsf)
|
BuildRequires: mvn(bsf:bsf)
|
||||||
@ -128,7 +136,7 @@ Optional junit tasks for %{name}.
|
|||||||
%description junit -l fr
|
%description junit -l fr
|
||||||
Taches junit optionelles pour %{name}.
|
Taches junit optionelles pour %{name}.
|
||||||
|
|
||||||
%if %{without bootstrap}
|
%if %{without ant_minimal}
|
||||||
|
|
||||||
%package jmf
|
%package jmf
|
||||||
Summary: Optional jmf tasks for %{name}
|
Summary: Optional jmf tasks for %{name}
|
||||||
@ -354,8 +362,12 @@ rm src/main/org/apache/tools/ant/listener/Log4jListener.java
|
|||||||
%if %{with bootstrap}
|
%if %{with bootstrap}
|
||||||
build-jar-repository -s -p lib/optional javapackages-bootstrap/junit javapackages-bootstrap/hamcrest-core
|
build-jar-repository -s -p lib/optional javapackages-bootstrap/junit javapackages-bootstrap/hamcrest-core
|
||||||
%else
|
%else
|
||||||
|
%if %{with ant_minimal}
|
||||||
|
build-jar-repository -s -p lib/optional junit hamcrest/core hamcrest/library
|
||||||
|
%else
|
||||||
build-jar-repository -s -p lib/optional antlr bcel javamail/mailapi jdepend junit oro regexp bsf commons-logging commons-net jsch xalan-j2 xml-commons-resolver xalan-j2-serializer hamcrest/core hamcrest/library xz-java junit5 opentest4j
|
build-jar-repository -s -p lib/optional antlr bcel javamail/mailapi jdepend junit 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
|
||||||
|
%endif
|
||||||
|
|
||||||
# fix hardcoded paths in ant script and conf
|
# fix hardcoded paths in ant script and conf
|
||||||
cp -p %{SOURCE2} %{name}.conf
|
cp -p %{SOURCE2} %{name}.conf
|
||||||
@ -382,7 +394,7 @@ mv LICENSE.utf8 LICENSE
|
|||||||
%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
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{with bootstrap}
|
%if %{with ant_minimal}
|
||||||
%{ant} jars
|
%{ant} jars
|
||||||
%else
|
%else
|
||||||
%{ant} jars test-jar javadocs
|
%{ant} jars test-jar javadocs
|
||||||
@ -408,7 +420,7 @@ 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}
|
%if %{with ant_minimal}
|
||||||
mv build/lib build/lib0
|
mv build/lib build/lib0
|
||||||
mkdir build/lib/
|
mkdir build/lib/
|
||||||
mv build/lib0/ant.jar build/lib/
|
mv build/lib0/ant.jar build/lib/
|
||||||
@ -454,7 +466,7 @@ rm -f src/script/*.bat
|
|||||||
rm -f src/script/*.cmd
|
rm -f src/script/*.cmd
|
||||||
|
|
||||||
# XSLs
|
# XSLs
|
||||||
%if %{with bootstrap}
|
%if %{with ant_minimal}
|
||||||
rm src/etc/jdepend-frames.xsl
|
rm src/etc/jdepend-frames.xsl
|
||||||
rm src/etc/jdepend.xsl
|
rm src/etc/jdepend.xsl
|
||||||
rm src/etc/maudit-frames.xsl
|
rm src/etc/maudit-frames.xsl
|
||||||
@ -476,7 +488,7 @@ 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-junit" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/junit
|
||||||
echo "junit hamcrest/core ant/ant-junit4" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/junit4
|
echo "junit hamcrest/core ant/ant-junit4" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/junit4
|
||||||
|
|
||||||
%if %{without bootstrap}
|
%if %{without ant_minimal}
|
||||||
|
|
||||||
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
|
||||||
@ -510,7 +522,7 @@ cp -pr build/javadocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
|||||||
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 %{without bootstrap}
|
%if %{without ant_minimal}
|
||||||
%check
|
%check
|
||||||
LC_ALL=C.UTF-8 %{ant} test
|
LC_ALL=C.UTF-8 %{ant} test
|
||||||
%endif
|
%endif
|
||||||
@ -553,7 +565,7 @@ LC_ALL=C.UTF-8 %{ant} test
|
|||||||
%{ant_home}/etc/junit-frames-saxon.xsl
|
%{ant_home}/etc/junit-frames-saxon.xsl
|
||||||
%{ant_home}/etc/junit-noframes-saxon.xsl
|
%{ant_home}/etc/junit-noframes-saxon.xsl
|
||||||
|
|
||||||
%if %{without bootstrap}
|
%if %{without ant_minimal}
|
||||||
|
|
||||||
%files jmf -f .mfiles-jmf
|
%files jmf -f .mfiles-jmf
|
||||||
%{ant_home}/lib/%{name}-jmf.jar
|
%{ant_home}/lib/%{name}-jmf.jar
|
||||||
|
Loading…
Reference in New Issue
Block a user