Expand conditionals
This commit is contained in:
parent
16e292d076
commit
8d8f44adbb
56
ant.spec
56
ant.spec
@ -28,11 +28,8 @@
|
|||||||
# 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 javadoc
|
|
||||||
|
|
||||||
# Disabled for now, asi it doesn't work (tests fail) and nobody needs it
|
# Disabled for now, asi it doesn't work (tests fail) and nobody needs it
|
||||||
%bcond_with junit5
|
|
||||||
|
|
||||||
%global ant_home %{_datadir}/ant
|
%global ant_home %{_datadir}/ant
|
||||||
|
|
||||||
@ -76,9 +73,6 @@ 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
|
|
||||||
%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.
|
||||||
@ -189,17 +183,6 @@ Optional commons net tasks for %{name}.
|
|||||||
Taches commons net optionelles pour %{name}.
|
Taches commons net optionelles pour %{name}.
|
||||||
|
|
||||||
# Disable because we don't ship the dependencies
|
# 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}
|
||||||
@ -291,17 +274,6 @@ Optional junit tasks for %{name}.
|
|||||||
%description junit -l fr
|
%description junit -l fr
|
||||||
Taches junit optionelles pour %{name}.
|
Taches junit optionelles pour %{name}.
|
||||||
|
|
||||||
%if %{with junit5}
|
|
||||||
%package junit5
|
|
||||||
Summary: Optional junit5 tasks for %{name}
|
|
||||||
Requires: %{name} = %{epoch}:%{version}-%{release}
|
|
||||||
|
|
||||||
%description junit5
|
|
||||||
Optional junit5 tasks for %{name}.
|
|
||||||
|
|
||||||
%description junit5 -l fr
|
|
||||||
Taches junit5 optionelles pour %{name}.
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%package testutil
|
%package testutil
|
||||||
Summary: Test utility classes for %{name}
|
Summary: Test utility classes for %{name}
|
||||||
@ -358,9 +330,6 @@ rm src/tests/junit/org/apache/tools/ant/types/selectors/SignedSelectorTest.java
|
|||||||
|
|
||||||
#install jars
|
#install jars
|
||||||
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
|
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
|
||||||
%if %{with junit5}
|
|
||||||
build-jar-repository -s -p lib/optional junit5 opentest4j
|
|
||||||
%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
|
||||||
@ -383,16 +352,12 @@ 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
|
%pom_xpath_inject 'target[@name="javadocs"]/javadoc/packageset' '<exclude name="**/junitlauncher"/>' build.xml
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{ant} jars test-jar
|
%{ant} jars test-jar
|
||||||
|
|
||||||
%if %with javadoc
|
|
||||||
%{ant} javadocs
|
%{ant} javadocs
|
||||||
%endif
|
|
||||||
|
|
||||||
# typeset the manpage
|
# typeset the manpage
|
||||||
mkdir man
|
mkdir man
|
||||||
@ -401,9 +366,7 @@ 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
|
rm -f build/lib/ant-junitlauncher.jar
|
||||||
%endif
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -486,15 +449,10 @@ echo "junit hamcrest/core ant/ant-junit4" > $RPM_BUILD_ROOT%{_sysconfdir}/%{name
|
|||||||
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)
|
||||||
@ -503,10 +461,8 @@ 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 %with tests
|
|
||||||
%check
|
%check
|
||||||
LC_ALL=en_US.utf8 %{ant} test
|
LC_ALL=en_US.utf8 %{ant} test
|
||||||
%endif
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc KEYS README WHATSNEW
|
%doc KEYS README WHATSNEW
|
||||||
@ -564,11 +520,6 @@ LC_ALL=en_US.utf8 %{ant} test
|
|||||||
%config(noreplace) %{_sysconfdir}/%{name}.d/commons-net
|
%config(noreplace) %{_sysconfdir}/%{name}.d/commons-net
|
||||||
|
|
||||||
# Disable as we dont ship the dependencies
|
# 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
|
||||||
@ -616,11 +567,6 @@ LC_ALL=en_US.utf8 %{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 %{with junit5}
|
|
||||||
%files junit5 -f .mfiles-junitlauncher
|
|
||||||
%{ant_home}/lib/%{name}-junitlauncher.jar
|
|
||||||
%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
|
||||||
@ -634,11 +580,9 @@ LC_ALL=en_US.utf8 %{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
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user