This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
##### WARNING: please do not edit this auto generated spec file. Use the ant.spec! #####
|
||||
%bcond_with bootstrap
|
||||
%bcond_with junit
|
||||
%bcond_with junit5
|
||||
%bcond_without antlr
|
||||
Name: ant-antlr
|
||||
Version: 1.10.5
|
||||
@@ -55,7 +56,7 @@ BuildArch: noarch
|
||||
%if !%{with bootstrap}
|
||||
BuildRequires: javapackages-local
|
||||
%endif
|
||||
%if %{with junit} || %{with antlr}
|
||||
%if %{with junit} || %{with antlr} || %{with junit5}
|
||||
BuildRequires: ant = %{version}
|
||||
BuildRequires: hamcrest
|
||||
BuildRequires: junit
|
||||
@@ -64,6 +65,9 @@ BuildRequires: junit
|
||||
%if %{with antlr}
|
||||
BuildRequires: xerces-j2
|
||||
%endif
|
||||
%if %{with junit5}
|
||||
BuildRequires: junit5
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1320
|
||||
BuildRequires: strip-nondeterminism
|
||||
%endif
|
||||
@@ -91,11 +95,20 @@ Obsoletes: ant-javadoc
|
||||
Requires: junit4
|
||||
%requires_eq ant
|
||||
%endif
|
||||
%if %{with junit5}
|
||||
Requires: junit5
|
||||
%requires_eq ant
|
||||
%endif
|
||||
%if %{with junit}
|
||||
%description
|
||||
Apache Ant is a Java-based build tool.
|
||||
|
||||
This package contains optional JUnit tasks for Apache Ant.
|
||||
%elif %{with junit5}
|
||||
%description
|
||||
Apache Ant is a Java-based build tool.
|
||||
|
||||
This package contains optional JUnit5 tasks for Apache Ant.
|
||||
%else
|
||||
%description
|
||||
Apache Ant is a Java-based build tool. In theory, it is kind of like
|
||||
@@ -357,9 +370,12 @@ rm src/tests/junit/org/apache/tools/mail/MailMessageTest.java \
|
||||
%endif
|
||||
|
||||
#install jars
|
||||
%if %{with junit}
|
||||
%if %{with junit} || %{with junit5}
|
||||
build-jar-repository -s -p lib/optional junit4
|
||||
%endif
|
||||
%if %{with junit5}
|
||||
build-jar-repository -s -p lib/optional junit5 opentest4j
|
||||
%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-apis antlr-bootstrap bcel javamail/mailapi jdepend junit4 log4j oro regexp bsf commons-logging commons-net jsch xalan-j2 xalan-j2-serializer xml-resolver
|
||||
@@ -375,7 +391,7 @@ mv LICENSE.utf8 LICENSE
|
||||
%build
|
||||
export OPT_JAR_LIST=:
|
||||
|
||||
%if %{with antlr} || %{with junit}
|
||||
%if %{with antlr} || %{with junit} || %{with junit5}
|
||||
ant -Dbuild.sysclasspath=first jars test-jar
|
||||
|
||||
#remove empty jai and netrexx jars. Due to missing dependencies they contain only manifests.
|
||||
@@ -398,19 +414,26 @@ 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
|
||||
%if %{without junit} && %{without junit5}
|
||||
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
|
||||
%if %{without junit}
|
||||
rm build/lib/ant-junit.jar
|
||||
rm build/lib/ant-junit4.jar
|
||||
%else
|
||||
# empty in this scenario
|
||||
rm build/lib/ant-junitlauncher.jar
|
||||
%endif
|
||||
# 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
|
||||
@@ -458,6 +481,10 @@ do
|
||||
install -m 644 src/etc/poms/${jarname}/pom.xml %{buildroot}/%{_mavenpomdir}/${pomname}
|
||||
if [ $jarname == ant-launcher ]; then
|
||||
%add_maven_depmap ${pomname} ${destname}${jarname}.jar -a ant:ant-launcher
|
||||
elif [ $jarname == ant-jmf ]; then
|
||||
%add_maven_depmap ${pomname} ${destname}${jarname}.jar -f jmf
|
||||
elif [ $jarname == ant-swing ]; then
|
||||
%add_maven_depmap ${pomname} ${destname}${jarname}.jar -f swing
|
||||
elif [ $jarname == ant ]; then
|
||||
%add_maven_depmap ${pomname} ${destname}${jarname}.jar -a org.apache.ant:ant-nodeps,apache:ant,ant:ant
|
||||
else
|
||||
@@ -510,6 +537,10 @@ echo "junit ant/ant-junit" > %{buildroot}%{_sysconfdir}/ant.d/junit
|
||||
echo "junit4 ant/ant-junit4" > %{buildroot}%{_sysconfdir}/ant.d/junit4
|
||||
%endif
|
||||
|
||||
%if %{with junit5}
|
||||
echo "junit5 hamcrest/core junit opentest4j ant/ant-junitlauncher" > %{buildroot}%{_sysconfdir}/ant.d/junitlauncher
|
||||
%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
|
||||
@@ -549,15 +580,13 @@ pushd %{buildroot}%{_javadir}
|
||||
done
|
||||
popd
|
||||
|
||||
%files
|
||||
%files -f .mfiles
|
||||
%license LICENSE NOTICE
|
||||
%doc KEYS README WHATSNEW
|
||||
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
||||
%attr(0755,root,root) %{_bindir}/ant
|
||||
%attr(0755,root,root) %{_bindir}/antRun
|
||||
%{_javadir}/%{name}.jar
|
||||
%{_javadir}/%{name}/%{name}.jar
|
||||
%{_javadir}/%{name}-launcher.jar
|
||||
%{_javadir}/%{name}/%{name}-launcher.jar
|
||||
%{_javadir}/%{name}-bootstrap.jar
|
||||
%{_javadir}/%{name}/%{name}-bootstrap.jar
|
||||
@@ -580,16 +609,6 @@ popd
|
||||
%{ant_home}/lib/ant-bootstrap.jar
|
||||
%{ant_home}/lib/ant-launcher.jar
|
||||
%dir %{_sysconfdir}/ant.d
|
||||
%{_mavenpomdir}/JPP-ant-launcher.pom
|
||||
%{_mavenpomdir}/JPP-ant-parent.pom
|
||||
%{_mavenpomdir}/JPP-ant.pom
|
||||
%if %{defined _maven_repository}
|
||||
%config(noreplace) %{_mavendepmapfragdir}/ant
|
||||
%else
|
||||
%{_datadir}/maven-metadata/ant.xml
|
||||
%endif
|
||||
%dir %{_mavenpomdir}
|
||||
|
||||
%endif
|
||||
|
||||
%if %{with antlr}
|
||||
@@ -610,36 +629,29 @@ popd
|
||||
%endif
|
||||
|
||||
%if %{with junit}
|
||||
%files
|
||||
%{_javadir}/ant/ant-junit*.jar
|
||||
%files -f .mfiles
|
||||
%{ant_home}/lib/ant-junit*.jar
|
||||
%config(noreplace) %{_sysconfdir}/ant.d/junit
|
||||
%config(noreplace) %{_sysconfdir}/ant.d/junit4
|
||||
%{ant_home}%{_sysconfdir}/junit-frames.xsl
|
||||
%{ant_home}%{_sysconfdir}/junit-noframes.xsl
|
||||
%{_mavenpomdir}/JPP.ant-ant-junit*.pom
|
||||
%if %{defined _maven_repository}
|
||||
%config(noreplace) %{_mavendepmapfragdir}/ant-junit
|
||||
%else
|
||||
%{_datadir}/maven-metadata/ant-junit.xml
|
||||
%endif
|
||||
%dir %{_mavenpomdir}
|
||||
|
||||
%if %{with junit5}
|
||||
%files -f .mfiles
|
||||
%{ant_home}/lib/ant-junitlauncher.jar
|
||||
%config(noreplace) %{_sysconfdir}/ant.d/junitlauncher
|
||||
%endif
|
||||
|
||||
### Basic ant subpackages
|
||||
%if %{with bootstrap}
|
||||
%files -n ant-jmf
|
||||
%{_javadir}/ant/ant-jmf.jar
|
||||
%files -n ant-jmf -f .mfiles-jmf
|
||||
%{ant_home}/lib/ant-jmf.jar
|
||||
%config(noreplace) %{_sysconfdir}/ant.d/jmf
|
||||
%{_mavenpomdir}/JPP.ant-ant-jmf.pom
|
||||
|
||||
%files -n ant-swing
|
||||
%{_javadir}/ant/ant-swing.jar
|
||||
%files -n ant-swing -f .mfiles-swing
|
||||
%{ant_home}/lib/ant-swing.jar
|
||||
%config(noreplace) %{_sysconfdir}/ant.d/swing
|
||||
%{_mavenpomdir}/JPP.ant-ant-swing.pom
|
||||
%dir %{_mavenpomdir}
|
||||
|
||||
%files -n ant-scripts
|
||||
%defattr(0755,root,root,0755)
|
||||
|
Reference in New Issue
Block a user