HOWTO: Ubuntu Packaging on Jaunty

I wanted to try and create an "official" Ubuntu package of an application that I used almost daily: gvpndialer

First, I read over the following:

OK, I now had a decent idea of what to do, so I set out to complete the task. First, I downloaded the source for gvpndialer from here:

Next, I extracted it and tried to compile, but found that I needed some packages:

sudo apt-get install libpcre3-dev
sudo apt-get install libgnomeui-dev

After getting those dependencies out of the way, I tried again but found it was still failing on pcre.h issues. I checked over the source, and in the end the following command fixed all the pcre.h issues:

grep -lre 'pcre/pcre.h' . | xargs -d'\n' sed -i 's/pcre\/pcre.h/pcre.h/g'

Ok, try it again...and this time it completed:

./ --prefix=/usr
sudo make install

...and then tried to launch it, and it worked.

So far so good, next I wanted to clean things up and begin the Ubuntu packaging

make clean
cd ..
tar -cvzf gvpndialer_1.1.orig.tar.gz gvpndialer-1.1
cd gvpndialer-1.1

Next, I'll use dh_make with some specific settings

dh_make -c gpl -s -b

And now it's time to clean up some extra files and edit others

cd debian
rm *ex *EX README.Debian dirs
gedit control&

I pasted in this example into the control file:

Source: gvpndialer
Section: misc
Priority: optional
Maintainer: thelupine
Build-Depends: cdbs, debhelper (>= 7), autotools-dev, libpcre3-dev, libgnomeui-dev
Standards-Version: 3.8.0

Package: gvpndialer
Architecture: i386
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: This is a GNOME2 GUI for the Cisco VPN client
This is a GNOME2 GUI for the Cisco VPN client

Next, I edited the rules file:

gedit rules

#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/
include /usr/share/cdbs/1/class/


Next was the changelog file:

gedit changelog

gvpndialer (1.1-1) jaunty; urgency=low
* Initial Jaunty release, with fixed pcre.h settings to build properly

-- thelupine Thu, 04 Jun 2009 21:02:09 -0400

Finally I edited the copyright file:


gedit copyright

This package was debianized by:

thelupine on Thu, 04 Jun 2009 21:02:09 -0400

It was downloaded from:

Upstream Author(s):

Stanley Kamithi



This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.

The Debian packaging is:

Copyright C) 2009, thelupine

and is licensed under the GPL, see above.

# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.

Almost done, just need to cd out and create the buildpackage

cd ..
dpkg-buildpackage -S -k########

....replace ######## with the gpg keyID, found by entering the command:

gpg --list-keys

I was prompted for, and entered my GPG key.

Last but not least, I changed out one more directory and dput my complated package:

cd ..
dput thelupine-ppa gvpndialer_1.1-1_source.changes

I then watched my PPA site, and waited for the file to completely upload and build:

That was about it. I now have a Jaunty enabled gvpndialer, that I can install anywhere I have my PPA setup and run:

sudo apt-get install gvpndialer

That's about it.