Saturday, February 22, 2014

Tutorial: Create Unofficial Midnight Commander package for Debian 7.x

This is a quick hack on how to create debian package using Midnight Commander as an example. The Midnight Commander version that I am using here is MP version. The MP version is without glib dependency.

Midnight commander MP version get from here.
Update 2023: older link above is not exist anymore. Try this link.



I am using version 4.1.40pre9.

$ tar xzvfp mc-4.1.40-pre9.tar.gz
...
cd mc-4.1.40-pre9/
mc-4.1.40-pre9$ ./configure --prefix=/usr

checking whether make sets ${MAKE}... yes
checking for gcc... gcc
...

mc-4.1.40-pre9$ make
mc-4.1.40-pre9$ make DESTDIR=/tmp/mc install
mc-4.1.40-pre9$ cat > control <<-EOF
Package: mcmp
Priority: optional
Section: utilities
Installed-Size: 45
Maintainer: fuyichin <fuyichin@gmail.com>
Architecture: i386
Version: 4.1.40-pre9
Description: midnight commander
this is more powerful version without glib.
EOF

Create the debian package:
mc-4.1.40-pre9$ install -d /tmp/mc/DEBIAN
mc-4.1.40-pre9$ install control /tmp/mc/DEBIAN/.
mc-4.1.40-pre9$ dpkg -b /tmp/mc mc-4.1.40pre9.deb
mc-4.1.40-pre9$ ls mc-4.1.40pre9.deb
mc-4.1.40pre9.deb

mc-4.1.40-pre9$ sudo dpkg -i mc-4.1.40pre9.deb

No comments: