Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=xfcetesting.git;a=commitdiff;h=defdcfcc565aca7be7032e55672d7153b9d30d1d

commit defdcfcc565aca7be7032e55672d7153b9d30d1d
Author: Marius Cirsta <[email protected]>
Date:   Tue Jun 26 22:06:09 2012 +0000

jmock-1.2.0-1-x86_64

* rebuild with openjava
* user bin junit to bootstrap
* changer m8r
* version bump

diff --git a/source/devel-extra/jmock/FrugalBuild 
b/source/devel-extra/jmock/FrugalBuild
index 8694f1f..c08a701 100644
--- a/source/devel-extra/jmock/FrugalBuild
+++ b/source/devel-extra/jmock/FrugalBuild
@@ -1,27 +1,48 @@
# Compiling Time: 0.05 SBU
-# Maintainer: Miklos Vajna <[email protected]>
+# Maintainer: Marius Cirsta <[email protected]>
+# Contributor: Miklos Vajna <[email protected]>

pkgname=jmock
-pkgver=1.1.0
-pkgrel=3
+pkgver=1.2.0
+pkgrel=1
pkgdesc="A library that supports test-driven development of Java code with mock 
objects."
-url="http://jmock.codehaus.org/";
+url="http://www.jmock.org";
Finclude openjava
-makedepends=(${makedepends[@]} 'junit')
+depends=(${depends[@]} 'cglib')
groups=('devel-extra')
archs=('i686' 'x86_64')
-up2date="Flastarchive http://jmock.codehaus.org/dist/ .src.zip"
-source=($url/dist/$pkgname-$pkgver-src.zip junit.patch build.patch)
-sha1sums=('f22b987e29a5dc6c1c23500720d7c3a0b7345d70' \
-          '8f8f78d449c7ca2a105084c0da0f0345dc828101' \
-          '2bdb27224974e5eed9e095156b700bb550116bb8')
+up2date="Flastarchive http://www.jmock.org/dist/ -jars.zip"
+#we need to boostrap this with binary junit as junit depends on this
+#this should be kept in sync with junit version
+junit_ver="4.10"
+source=(http://www.jmock.org/dist/${pkgname}-${pkgver//_/-}-jars.zip  \
+       https://github.com/downloads/KentBeck/junit/junit-${junit_ver}.jar \
+       build.xml junit.patch)
+sha1sums=('b1fa7cb1fe4acaacc67b8d37bb2bcc563bc63ea7' \
+          '28496454496957d3efb815d5a77723d8e3d8b912' \
+          'f5d120f07ce9d6be0f9c349fe7a30673356771ad' \
+          '8f8f78d449c7ca2a105084c0da0f0345dc828101')

build()
-{
-       Fpatchall
-       Fjavacleanup
-       rm -rf core/src/test
-       Fant core.jar
-       mv build/dist/jars/jmock{-SNAPSHOT,}.jar
-       Fjar build/dist/jars/jmock.jar
+{
+        mkdir ${pkgname}-${pkgver//_/-}
+       Fcd ${pkgname}-${pkgver//_/-}
+       mv ../${pkgname}-core-${pkgver//_/-}.jar 
./${pkgname}-core-${pkgver//_/-}.zip
+       Fextract ${pkgname}-core-${pkgver//_/-}.zip
+       mkdir -p core/src
+       mv org core/src/
+       mkdir lib
+       cp ../build.xml ./
+       mv ../junit-${junit_ver}.jar ./lib/
+       mv ../${pkgname}-cglib-${pkgver//_/-}.jar 
./${pkgname}-cglib-${pkgver//_/-}.zip
+       Fextract ${pkgname}-cglib-${pkgver//_/-}.zip
+       mkdir -p extensions/cglib/src
+       mv org extensions/cglib/src/
+       Fpatch junit.patch
+       Fant jars
+       #now install the jars
+       mv build/dist/jars/${pkgname}-SNAPSHOT.jar 
build/dist/jars/${pkgname}.jar
+       Fjar build/dist/jars/${pkgname}.jar
+       mv build/dist/jars/${pkgname}-cglib-SNAPSHOT.jar 
build/dist/jars/${pkgname}-cglib.jar
+       Fjar build/dist/jars/${pkgname}-cglib.jar
}
diff --git a/source/devel-extra/jmock/build.patch 
b/source/devel-extra/jmock/build.patch
deleted file mode 100644
index 22b47ee..0000000
--- a/source/devel-extra/jmock/build.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -ur jmock-1.1.0.old/build.xml jmock-1.1.0/build.xml
---- jmock-1.1.0.old/build.xml  2006-12-23 00:06:19.000000000 +0200
-+++ jmock-1.1.0/build.xml      2006-12-23 00:06:49.000000000 +0200
-@@ -116,7 +116,7 @@
-         </junit>
-     </target>
-
--    <target name="core.jar" depends="core.test.unit">
-+    <target name="core.jar" depends="core.compile">
-         <mkdir dir="${build.dist.bin.dir}"/>
-         <jar basedir="${core.build.dir}" destfile="${core.jar}" 
excludes="test/**" index="true"/>
-     </target>
-@@ -181,7 +181,7 @@
-         </junit>
-     </target>
-
--    <target name="cglib.jar" depends="cglib.test.unit">
-+    <target name="cglib.jar" depends="cglib.compile">
-         <mkdir dir="${build.dist.bin.dir}"/>
-         <jar basedir="${cglib.build.dir}" destfile="${cglib.jar}" 
excludes="test/**" index="true"/>
-     </target>
diff --git a/source/devel-extra/jmock/build.xml 
b/source/devel-extra/jmock/build.xml
new file mode 100644
index 0000000..21ac365
--- /dev/null
+++ b/source/devel-extra/jmock/build.xml
@@ -0,0 +1,303 @@
+<project name="jMock" default="jars">
+       <property file="released-versions.properties"/>
+       <property name="version.archive" value="SNAPSHOT"/>
+    <tstamp>
+       <format property="version.extract" pattern="yyyyddMM-HHmmss" 
timezone="UTC" locale="en"/>
+    </tstamp>
+
+    <property name="lib.dir" value="lib"/>
+    <property name="examples.dir" value="examples"/>
+    <property name="extensions.dir" value="extensions"/>
+    <property name="website.dir" value="website"/>
+
+    <property name="build.dir" value="build"/>
+    <property name="build.dist.dir" value="${build.dir}/dist"/>
+    <property name="build.dist.bin.dir" value="${build.dist.dir}/jars"/>
+    <property name="build.dist.src.dir" 
value="${build.dist.dir}/distributions"/>
+    <property name="timestamped.src.dir" value="jmock-${version.extract}"/>
+    <property name="build.src.dir" 
value="${build.dir}/${timestamped.src.dir}"/>
+    <property name="build.javadoc.subdir" value="javadoc-${version.extract}"/>
+       <property name="build.javadoc.dir" 
value="${build.dir}/${build.javadoc.subdir}"/>
+    <property name="build.website.dir" value="website/output"/>
+
+    <property name="report.test.unit.dir" 
value="${build.dir}/reports/unit-tests"/>
+    <property name="report.test.acceptance.dir" 
value="${build.dir}/reports/acceptance-tests"/>
+
+    <property name="core.dir" value="core"/>
+    <property name="core.src.dir" value="${core.dir}/src"/>
+    <property name="core.atest.dir" value="${core.dir}/acceptance-tests"/>
+    <property name="core.build.dir" value="build/core"/>
+    <property name="core.jar" 
value="${build.dist.bin.dir}/jmock-${version.archive}.jar"/>
+
+    <property name="cglib.dir" value="${extensions.dir}/cglib"/>
+    <property name="cglib.src.dir" value="${cglib.dir}/src"/>
+    <property name="cglib.atest.dir" value="${cglib.dir}/acceptance-tests"/>
+    <property name="cglib.build.dir" value="build/cglib"/>
+    <property name="cglib.jar" 
value="${build.dist.bin.dir}/jmock-cglib-${version.archive}.jar"/>
+
+    <property name="src.zip" 
value="${build.dist.src.dir}/jmock-${version.archive}-src.zip"/>
+    <property name="javadoc.zip" 
value="${build.dist.src.dir}/jmock-${version.archive}-javadoc.zip"/>
+
+    <property name="deploy.root.dir" value="/home/projects/jmock"/>
+    <property name="deploy.website.dir" 
value="${deploy.root.dir}/public_html"/>
+    <property name="deploy.javadoc.dir" 
value="${deploy.website.dir}/docs/javadoc"/>
+    <property name="deploy.dist.dir" value="${deploy.root.dir}/dist"/>
+    <property name="deploy.dist.bin.dir" value="${deploy.dist.dir}/jars"/>
+    <property name="deploy.dist.src.dir" 
value="${deploy.dist.dir}/distributions"/>
+
+
+       <!-- Shortcut targets -->
+
+    <target name="jars" depends="core.jar,cglib.jar,src.zip,javadoc.zip"/>
+    <target name="rebuild" depends="clean,jars"/>
+    <target name="test" depends="test.unit,test.acceptance"/>
+    <target name="test.unit" depends="core.test.unit,cglib.test.unit"/>
+    <target name="test.acceptance" 
depends="core.test.acceptance,cglib.test.acceptance"/>
+
+    <target name="clean">
+        <delete dir="${build.dir}"/>
+        <delete dir="${build.website.dir}"/>
+    </target>
+
+
+    <!-- JMOCK CORE -->
+
+    <target name="core.build.dir">
+        <mkdir dir="${core.build.dir}"/>
+    </target>
+
+    <target name="core.compile" depends="core.build.dir">
+        <javac srcdir="${core.src.dir}" destdir="${core.build.dir}" 
debug="true"
+              source="1.7" target="1.7">
+            <classpath>
+                <fileset dir="${lib.dir}"/>
+            </classpath>
+        </javac>
+    </target>
+
+    <target name="core.atest.compile" depends="core.compile">
+        <javac srcdir="${core.atest.dir}" destdir="${core.build.dir}" 
debug="true"
+                  source="1.7" target="1.7">
+            <classpath>
+                <fileset dir="${lib.dir}"/>
+            </classpath>
+        </javac>
+    </target>
+
+    <target name="core.test.unit" depends="core.compile">
+        <!-- Must add lib/junit.jar to the CLASSPATH to run this task -->
+        <mkdir dir="${report.test.unit.dir}"/>
+        <junit printsummary="no" haltonfailure="true" haltonerror="true" 
fork="true">
+            <classpath>
+                <fileset dir="${lib.dir}"/>
+                <pathelement path="${core.build.dir}"/>
+            </classpath>
+            <formatter type="plain"/>
+            <formatter type="xml"/>
+            <batchtest todir="${report.test.unit.dir}">
+                <fileset dir="${core.src.dir}" includes="test/**/*Test.java" 
excludes="test/**/Abstract*"/>
+            </batchtest>
+        </junit>
+    </target>
+
+    <target name="core.test.acceptance" depends="core.atest.compile">
+        <!-- Must add lib/junit.jar to the CLASSPATH to run this task -->
+        <mkdir dir="${report.test.acceptance.dir}"/>
+        <junit printsummary="no">
+            <classpath>
+                <fileset dir="${lib.dir}"/>
+                <pathelement path="${core.build.dir}"/>
+            </classpath>
+            <formatter type="plain"/>
+            <formatter type="xml"/>
+            <batchtest fork="no" todir="${report.test.acceptance.dir}">
+                <fileset dir="${core.atest.dir}" 
includes="atest/**/*Test.java" excludes="test/**/Abstract*"/>
+            </batchtest>
+        </junit>
+    </target>
+
+    <target name="core.jar" depends="core.compile">
+        <mkdir dir="${build.dist.bin.dir}"/>
+        <jar basedir="${core.build.dir}" destfile="${core.jar}" 
excludes="test/**" index="true"/>
+    </target>
+
+    <!-- CGLIB EXTENSION -->
+
+    <target name="cglib.build.dir">
+        <mkdir dir="${cglib.build.dir}"/>
+    </target>
+
+    <target name="cglib.compile" depends="cglib.build.dir">
+        <javac srcdir="${cglib.src.dir}" destdir="${cglib.build.dir}" 
debug="true"
+              source="1.4" target="1.4">
+            <classpath>
+                <fileset dir="${lib.dir}"/>
+                <pathelement path="${core.build.dir}"/>
+            </classpath>
+        </javac>
+    </target>
+
+    <target name="cglib.atest.compile" depends="cglib.compile">
+        <javac srcdir="${cglib.atest.dir}" destdir="${cglib.build.dir}" 
debug="true"
+                  source="1.4" target="1.4">
+            <classpath>
+                <fileset dir="${lib.dir}"/>
+                <pathelement path="${core.build.dir}"/>
+            </classpath>
+        </javac>
+    </target>
+
+    <target name="cglib.test.unit" depends="cglib.compile">
+        <!-- Must add lib/junit.jar to the CLASSPATH to run this task -->
+        <mkdir dir="${report.test.unit.dir}"/>
+        <junit printsummary="no" haltonfailure="true" haltonerror="true">
+            <classpath>
+                <fileset dir="${lib.dir}"/>
+                <pathelement path="${core.build.dir}"/>
+                <pathelement path="${cglib.build.dir}"/>
+            </classpath>
+            <formatter type="plain"/>
+            <formatter type="xml"/>
+            <batchtest fork="no" todir="${report.test.unit.dir}">
+                <fileset dir="${cglib.src.dir}" includes="test/**/*Test.java" 
excludes="test/**/Abstract*"/>
+            </batchtest>
+        </junit>
+    </target>
+
+    <target name="cglib.test.acceptance" depends="cglib.atest.compile">
+        <!-- Must add lib/junit.jar to the CLASSPATH to run this task -->
+        <mkdir dir="${report.test.acceptance.dir}"/>
+        <junit printsummary="no">
+            <classpath>
+                <fileset dir="${lib.dir}"/>
+                <pathelement path="${core.build.dir}"/>
+                <pathelement path="${cglib.build.dir}"/>
+            </classpath>
+            <formatter type="plain"/>
+            <formatter type="xml"/>
+            <batchtest fork="no" todir="${report.test.acceptance.dir}">
+                <fileset dir="${cglib.atest.dir}" 
includes="atest/**/*Test.java" excludes="test/**/Abstract*"/>
+            </batchtest>
+        </junit>
+    </target>
+
+    <target name="cglib.jar" depends="cglib.compile">
+        <mkdir dir="${build.dist.bin.dir}"/>
+        <jar basedir="${cglib.build.dir}" destfile="${cglib.jar}" 
excludes="test/**" index="true"/>
+    </target>
+
+    <!-- SOURCE DISTRIBUTION -->
+
+    <target name="src.zip">
+        <mkdir dir="${build.dist.src.dir}"/>
+        <mkdir dir="${build.src.dir}"/>
+
+        <copy todir="${build.src.dir}">
+            <fileset dir=".">
+                <include name="${core.dir}/**"/>
+                <include name="${extensions.dir}/**"/>
+                <include name="${examples.dir}/**"/>
+                <include name="${lib.dir}/**"/>
+                <include name="build.xml"/>
+                <include name="README.txt"/>
+                <include name="LICENSE.txt"/>
+                <include name="VERSION"/>
+                <include name="CHANGELOG"/>
+                <include name="build.properties"/>
+                <include name="overview.html"/>
+            </fileset>
+        </copy>
+
+        <zip destfile="${src.zip}" basedir="${build.dir}" 
includes="${timestamped.src.dir}/**"/>
+
+        <delete dir="${build.src.dir}"/>
+    </target>
+
+    <!-- DOCUMENTATION -->
+
+    <target name="website">
+        <mkdir dir="${build.website.dir}"/>
+        <exec dir="${website.dir}" executable="ruby" failonerror="true">
+            <arg value="skinner.rb"/>
+               <env key="BUILD_TIMESTAMP" value="${version.extract}"/>
+               <env key="PRERELEASE_VERSION" value="${version.prerelease}"/>
+               <env key="RELEASE_VERSION" value="${version.release}"/>
+        </exec>
+    </target>
+
+    <target name="javadoc">
+        <mkdir dir="${build.javadoc.dir}"/>
+        <javadoc destdir="${build.javadoc.dir}"
+            overview="overview.html"
+            windowtitle="jMock API Documentation"
+            useexternalfile="true">
+
+            <packageset dir="${core.src.dir}">
+                <exclude name="test/**"/>
+            </packageset>
+            <packageset dir="${cglib.src.dir}">
+                <exclude name="test/**"/>
+            </packageset>
+
+            <sourcepath>
+                <path path="${core.src.dir}"/>
+                <path path="${cglib.src.dir}"/>
+            </sourcepath>
+
+            <classpath>
+                <fileset dir="${lib.dir}"/>
+            </classpath>
+
+            <group title="User API">
+                <package name="org.jmock"/>
+                <package name="org.jmock.builder"/>
+            </group>
+            <group title="Extension API">
+                <package name="org.jmock.core"/>
+                <package name="org.jmock.core.constraint"/>
+                <package name="org.jmock.core.matcher"/>
+                <package name="org.jmock.core.stub"/>
+                <package name="org.jmock.util"/>
+            </group>
+            <group title="Optional Extensions">
+                <package name="org.jmock.cglib"/>
+            </group>
+            <group title="Legacy API">
+                <package name="org.jmock.expectation"/>
+            </group>
+
+            <link href="http://java.sun.com/j2se/1.4.2/docs/api"/>
+            <link href="http://www.junit.org/junit/javadoc/3.8.1"/>
+            <link href="http://cglib.sourceforge.net/apidocs"/>
+        </javadoc>
+    </target>
+
+    <target name="javadoc.zip" depends="javadoc">
+        <mkdir dir="${build.dist.src.dir}"/>
+        <jar destfile="${javadoc.zip}" basedir="${build.dir}" 
includes="${build.javadoc.subdir}/**"/>
+    </target>
+
+
+
+       <!-- Continuous integration support -->
+
+       <target name="ci-build" 
depends="clean,test,jars,website,ci-build.deploy,ci.sync"/>
+
+       <target name="ci-build.deploy">
+               <copy todir="${deploy.dist.dir}">
+                       <fileset dir="${build.dist.dir}"/>
+               </copy>
+
+               <copy todir="${deploy.javadoc.dir}">
+                       <fileset dir="${build.javadoc.dir}"/>
+               </copy>
+
+               <copy todir="${deploy.website.dir}">
+                       <fileset dir="${build.website.dir}"/>
+               </copy>
+       </target>
+
+       <target name="ci.sync">
+               <get src="http://distci.codehaus.org/syncnow"; 
dest="build/sync-response.txt"/>
+       </target>
+</project>
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to