I'm packaging gwibber application for Debian and, as you may guess, it's python app. As I said before - you can use CDBS, but if you want to see your package in Debian repositories, sooner or later you will have to move it to python-support. If you still want to use CDBS you should look into gwibber package for Ubuntu - it's using CDBS (you could also collate Ubuntu package with Debian package). I think that page to which link I have provided earlier is a bit outdated, but it's still good source for learning how to build python application packages.
Let's look into gwibber source, shall we?
- Code: Select all
dget -x http://mentors.debian.net/debian/pool/main/g/gwibber/gwibber_1.2.0+bzr352-1.dsc
Now let's go into debian/ folder and see what do we've got there. Files which are relevant for us are debian/control and debian/rules. Don't hesitate to open them in your favorite editor. Which parts are important? I will bold them:
debian/control
Source: gwibber
Section: gnome
Priority: optional
Build-Depends: debhelper (>=7)
Build-Depends-Indep: python (>=2.5.4), python-distutils-extra, python-support (>=1.0)
Standards-Version: 3.8.1
Package: gwibber
Architecture: all || assuming that your package is arch independent ||
Depends: ${misc:Depends}, ${python:Depends}
debian/rules
#!/usr/bin/make -f
build:
clean:
dh_testdir
dh_testroot
rm -rf build
dh_clean install-stamp
install: install-stamp
install-stamp:
dh_testdir
dh_testroot
dh_prep
dh_installdirs
python setup.py install --root=$(CURDIR)/debian/pkg-name || assuming that you've got setup.py for your python app ||
touch $@
binary-arch:
binary-indep: install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installman pkg-name.1 || assuming that you've got man page for your package ||
dh_pysupport
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
As you see, it's not really harder than CDBS, is it? (:
Remember that this is only example and there are paths that you need to edit, and there might be some options that you will need enter but... I think that after some small changes, this should work (:
It's also a good idea to look into some other
debian packages of python application sources.