July 2009
PBuilder is a program to create chroot jails to build Debian packages in.
sudo apt-get install pbuilder
sudo pbuilder create --debootstrapopts --variant=buildd
mv hello-world-1.0.tar.gz ~/packaging
cd !$
tar zxvf hello-world-1.0.tar.gz
cd hello-world-1.0.tar.gz
export DEBEMAIL=j.bokma@rug.nl
export DEBFULLNAME="Jurjen Bokma"
dh_make --createorig
Type of package: single binary, multiple binary, library, kernel module or cdbs?
[s/m/l/k/b] s
Maintainer name : Jurjen Bokma
Email-Address : j.bokma@rug.nl
Date : Sun, 12 Jul 2009 16:30:07 +0200
Package Name : hello-world
Version : 1.0
License : blank
Using dpatch : no
Type of Package : Single
Hit <enter> to confirm:
Done. Please edit the files in the debian/ subdirectory now. hello-world
uses a configure script, so you probably don't have to edit the Makefiles.
Now edit debian/{changelog,control,copyright,manpage.xml}
, and delete the superfluous:
rm debian/*.ex debian/*.EX debian/README.Debian
cp /etc/pbuilderrc ~/.pbuilderrc
pdebuild --buildresult ..
<lengthy output snipped>
dpkg --info ../hello-world_1.0-1_i386.deb
new debian package, version 2.0.
size 3322 bytes: control archive= 570 bytes.
403 bytes, 12 lines control
203 bytes, 3 lines md5sums
Package: hello-world
Version: 1.0-1
Architecture: i386
Maintainer: Jurjen Bokma <j.bokma@rug.nl>
Installed-Size: 48
Depends: libc6 (>= 2.1.3), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.2.1)
Section: unknown
Priority: extra
Homepage: <insert the upstream URL, if relevant>
Description: Trivial HelloWorld program in C++
HelloWorld will display the text "Hello, world!"
on stdout. The newline is included.
![]() | Note |
---|---|
Now check out Conference under Docker to see how this package is modified, so we can then repackage the modified package. |
cp hello-world-1.1.tar.gz ~/packaging
cd hello-world-1.0/
uupdate -u ../hello-world-1.1.tar.gz
New Release will be 1.1-0ubuntu1.
Symlinking to pristine source from hello-world_1.1.orig.tar.gz...
-- Untarring the new sourcecode archive ../hello-world-1.1.tar.gz
Success! The diffs from version 1.0-1 worked fine.
Remember: Your current directory is the OLD sourcearchive!
Do a "cd ../hello-world-1.1" to see the new package
cd ../hello-world-1.1
dch -v 1.1-1
And describe all changes in the changelog
pdebuild --buildresult ..
<Huge output snipped once again>