packages: ant-contrib/ant-contrib.spec (NEW), ant-contrib/antservertest.pat...

glen glen at pld-linux.org
Fri Oct 21 21:32:35 CEST 2011


Author: glen                         Date: Fri Oct 21 19:32:35 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new, based on fedora package

---- Files affected:
packages/ant-contrib:
   ant-contrib.spec (NONE -> 1.1)  (NEW), antservertest.patch (NONE -> 1.1)  (NEW), build_xml.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/ant-contrib/ant-contrib.spec
diff -u /dev/null packages/ant-contrib/ant-contrib.spec:1.1
--- /dev/null	Fri Oct 21 21:32:35 2011
+++ packages/ant-contrib/ant-contrib.spec	Fri Oct 21 21:32:30 2011
@@ -0,0 +1,105 @@
+# $Revision$, $Date$
+# TODO
+# - some deps missing:
+#build_contrib_jar:
+#    [javac] Compiling 88 source files to ant-contrib/build/classes
+#    [javac] ant-contrib/src/net/sf/antcontrib/antserver/server/ConnectionHandler.java:22: package org.apache.xml.serialize does not exist
+
+%define		subver b2
+%define		rel	0.1
+Summary:	Collection of tasks for Ant
+Name:		ant-contrib
+Version:	1.0
+Release:	0.%{subver}.%{rel}
+License:	ASL 2.0
+Group:		Development/Libraries
+URL:		http://ant-contrib.sourceforge.net/
+Source0:	http://downloads.sourceforge.net/ant-contrib/%{name}-%{version}%{subver}-src.tar.gz
+# Source0-md5:	66511dddcef3dc9798db33dbaca0d3de
+Patch0:		build_xml.patch
+Patch2:		antservertest.patch
+BuildRequires:	ant-junit >= 1.6.2
+BuildRequires:	java(jaxp_parser_impl)
+BuildRequires:	java-bcel >= 5.0
+BuildRequires:	java-junit >= 3.8.0
+BuildRequires:	jdk >= 1.4.2
+BuildRequires:	jpackage-utils >= 1.5
+BuildRequires:	rpmbuild(macros) >= 1.553
+Requires:	ant >= 1.6.2
+Requires:	java(jaxp_parser_impl)
+Requires:	java-junit >= 3.8.0
+BuildArch:	noarch
+
+%description
+The Ant-Contrib project is a collection of tasks (and at one point
+maybe types and other tools) for Apache Ant.
+
+%package javadoc
+Summary:	Javadoc for Ant contrib tasks
+Group:		Documentation
+
+%description javadoc
+API documentation for Ant contrib tasks.
+
+%prep
+%setup -q  -n %{name}
+%patch0
+%patch2
+
+%undos manual/tasks/foreach.html manual/tasks/for.html
+
+%{__rm} -r test/src/net/sf/antcontrib/antclipse
+
+install -d test/lib
+
+%build
+junit_jar=$(find-jar junit)
+ln -s $junit_jar test/lib/junit-$(JUNIT_VER).jar
+
+export OPT_JAR_LIST="ant/ant-junit junit"
+export CLASSPATH=
+CLASSPATH=build/lib/ant-contrib-%{version}.jar:$CLASSPATH
+echo $ANT_HOME
+%ant -Dsource=1.4 -Dversion=%{version} -Dbcel.jar=file://%{_javadir}/bcel.jar all
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+# jars
+cp -p build/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{name}.jar
+
+# javadoc
+install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+cp -pr build/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+rm -rf build/docs/api
+
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/ant.d
+echo "ant/ant-contrib" > $RPM_BUILD_ROOT%{_sysconfdir}/ant.d/ant-contrib
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post javadoc
+ln -nfs %{name}-%{version} %{_javadocdir}/%{name}
+
+%files
+%defattr(644,root,root,755)
+%doc build/docs/LICENSE.txt
+%doc build/docs/tasks/*
+%{_sysconfdir}/ant.d/ant-contrib
+%{_javadir}/ant/*.jar
+
+%files javadoc
+%defattr(644,root,root,755)
+%doc %{_javadocdir}/%{name}-%{version}
+%doc %{_javadocdir}/%{name}
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2011/10/21 19:32:30  glen
+- new, based on fedora package

================================================================
Index: packages/ant-contrib/antservertest.patch
diff -u /dev/null packages/ant-contrib/antservertest.patch:1.1
--- /dev/null	Fri Oct 21 21:32:35 2011
+++ packages/ant-contrib/antservertest.patch	Fri Oct 21 21:32:30 2011
@@ -0,0 +1,27 @@
+--- test/resources/antserver/antservertest.xml.orig	2005-02-03 19:04:11.000000000 -0500
++++ test/resources/antserver/antservertest.xml	2006-06-01 11:57:05.000000000 -0400
+@@ -3,8 +3,8 @@
+ 
+     <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
+ 
+-    <property name="server.host" value="localhost" />
+-    <property name="server.port" value="17000" />
++    <property name="server.host" value="127.0.0.1" />
++    <property name="server.port" value="23456" />
+ 
+     <target name="default">
+     </target>
+@@ -124,11 +124,11 @@
+                     <try>
+                         <antcall target="${test.target}" />
+                     </try>
+-                    <finally>
++                    <catch>
+                         <remoteant machine="${server.host}" port="${server.port}">
+                             <shutdown />
+                         </remoteant>
+-                    </finally>
++                    </catch>
+                 </trycatch>
+             </sequential>
+         </parallel>

================================================================
Index: packages/ant-contrib/build_xml.patch
diff -u /dev/null packages/ant-contrib/build_xml.patch:1.1
--- /dev/null	Fri Oct 21 21:32:35 2011
+++ packages/ant-contrib/build_xml.patch	Fri Oct 21 21:32:30 2011
@@ -0,0 +1,89 @@
+--- build.xml.old	2006-07-20 14:29:08.000000000 -0400
++++ build.xml	2006-07-20 14:29:35.000000000 -0400
+@@ -53,6 +53,8 @@
+   <property name="contrib.jar" location="${lib}/${jar.name}"/>
+   <property name="jar.main.class" value="net.sf.antcontrib.AntContribVersion"/>
+ 
++  <property name="bcel.jar" value="http://www.ibiblio.org/maven/bcel/jars/bcel-5.1.jar" />
++
+   <!--
+   ######################################################
+   ### Build the class and jar file target directories
+@@ -153,7 +155,7 @@
+     <manifest file="${lib}/MANIFEST.MF">
+         <attribute name="Built-By" value="Ant-contrib"/>
+         <attribute name="Main-Class" value="${jar.main.class}"/>
+-        <attribute name="Class-Path" value="${jar.name}"/>
++        <!--<attribute name="Class-Path" value="${jar.name}"/>-->
+         <!--attribute name="Specification-Title" value="${spec.title}"/>
+         <attribute name="Specification-Version" value="${spec.version}"/>
+         <attribute name="Specification-Vendor" value="${spec.vendor}"/-->
+@@ -349,8 +351,8 @@
+       </classpath>
+     </junit>
+ 
+-      <fail message="JUnit error (${junit.error}) encountered." if="junit.error" />
+-      <fail message="JUnit failure (${junit.failure}) encountered." if="junit.failure" />
++<!--      <fail message="JUnit error (${junit.error}) encountered." if="junit.error" />-->
++<!--      <fail message="JUnit failure (${junit.failure}) encountered." if="junit.failure" />-->
+   </target>
+ 
+   <target name="test-all" depends="compile-tests">
+@@ -373,7 +375,7 @@
+ 
+   <target name="get-jar-deps">
+       <antcall target="get-dep-maybe">
+-          <param name="dep.src" value="http://www.ibiblio.org/maven/bcel/jars/bcel-5.1.jar" />
++		  <param name="dep.src" value="${bcel.jar}" />
+           <param name="dep.dest" value="${runlib}/bcel-5.1.jar" />
+       </antcall>
+ 
+@@ -384,12 +386,18 @@
+   </target>
+ 
+   <target name="build-ant-testutil" unless="ant.build.testutil.available">
+-    <unzip src="${build.ant.dir}/${ant.src.file}"
+-             dest="${build.ant.dir}">
+-          <patternset>
+-              <include name="${ant.unzip.dir}/src/testcases/org/apache/tools/ant/BuildFileTest.java"/>
+-          </patternset>
+-    </unzip>
++    <gunzip src="${build.ant.dir}/${ant.src.file}"
++			dest="${build.ant.dir}" />
++
++    <delete file="${build.ant.dir}/${ant.src.file}" />
++
++    <untar src="${build.ant.dir}/${ant.src.tar.file}"
++           dest="${build.ant.dir}" />
++
++    <delete file="${build.ant.dir}/${ant.src.tar.file}" />
++    <delete file="${build.ant.dir}/${ant.unzip.dir}/lib/xml-apis.jar" />
++    <delete file="${build.ant.dir}/${ant.unzip.dir}/lib/xercesImpl.jar" />
++	
+ 
+     <mkdir dir="${testclasses}" />
+     <javac srcdir="${build.ant.dir}/${ant.unzip.dir}/src/testcases"
+@@ -408,9 +416,12 @@
+       <property name="build.ant.dir"
+                 value="build/ant" />
+       <property name="ant.download.version"
+-                value="1.6.2" />
++                value="1.6.5" />
+       <property name="ant.src.file"
+-                value="apache-ant-${ant.download.version}-src.zip" />
++			  value="apache-ant-${ant.download.version}-src.tar.gz" />
++	  <property name="ant.src.tar.file"
++			  value="apache-ant-${ant.download.version}-src.tar" />
++
+       <property name="ant.unzip.dir"
+                 value="apache-ant-${ant.download.version}" />
+ 
+@@ -418,7 +429,7 @@
+ 
+       <get dest="${build.ant.dir}/${ant.src.file}"
+            usetimestamp="true"
+-           src="http://archive.apache.org/dist/ant/source/${ant.src.file}">
++		   src="file://${basedir}/../../../SOURCES/${ant.src.file}">
+       </get>
+ 
+       <available property="ant.build.testutil.available"
================================================================


More information about the pld-cvs-commit mailing list