diff --git a/.gitignore b/.gitignore
index e69de29..e1a2940 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/mockito-1.9.0.tar.xz
diff --git a/fix-cglib-refs.patch b/fix-cglib-refs.patch
new file mode 100644
index 0000000..19f8f21
--- /dev/null
+++ b/fix-cglib-refs.patch
@@ -0,0 +1,133 @@
+# HG changeset patch
+# Parent 65e60f677b3cb9c40d5d37e91ce6be1897c46370
+
+diff --git a/src/org/mockito/internal/creation/DelegatingMockitoMethodProxy.java b/src/org/mockito/internal/creation/DelegatingMockitoMethodProxy.java
+--- a/src/org/mockito/internal/creation/DelegatingMockitoMethodProxy.java
++++ b/src/org/mockito/internal/creation/DelegatingMockitoMethodProxy.java
+@@ -4,7 +4,7 @@
+ */
+ package org.mockito.internal.creation;
+
+-import org.mockito.cglib.proxy.MethodProxy;
++import net.sf.cglib.proxy.MethodProxy;
+
+ public class DelegatingMockitoMethodProxy extends AbstractMockitoMethodProxy {
+
+diff --git a/src/org/mockito/internal/creation/MethodInterceptorFilter.java b/src/org/mockito/internal/creation/MethodInterceptorFilter.java
+--- a/src/org/mockito/internal/creation/MethodInterceptorFilter.java
++++ b/src/org/mockito/internal/creation/MethodInterceptorFilter.java
+@@ -8,8 +8,8 @@
+ import java.io.Serializable;
+ import java.lang.reflect.Method;
+
+-import org.mockito.cglib.proxy.MethodInterceptor;
+-import org.mockito.cglib.proxy.MethodProxy;
++import net.sf.cglib.proxy.MethodInterceptor;
++import net.sf.cglib.proxy.MethodProxy;
+ import org.mockito.internal.MockitoInvocationHandler;
+ import org.mockito.internal.creation.cglib.CGLIBHacker;
+ import org.mockito.internal.invocation.*;
+diff --git a/src/org/mockito/internal/creation/MockitoMethodProxy.java b/src/org/mockito/internal/creation/MockitoMethodProxy.java
+--- a/src/org/mockito/internal/creation/MockitoMethodProxy.java
++++ b/src/org/mockito/internal/creation/MockitoMethodProxy.java
+@@ -4,7 +4,7 @@
+ */
+ package org.mockito.internal.creation;
+
+-import org.mockito.cglib.proxy.MethodProxy;
++import net.sf.cglib.proxy.MethodProxy;
+
+ public interface MockitoMethodProxy {
+
+diff --git a/src/org/mockito/internal/creation/SerializableMockitoMethodProxy.java b/src/org/mockito/internal/creation/SerializableMockitoMethodProxy.java
+--- a/src/org/mockito/internal/creation/SerializableMockitoMethodProxy.java
++++ b/src/org/mockito/internal/creation/SerializableMockitoMethodProxy.java
+@@ -6,7 +6,7 @@
+
+ import java.io.Serializable;
+
+-import org.mockito.cglib.proxy.MethodProxy;
++import net.sf.cglib.proxy.MethodProxy;
+ import org.mockito.internal.util.reflection.Whitebox;
+
+ public class SerializableMockitoMethodProxy extends AbstractMockitoMethodProxy implements Serializable {
+diff --git a/src/org/mockito/internal/creation/cglib/CGLIBHacker.java b/src/org/mockito/internal/creation/cglib/CGLIBHacker.java
+--- a/src/org/mockito/internal/creation/cglib/CGLIBHacker.java
++++ b/src/org/mockito/internal/creation/cglib/CGLIBHacker.java
+@@ -8,7 +8,7 @@
+ import java.lang.reflect.Field;
+
+ import org.mockito.internal.creation.MockitoMethodProxy;
+-import org.mockito.cglib.proxy.MethodProxy;
++import net.sf.cglib.proxy.MethodProxy;
+
+ public class CGLIBHacker implements Serializable {
+
+diff --git a/src/org/mockito/internal/creation/cglib/MockitoNamingPolicy.java b/src/org/mockito/internal/creation/cglib/MockitoNamingPolicy.java
+--- a/src/org/mockito/internal/creation/cglib/MockitoNamingPolicy.java
++++ b/src/org/mockito/internal/creation/cglib/MockitoNamingPolicy.java
+@@ -4,7 +4,7 @@
+ */
+ package org.mockito.internal.creation.cglib;
+
+-import org.mockito.cglib.core.DefaultNamingPolicy;
++import net.sf.cglib.core.DefaultNamingPolicy;
+
+ public class MockitoNamingPolicy extends DefaultNamingPolicy {
+
+diff --git a/src/org/mockito/internal/creation/jmock/ClassImposterizer.java b/src/org/mockito/internal/creation/jmock/ClassImposterizer.java
+--- a/src/org/mockito/internal/creation/jmock/ClassImposterizer.java
++++ b/src/org/mockito/internal/creation/jmock/ClassImposterizer.java
+@@ -7,8 +7,8 @@
+ import java.lang.reflect.*;
+ import java.util.List;
+
+-import org.mockito.cglib.core.*;
+-import org.mockito.cglib.proxy.*;
++import net.sf.cglib.core.*;
++import net.sf.cglib.proxy.*;
+ import org.mockito.exceptions.base.MockitoException;
+ import org.mockito.internal.creation.cglib.MockitoNamingPolicy;
+ import org.objenesis.ObjenesisStd;
+diff --git a/src/org/mockito/internal/creation/jmock/SerializableNoOp.java b/src/org/mockito/internal/creation/jmock/SerializableNoOp.java
+--- a/src/org/mockito/internal/creation/jmock/SerializableNoOp.java
++++ b/src/org/mockito/internal/creation/jmock/SerializableNoOp.java
+@@ -6,8 +6,8 @@
+
+ import java.io.Serializable;
+
+-import org.mockito.cglib.proxy.Callback;
+-import org.mockito.cglib.proxy.NoOp;
++import net.sf.cglib.proxy.Callback;
++import net.sf.cglib.proxy.NoOp;
+
+ public class SerializableNoOp implements NoOp, Serializable {
+
+diff --git a/src/org/mockito/internal/stubbing/defaultanswers/ReturnsSmartNulls.java b/src/org/mockito/internal/stubbing/defaultanswers/ReturnsSmartNulls.java
+--- a/src/org/mockito/internal/stubbing/defaultanswers/ReturnsSmartNulls.java
++++ b/src/org/mockito/internal/stubbing/defaultanswers/ReturnsSmartNulls.java
+@@ -9,8 +9,8 @@
+ import java.util.Arrays;
+
+ import org.mockito.Mockito;
+-import org.mockito.cglib.proxy.MethodInterceptor;
+-import org.mockito.cglib.proxy.MethodProxy;
++import net.sf.cglib.proxy.MethodInterceptor;
++import net.sf.cglib.proxy.MethodProxy;
+ import org.mockito.exceptions.Reporter;
+ import org.mockito.internal.creation.jmock.ClassImposterizer;
+ import org.mockito.internal.debugging.Location;
+diff --git a/src/org/mockito/internal/util/MockUtil.java b/src/org/mockito/internal/util/MockUtil.java
+--- a/src/org/mockito/internal/util/MockUtil.java
++++ b/src/org/mockito/internal/util/MockUtil.java
+@@ -4,8 +4,8 @@
+ */
+ package org.mockito.internal.util;
+
+-import org.mockito.cglib.proxy.Callback;
+-import org.mockito.cglib.proxy.Factory;
++import net.sf.cglib.proxy.Callback;
++import net.sf.cglib.proxy.Factory;
+ import org.mockito.exceptions.misusing.NotAMockException;
+ import org.mockito.internal.InvocationNotifierHandler;
+ import org.mockito.internal.MockHandler;
diff --git a/fixup-ant-script.patch b/fixup-ant-script.patch
new file mode 100644
index 0000000..51a4384
--- /dev/null
+++ b/fixup-ant-script.patch
@@ -0,0 +1,42 @@
+# HG changeset patch
+# Parent 5e1ff2ee5aa22b1c22238b520b3e6bd3b4aec0da
+
+diff --git a/build.xml b/build.xml
+--- a/build.xml
++++ b/build.xml
+@@ -42,6 +42,12 @@
+
+
+
++
++
++
++
++
++
+
+
+
+@@ -204,19 +210,14 @@
+
+
+
+-
+-
++
++
+
+
+
+
+-
+-
+-
+
+-
+-
+-
++
+
+
+
diff --git a/make-mockito-sourcetarball.sh b/make-mockito-sourcetarball.sh
new file mode 100644
index 0000000..54d1d6e
--- /dev/null
+++ b/make-mockito-sourcetarball.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+VERSION=1.9.0
+SRCDIR=mockito-${VERSION}
+
+hg clone https://code.google.com/p/mockito/ ${SRCDIR}
+cd $SRCDIR
+hg update ${VERSION}
+rm -rf `find -name *.jar` build.gradle cglib-and-asm conf doc gradle gradlew gradlew.bat
+dos2unix `find -name *.java`
+cd ..
+
+tar -cvJf mockito-${VERSION}.tar.xz ${SRCDIR}
diff --git a/maven-cglib-dependency.patch b/maven-cglib-dependency.patch
new file mode 100644
index 0000000..cf00851
--- /dev/null
+++ b/maven-cglib-dependency.patch
@@ -0,0 +1,15 @@
+diff --git a/maven/mockito-core.pom b/maven/mockito-core.pom
+--- a/maven/mockito-core.pom
++++ b/maven/mockito-core.pom
+@@ -29,6 +29,11 @@
+ objenesis
+ 1.0
+
++
++ cglib
++ cglib
++ 2.2
++
+
+
+
diff --git a/mockito.spec b/mockito.spec
new file mode 100644
index 0000000..193af90
--- /dev/null
+++ b/mockito.spec
@@ -0,0 +1,88 @@
+Name: mockito
+Version: 1.9.0
+Release: 3%{?dist}
+Summary: A Java mocking framework
+
+License: MIT
+URL: http://code.google.com/p/mockito/
+Source0: mockito-%{version}.tar.xz
+Source1: make-mockito-sourcetarball.sh
+Patch0: fixup-ant-script.patch
+Patch1: fix-cglib-refs.patch
+Patch2: maven-cglib-dependency.patch
+
+BuildArch: noarch
+BuildRequires: jpackage-utils
+BuildRequires: java-devel
+BuildRequires: ant
+BuildRequires: objenesis
+BuildRequires: cglib
+BuildRequires: junit4
+BuildRequires: hamcrest
+
+Requires: jpackage-utils
+Requires: java
+Requires: objenesis
+Requires: cglib
+Requires: junit4
+Requires: hamcrest
+
+%description
+Mockito is a mocking framework that tastes really good. It lets you write
+beautiful tests with clean & simple API. Mockito doesn't give you hangover
+because the tests are very readable and they produce clean verification
+errors.
+
+%package javadoc
+Summary: Javadocs for %{name}
+Group: Documentation
+Requires: jpackage-utils
+
+%description javadoc
+This package contains the API documentation for %{name}.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+ant jar javadoc
+
+%install
+mkdir -p $RPM_BUILD_ROOT%{_javadir}
+cp -p target/mockito-core-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
+
+install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
+install -pm 644 maven/mockito-core.pom \
+ $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
+
+mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+cp -rp target/javadoc $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
+
+%files
+%{_javadir}/%{name}.jar
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
+%doc NOTICE
+%doc LICENSE
+
+%files javadoc
+%{_javadocdir}/%{name}
+%doc LICENSE
+%doc NOTICE
+
+%changelog
+* Wed Feb 22 2012 Roman Kennke 1.9.0-3
+- Added cglib dependency to pom
+
+* Tue Feb 21 2012 Roman Kennke 1.9.0-2
+- Include upstream Maven pom.xml in package
+- Added missing Requires for cglib, junit4, hamcrest, objenesis
+- Added source tarball generating script to sources
+
+* Thu Feb 16 2012 Roman Kennke 1.9.0-1
+- Initial package
diff --git a/sources b/sources
index e69de29..8ab5632 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+c358a9b514bee558dd78eaaa5d18cc15 mockito-1.9.0.tar.xz