Packaging tutorial

From MEPIS Documentation Wiki

Jump to: navigation, search

!!! Warning! The info contained in this article pertains to older versions of MEPIS !!!
There may still be some valuable material here, but the current methods are described in the MEPIS Package Building Guide.


This is a short tutorial for creating .deb packages "Debian style." For detailed information please refer to: http://women.debian.org/wiki/English/PackagingTutorial and http://women.debian.org/wiki/English/BuildingWithoutHelper tutorials. For a GUI packaging helper you can download this program: Debian Package Tools FE

Preconfiguration

Run this command in konsole (as root) to install the required packages:

apt-get install build-essential devscripts dh-make fakeroot autotools-dev

You can also install some usually needed dev packages:

apt-get install xorg-dev libqt3-mt-dev kdelibs4-dev

Add in ~/.bashrc these environment variables:

export DEBEMAIL=your@email.address  
export DEBFULLNAME="Your name" 

These variables will be used by dh_make. Then run in terminal:

source ~/.bashrc

Prepare the package

1. Untar the package you want to compile, open konsole in the folder created (press F4 in the file manager)


2. Run:

dh_make -s -n 

( -s option is for creating a single binary .deb package, -n for native Debian package)


3. Change directory to debian

cd debian


4. If you don't need any special configuration you can delete all *.ex (example) files. You can also edit the copyright and control files to add info about the license, authors, and a short package description.

Compile

Run this command to create the binary package:

debuild -us -uc -b

If the compilation is successful you will find the .deb package in the parent folder.

Personal tools