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.
- Move the binaryfiles where they ought to be stored,
- Create a folder called
DEBIANin the package root-directory
- Create a file named
controlin the folder
- 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 <firstname.lastname@example.org> 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