Creating debian packages with setup.py

ncode@karoly:~/Devel/sica$ sudo apt-get install devscripts

ncode@karoly:~/Devel/sica$ find *
src
src/plugin
src/plugin/sica.py
src/sica.conf

ncode@karoly:~/Devel/sica$ vim setup.py
#!/usr/bin/python
from distutils.core import setup
setup(name='sica',
      version='0.0.1',
      description='Collectd Plugin',
      author='Juliano Martinez',
      author_email='juliano@martinez.io',
      url='https://github.com/ncode/sica',
      data_files=[('/etc/collectd/plugins.d', ['src/sica.conf']),
                        ('/usr/share/collctd/modules', ['src/plugin/sica.py'])]

      )

ncode@karoly:~/Devel$ mv sica sica-0.0.1
ncode@karoly:~/Devel$ cd sica-0.0.1/

ncode@karoly:~/Devel/sica-0.0.1$ dh_make -n -s
Maintainer name : Juliano Martinez
Email-Address : juliano@martinez.io
Date : Tue, 31 Jan 2012 11:23:04 -0200
Package Name : sica
Version : 0.0.1
License : gpl3

Using dpatch : no
Type of Package : Single
Hit <enter> to confirm:
Currently there is no top level Makefile. This may require additional tuning.
Done. Please edit the files in the debian/ subdirectory now. You should also
check that the sica Makefiles install into $DESTDIR and not in / .

ncode@karoly:~/Devel/sica-0.0.1$ dch -i

sica (0.0.1-1) stable; urgency=low

      * Building to stable

-- Juliano Martinez <juliano@martinez.io>  Tue, 31 Jan 2012 11:27:45 -0200

sica (0.0.1) unstable; urgency=low

  * Initial Release.

 -- Juliano Martinez <juliano@martinez.io>  Tue, 31 Jan 2012 11:23:04 -0200

ncode@karoly:~/Devel/sica-0.0.1$ vim debian/control
Source: sica
Section: python
Priority: extra
Maintainer: Juliano Martinez <juliano@martinez.io>
Build-Depends: debhelper (>= 7.0.50~)
Standards-Version: 3.8.4
Homepage: https://github.com/ncode/sica

Package: sica
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Collectd Plugin
 Collectd Plugin

ncode@karoly:~/Devel/sica-0.0.1$ dpkg-buildpackage -us -uc -rfakeroot

ncode@karoly:~/Devel/sica-0.0.1$ dpkg -c ../sica_0.0.1_amd64.deb
drwxr-xr-x root/root         0 2012-01-31 11:23 ./
drwxr-xr-x root/root         0 2012-01-31 11:23 ./etc/
drwxr-xr-x root/root         0 2012-01-31 11:23 ./etc/collectd/
drwxr-xr-x root/root         0 2012-01-31 11:23 ./etc/collectd/plugins.d/
-rw-r--r-- root/root       344 2012-01-31 00:29 ./etc/collectd/plugins.d/sica.conf
drwxr-xr-x root/root         0 2012-01-31 11:23 ./usr/
drwxr-xr-x root/root         0 2012-01-31 11:23 ./usr/share/
drwxr-xr-x root/root         0 2012-01-31 11:23 ./usr/share/pyshared/
-rw-r--r-- root/root       247 2012-01-31 11:23 ./usr/share/pyshared/sica-0.0.1.egg-info
drwxr-xr-x root/root         0 2012-01-31 11:23 ./usr/share/collctd/
drwxr-xr-x root/root         0 2012-01-31 11:23 ./usr/share/collctd/modules/
-rw-r--r-- root/root       949 2012-01-31 01:20 ./usr/share/collctd/modules/sica.py
drwxr-xr-x root/root         0 2012-01-31 11:23 ./usr/share/doc/
drwxr-xr-x root/root         0 2012-01-31 11:23 ./usr/share/doc/sica/
-rw-r--r-- root/root       190 2012-01-31 11:23 ./usr/share/doc/sica/README.Debian
-rw-r--r-- root/root      1815 2012-01-31 11:23 ./usr/share/doc/sica/copyright
-rw-r--r-- root/root       143 2012-01-31 11:23 ./usr/share/doc/sica/changelog.gz
drwxr-xr-x root/root         0 2012-01-31 11:23 ./usr/share/python-support/
-rw-r--r-- root/root        40 2012-01-31 11:23 ./usr/share/python-support/sica.public