diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000000000000000000000000000000000000..e590a04e1fc9b60d2af69a6c9f22a3aeb9e4e572
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,27 @@
+scikit-learn (0.3-2) unstable; urgency=low
+
+  * Setting both HOME and MPLCONFIGDIR while building documentation
+    (slipped through fingers somehow) (Closes: #580727).
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Sat, 08 May 2010 00:35:59 -0400
+
+scikit-learn (0.3-1) unstable; urgency=low
+
+  * Fresh upstream release.
+  * Switching to use quilt for patches, debian/* tags point to detached
+    debian branch
+  * debian/rules:
+    + build docs after python modules got built
+    + additional cleanups
+  * debian/control:
+    + additional build-depends: python-matplotlib, ipython, swig,
+      libboost-dev
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Mon, 03 May 2010 12:25:21 -0400
+
+scikit-learn (0.2+svn625-1) unstable; urgency=low
+
+  * Initial Debian release (Closes: #567036)
+  * First ever package by me to adhere to use fresh and shiny dh.
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Wed, 07 Apr 2010 23:38:06 -0400
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000000000000000000000000000000000000..7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000000000000000000000000000000000000..e3b5753c341b2b0c7d4847ecd2794001c530ec42
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,48 @@
+Source: scikit-learn
+Section: python
+Priority: optional
+Maintainer: Experimental Psychology Maintainers <pkg-exppsy-maintainers@lists.alioth.debian.org>
+Uploaders: Yaroslav Halchenko <debian@onerussian.com>, Michael Hanke <michael.hanke@gmail.com>
+Build-Depends: debhelper (>= 7.0.50), python-all-dev (>= 2.5), python-support (>= 0.6), python-numpy-ext, python-scipy, libsvm-dev (>= 2.84.0), python-sphinx, graphviz, python-nose, python-setuptools, cython, python-matplotlib, ipython, swig, libboost-dev
+Standards-Version: 3.8.4
+Homepage: http://scikit-learn.sourceforge.net
+Vcs-Browser: http://github.com/yarikoptic/scikit-learn
+Vcs-Git: git://github.com/yarikoptic/scikit-learn.git
+XS-DM-Upload-Allowed: yes
+
+Package: python-scikits-learn
+Architecture: all
+Depends: ${misc:Depends}, ${python:Depends}, python-numpy, python-scipy, python-scikits-learn-lib(>= ${source:Version})
+Provides: ${python:Provides}
+XB-Python-Version: ${python:Versions}
+Recommends: python-nose, python-psyco, python-matplotlib
+Suggests: python-dap, python-scikits-optimization, python-scikits-learn-doc
+Description: Python modules for machine learning and data mining
+ scikit-learn is a collection of Python modules relevant to
+ machine/statistical learning and data mining.  Non-exhaustive list of
+ included functionality:
+  - Gaussian Mixture Models
+  - Manifold learning
+  - kNN
+  - SVM (via LIBSVM)
+
+
+Package: python-scikits-learn-doc
+Architecture: all
+Section: doc
+Depends: ${misc:Depends}, libjs-jquery
+Suggests: python-scikits-learn
+Description: documentation and examples for scikit-learn
+ This package contains documentation and example scripts for
+ python-scikits-learn.
+
+
+Package: python-scikits-learn-lib
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}, python-numpy
+Provides: ${python:Provides}
+XB-Python-Version: ${python:Versions}
+Description: low-level implementations and bindings for scikits-learn
+ This is an add-on package for python-scikits-learn. It provides
+ low-level implementations and custom Python bindings for the LIBSVM
+ library.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000000000000000000000000000000000000..1cd5e7c02351d475ff89836fcd026e85a49b3e00
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,50 @@
+Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat
+Upstream-Name: scikit-learn
+Upstream-Source-Location: http://sourceforge.net/apps/trac/scikit-learn/wiki/SubversionRepo
+
+Files: *
+Copyright: Copyright (C)  2007 - 2010 Scikit-Learn Developers.
+License: BSD-3
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are met:
+
+  a. Redistributions of source code must retain the above copyright notice,
+     this list of conditions and the following disclaimer.
+  b. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+  c. Neither the name of the Scikit-learn Developers  nor the names of
+     its contributors may be used to endorse or promote products
+     derived from this software without specific prior written
+     permission.
+On Debian GNU/Linux systems, the complete text of the 3-clause BSD License
+can be found in `/usr/share/common-licenses/BSD'.
+
+Files: doc/sphinxext/*
+Copyright: Copyright (C) 2008 Stefan van der Walt <stefan@mentat.za.net>, Pauli Virtanen <pav@iki.fi>
+License: BSD
+  1. Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+
+Files: debian/*
+Copyright: Copyright 2010,
+    Yaroslav Halchenko <debian@onerussian.com>
+License: GPL-2
+  On Debian GNU/Linux systems, the complete text of the GPL-2 License
+  can be found in `/usr/share/common-licenses/GPL-2'.
+
+Files: ./scikits/learn/src/
+Copyright: Copyright (c) 2000-2009 Chih-Chung Chang and Chih-Jen Lin
+License: BSD-3
+  The source tarball contains a partial copy of the LIBSVM package.  However,
+  the corresponding library is available from the libsvm source package (or
+  rather the binary packages it builds). Therefore this code is not used and
+  the respective packages are used as dependencies. This copy of the libsvm
+  code is, however, left in place, as it does not hurt and does not justify
+  repackaging of the upstream sources.
+On Debian GNU/Linux systems, the complete text of the 3-clause BSD License
+can be found in `/usr/share/common-licenses/BSD'.
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000000000000000000000000000000000000..b7779f01612038bfcb232a648bb3710ef517c89a
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,25 @@
+[DEFAULT]
+# the default build command:
+builder = debuild -i'\.(git\.*|gbp.conf|gitignore)'
+# the default clean command:
+cleaner = fakeroot debian/rules clean
+# the default branch for upstream sources:
+upstream-branch = master
+# the default branch for the debian patch:
+debian-branch = debian-release
+# the default tag formats used:
+upstream-tag = %(version)s
+debian-tag = debian/%(version)s
+
+# Options only affecting git-buildpackage
+[git-buildpackage]
+# ignore some any non-gitted files
+ignore-new = True
+#upstream-branch = dfsgclean
+# uncomment this to automatically GPG sign tags
+sign-tags = True
+# use this for more svn-buildpackage like bahaviour:
+export-dir = ../build-area/
+tarball-dir = ../tarballs/
+
+
diff --git a/debian/patches/deb_use_system_libraries b/debian/patches/deb_use_system_libraries
new file mode 100644
index 0000000000000000000000000000000000000000..5820e1f77abfddae7faa7535c6012a09ac7cab20
--- /dev/null
+++ b/debian/patches/deb_use_system_libraries
@@ -0,0 +1,18 @@
+--- a/site.cfg
++++ b/site.cfg
+@@ -1,8 +1,8 @@
+ # uncomment this to compile libraries that depend on boost
+-# [boost]
+-# use_boost=True
++[boost]
++use_boost=True
+ 
+-# [libsvm]
+-# libraries=svm
+-# library_dirs=/usr/lib
+-# include_dirs=/usr/include/libsvm-2.0/libsvm
+\ No newline at end of file
++[libsvm]
++libraries=svm
++library_dirs=/usr/lib
++include_dirs=/usr/include/libsvm-2.0/libsvm
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000000000000000000000000000000000000..85c1c0e58fccd9976ece06c88c03860d5199450c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+deb_use_system_libraries
diff --git a/debian/pycompat b/debian/pycompat
new file mode 100644
index 0000000000000000000000000000000000000000..0cfbf08886fca9a91cb753ec8734c84fcbe52c9f
--- /dev/null
+++ b/debian/pycompat
@@ -0,0 +1 @@
+2
diff --git a/debian/python-scikits-learn-doc.docs b/debian/python-scikits-learn-doc.docs
new file mode 100644
index 0000000000000000000000000000000000000000..7123782bcecba10376941dd2b3937eed90fbe0e0
--- /dev/null
+++ b/debian/python-scikits-learn-doc.docs
@@ -0,0 +1 @@
+doc/_build/html
diff --git a/debian/python-scikits-learn-doc.examples b/debian/python-scikits-learn-doc.examples
new file mode 100644
index 0000000000000000000000000000000000000000..e39721e20f0708703dc6d9b607634636d625e9b2
--- /dev/null
+++ b/debian/python-scikits-learn-doc.examples
@@ -0,0 +1 @@
+examples/*
diff --git a/debian/python-scikits-learn-doc.links b/debian/python-scikits-learn-doc.links
new file mode 100644
index 0000000000000000000000000000000000000000..2d066cc2ddb3ba8c4b50457538549d7a0899602a
--- /dev/null
+++ b/debian/python-scikits-learn-doc.links
@@ -0,0 +1 @@
+usr/share/javascript/jquery/jquery.js usr/share/doc/python-scikits-learn-doc/html/_static/jquery.js
diff --git a/debian/pyversions b/debian/pyversions
new file mode 100644
index 0000000000000000000000000000000000000000..b3dc41ebcd3c727b1db7817a87949ee7e1adcf51
--- /dev/null
+++ b/debian/pyversions
@@ -0,0 +1 @@
+2.5-
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000000000000000000000000000000000000..300f95076e207e5503fb81ec882eda005df2605c
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,62 @@
+#!/usr/bin/make -f
+# -*- mode: makefile; coding: utf-8 -*-
+
+PACKAGE_NAME = python-scikits-learn
+PACKAGE_ROOT_DIR = debian/${PACKAGE_NAME}
+
+PYVERS = $(shell pyversions -vs)
+PYVER = $(shell pyversions  -vd)
+
+# Mega rule
+%:
+	dh $@
+
+# Build docs during build
+override_dh_auto_build:
+	dh_auto_build
+	: # Build Documentation
+ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
+	export PYTHONPATH=`/bin/ls -d $$PWD/build/lib.*$(PYVER)` MPLCONFIGDIR=$(CURDIR)/build HOME=$(CURDIR)/build; \
+	 cd doc; $(MAKE) html
+endif
+
+
+override_dh_clean:
+	rm -rf build doc/_build doc/auto_examples *-stamp scikits.learn.egg-info scikits/learn/datasets/__config__.py
+	dh_clean
+
+# Prune toplevel scikits/__init__.py to avoid conflicts across future
+# scikits- packages, and rely on pysupport to create such one if
+# necessary
+override_dh_auto_install: ${PYVERS:%=python-install%}
+	find debian -wholename \*scikits/__init__.py -delete
+
+# Per Python version logic -- install, test, move .so into -lib
+python-install%:
+	python$* setup.py install --install-layout=deb --root=$(PACKAGE_ROOT_DIR)
+
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+	: # Run unittests
+	python$* /usr/bin/nosetests --exclude manifold \
+	  $(PACKAGE_ROOT_DIR)/usr/lib/python$*/*/scikits/learn
+else
+	: # Skip unittests due to nocheck
+endif
+
+	: # Move platform-specific libraries into -lib
+	for lib in $$(find $(PACKAGE_ROOT_DIR)/usr -name '*.so'); do \
+	   sdir=$$(dirname $$lib) ; \
+	   tdir=$(PACKAGE_ROOT_DIR)-lib/$${sdir#*$(PACKAGE_NAME)/} ; \
+	   mkdir -p $$tdir ; \
+	   echo "Moving '$$lib' into '$$tdir'." ; \
+	   mv $$lib $$tdir ; \
+	done
+
+## immediately useable documentation and exemplar scripts/data
+override_dh_compress:
+	dh_compress -X.py -X.html -X.pdf -X.css -X.jpg -X.txt -X.js -X.json -X.rtc
+
+override_dh_installdocs:
+	: # Use jquery from Debian package, so prune shipped one
+	-rm doc/_build/html/_static/jquery.js
+	dh_installdocs -A AUTHORS README
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000000000000000000000000000000000000..163aaf8d82b6c54f23c45f32895dbdfdcc27b047
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000000000000000000000000000000000000..6aa16558b0eed5fb62d5d27e92d153065bee8eba
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://github.com/yarikoptic/scikit-learn/downloads .*tarball/([\d\.a-z]+)