So just for this guide, I am going to make the metapackage depend on some of the packages I use:
- mc
- audacious
- erlang-base
- lynx
- geany
- sshfs
- dsniff
- aircrack-ng
- nmap
- wine
First of, you need to make the directory structure to hold the files for your metapackage. The directory’s name should be the same as the package name. In this example, the package name is bredsaal-laptop:
mkdir -p ~/packages/bredsaal-laptop/DEBIAN
Now create the two files necesary for the metapackage to build:
cd ~/packages/bredsaal-laptop/DEBIAN; touch postinst; touch control
Insert the following text into the control file:
Package: bredsaal-laptop
Version: 0.1
Section: main
Priority: optional
Architecture: all
Depends: mc, audacious, erlang-base, lynx, geany, sshfs, dsniff, aircrack-ng, nmap, wine
Installed-Size:
Maintainer: Jannich Brendle
Description: A metapackage just for me.
And this text into the postinst file:
#!/bin/sh
# postinst script for bredsaal_laptop
#
# see: dh_installdeb(1)
set -e
case "$1" in
configure)
## Perhaps something needs to be configured in the future.
echo "Congratulations."
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument `$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
Now, to gererate your metapackage:
cd ~/packages/; chmod 555 bredsaal-laptop/DEBIAN/postinst; dpkg-deb -b bredsaal-laptop bredsaal-laptop.deb
Now, your package should build and be ready to install like this:
sudo gdebi bredsaal-laptop.deb
Related posts:
- Torchlight under Wine on Ubuntu 9.10
- Installing apt-p2p on Ubuntu
- Running Charon in Wine
- Downloading YouTube videos using Debian or Ubuntu
- Installing java on a virtual private server (debian)
Tags: debian, linux, metapackages





Thank you… needed to know how to build the control file.
Glad I could help.
Hi Jannich, it seems this is not really for beginners in debian, is it?
My name is Piter Jankovich. oOnly want to tell, that your blog is really cool
And want to ask you: is this blog your hobby?
P.S. Sorry for my bad english
@Seo Packages: Well, I guess it could be easier, but it’s not really that hard to make a meta-package, if you just follow the instructions above.
@PiterJankovich: Thanks a lot. And yes, my blog is a hobby, and I don’t really make any money off of it.
It’s a great guide, no doubt i’ll do it wrong a thousand times and come back to bother you.
You’re more than welcome Grant.