Tuesday, August 26, 2008

HOWTO: Create a debian metapackage

What's a metapackage?

A metapackage is a package which doesn't have any files to install, but depends on other files to make sure they are installed. A good example of a metapackage would be the gnome package in the Debian repos.

Why would you want to make one?

In my case, I need to make an easy way to get my Debian2Debian server/client setup. I need to install certain packages and scrit some stuff afterwards. Maybe you want to make one so that setting up a copy of your desktop on another computer will be easy. MAybe you just want to help a friend install some packages.

The process

This is really easy. Create a directory to hold your files and name it after the package.
mkdir mypackage
Fill the directory with the proper structure
mkdir mypackage/DEBIAN
touch mypackage/DEBIAN/control

Edit the control file so that it looks like this:
Package: mypackage
Version: 0.10
Section: main
Priority: optional
Architecture: all
Depends:
Installed-Size:
Maintainer: Daeng Bo
Description: A metapackage for Daeng
 Detailed description (optional, and notice the leading space)


Create the package by running
dpkg --build mypackage
from outside the directory.

Congratulations! You're finished. Install your .deb or send it to a friend.

2 comments:

  1. Something is missing...
    were do you mention the dependencies of the package ???

    Oz

    ReplyDelete
  2. On the "depends" line in the control file.

    ReplyDelete

Other I' Been to Ubuntu Stories

Related Posts with Thumbnails