Build a Debian Package
In this tutorial we will create a Debian package for lesslog
. If this
program is installed, it will copy two binaries and a readme-file in
/usr/local/pgsql/bin/
. This will be done with this package.
- Create a directory for the package, e.g.
pglesslog
= package root-directory - Create every folder in this directory, e.g.
usr/local/pgsql/bin
- Move the binaryfiles where they ought to be stored,
usr/local/pgsql/bin
- Create a folder called
DEBIAN
in the package root-directory - Create a file named
control
in the folderDEBIAN
- This file stores the information for the package. One example how this file look like (For further details, see 1):
Package: pglesslog
Source: pglesslog
Version: 1.1
Section: misc
Priority: optional
Architecture: amd64
Depends: postgresql-8.3
Maintainer: Heinz Lang <email@wu.ac.at>
Description: lesslog - PostgreSQL logfile compressor
see /usr/local/pgsql/bin/README.lesslog
-
Create the package. Run the following command one level above the package root-directory
dpkg -b pglesslog pglesslog_amd64.deb
Leave a comment