Hi All,  :-)

Re: lxf118:

64studio was chosen as the top distro in the Lifestyle
Music Production section "Finding the perfect distro" article.
A very good review of 64studio is included.

Build Debian Packages:
If you find the Debian documentation a bit heavy to
begin with, this tutorial is a great way to get your feet muddy
with Debian package building. The packages are small and
quick to build, also the outcome leads you on to the next
natural step in package building.

Method:
I started off with two tiny shell scripts called,
helloworld & world like this.

#!/bin/bash
echo -n hello
world
#!/bin/bash
echo ' world'

$ chmod 755 helloworld
$ chmod 755 world

Assuming these scripts are in a directory that's on my
search path I can run helloworld and see the expected output.

$ mkdir ~/bin
Add search path to .bashrc
export PATH=/home/dave/bin:$PATH
$ . .bashrc

$ helloworld
hello world

Create the control file.

$ gedit ~/control
Add your details:

Package: world
Version: 1.1-1
Maintainer: Your Name [email protected]
Description: Program to print "world"
Section: utils
Priority: optional
Architecture: all
Depends: bash

$ cd; mkdir wdir; cd wdir
wdir$ mkdir -p debian/usr/local/bin/
wdir$ cp ~/bin/world debian/usr/local/bin/
wdir$ mkdir debian/DEBIAN/
wdir$ cp ~/control debian/DEBIAN/
wdir$ dpkg-deb --build debian/ .
dpkg-deb: building package world'
in./world_1.1-1_all.deb'.
wdir$ ls -l
total 8
debian
world_1.1-1_all.deb

$ cp wdir/world_1.1-1_all.deb pkg-mmm/

~/pkg-mmm$ ar x world_1.1-1_all.deb
~/pkg-mmm$ ls -l
control.tar.gz
data.tar.gz
debian-binary
world_1.1-1_all.deb

~/pkg-mmm$ tar tf data.tar.gz
./
./usr/
./usr/local/
./usr/local/bin/
./usr/local/bin/world

~/pkg-mmm$ tar tf control.tar.gz
./
./control

~/pkg-mmm$ lintian world_1.1-1_all.deb
E: world: dir-in-usr-local usr/local/bin/
E: world: file-in-usr-local usr/local/bin/world
W: world: file-in-unusual-dir usr/local/bin/world
E: world: no-copyright-file
E: world: extended-description-is-empty
E: world: maintainer-name-missing
Your Name [email protected]
E: world:
depends-on-essential-package-without-using-version
depends: bash

The second package (helloworld) is built in much the
same way with different details e.g. Depends: bash "world"
(control file details). If you try to install "helloworld"
without installing "world" first, dpkg refuses.
Similarly, with both packages installed, if you try to
remove "world" dpkg refuses.
Dependency management is working fine.
This howto is a good way to tackle package building at a root level.
The program lintian "lintian world_1.1-1_all.deb"
is showing that the packages would not be accepted into
the Debian distribution, more importantly it shows "why"
and "what" needs correcting. Now we can research:

http://www.debian.org/doc/maint-guide/

Using the messages produced by lintian as a guide.
- - - - - - - - - - - - - - -

The first packaging classroom
#ubuntu-classroom on irc.freenode.net was very good
and I'm looking forward to next weeks session.

http://ubuntupackaging.wordpress.com/

Cheers!
Dave.

Forum: Package-maintainers starter
http://www.64studio.com/node/995

_______________________________________________
64studio-devel mailing list
[email protected]
http://lists.64studio.com/mailman/listinfo/64studio-devel

Reply via email to