Translation(s): English - Français - ?Italiano


Introduction

I assume that an empty package is the easiest package.

One easy tool for creating small packages is equivs.

Here we will see how to create easily an empty debian binary package.

Then we will see that it can be usefull to install some packages.

First empty package

aptitude show

Control that the chosen name for the package is not already used by some other package

# aptitude show package-minimal
E: Unable to locate package package-minimal

equivs-control

equivs-control generates a file which is close to debian/control in a debian source package.

$ equivs-control package-minimal
$ ls
package-minimal

You have to edit the file to modify and uncomment some lines.

$ more package-minimal 
Package: package-minimal
Version: 1.0
Maintainer: a a <a@a.a>

equivs-build

You can then create an empty Debian binary package.

$ equivs-build package-minimal 
$ ls
package-minimal  package-minimal_1.0_all.deb

you can control that it is lintian clean!

$ lintian package-minimal_1.0_all.deb
$

Installing the package

You have to have root/sudo access to use dpkg -i

# dpkg -i p*.deb

However, everyone can use aptitude show.

$ aptitude show package-minimal
Package: package-minimal                 
New: yes
State: installed
Automatically installed: no
Version: 1.0

Removing the package

Remove the package:

# aptitude remove package-minimal

Make sure the package was removed:

# aptitude show package-minimal
E: Unable to locate package package-minimal

Install some packages

You have to create a local repository to use aptitude.

Choose a name for the package that is not already used (aptitude show).

$ more package-depends
Package: package-depends  
Version: 1.0
Maintainer: a a <a@a.a>
Depends: lintian, packaging-tutorial

You have to install the package with aptitude.

# aptitude install package-depends

If you remove the package then the dependencies will also be removed!

What's next

You can package ?some files.

Documentation