In this document you will find out how tweak KDE 2.2.2 to the max, optimize it for your machine and make nice packages out of it. If you are not interested in tweaking KDE you can easily skip the tuning part, and just read how to configure, compile and make Slackware packages with KDE 2.2.2.
I will also provide all the necessary scripts for you, so compiling KDE and making packages will be really easy.
The default (shipped with Slackware 8.0) packaging tools are used (v1.1), because as reported on Slackware’s Forum the new tools (which can be found under current-tree) are little buggy yet.
When they become bugs free I will update the scripts to reflect the newer version.
General note on making packages
So you have compiled some application with your favorite settings and you would like to make a package out of it?
It’s not a difficult task in general but there are some issues you should be aware of.
The main problem with packages is that not all applications will easily install into different location than the –prefix set during configure. However there are a few methods to do this automatically with ‘make install’, and also a few to do it manually. Personally I prefer the first method :>
The trick is to run make install with a variable which will tell make where to install the application. The variable could be one of the following: prefix, PREFIX or DESTDIR. These in most cases are sufficient, however there are some applications (e.g. Lilo) which use different variable names (Lilo uses ROOT). There are also others like: execprefix, INSTALLDIR, INSTALLROOT (or installdir, install_root), ROOTDIR, etc.
So how to discover such situations? Simply run ‘make install’ with the -n switch. This will not install the application it will just print the output of the scripts to the screen, so you can see if the given variable is working.
# make -n prefix=/tmp/package-name/usr/local install
# make -n DESTDIR=/tmp/package-name install
Usually the prefix works, if it doesn’t try DESTDIR. If this also will not work try PREFIX. If all the methods (prefixes) fail look into the Makefile and see what the variable name of installation’s prefix is.
Note: As you’ve probably noticed, when prefix is used with make, you must append prefix used during configure (eg. ./configure –prefix=/usr/local), this is not required or even you must not do it when using DESTDIR.
But do not rely on prefix or DESTDIR (and others prefixes) in 100%. There are some applications, which will properly install into given ‘prefixed location’ but not all of their components will be installed there as expected. For example: freetype-1.3 is such application. Its binaries, include files and libraries are installed in the prefix we set, but the locale files go directly into your /usr/share/locale directory.
To fix it (in case of freetype-1.3) pass –with-locale-dir=/tmp/package/usr during configure. If some applications do not provide that easy method of resolving such situations, you can always edit the install-sh or configure scripts on your own or just copy the files after installation to your package directory, make a package out of it and install.
Freetype-1.3 and its locales are just an example to give you a view on problems you could meet during making packages.
My general advice is to check all configure options and run for the first time make -n install (with given prefix) and see what it will display (if you’ve never installed given application and you don’t know its ‘hidden tricks’).
Now, if you have everything into your package directory, the rest is easy. You just use makepkg, to make your own package and installpkg to install it.
# cd /tmp/package-name
# makepkg package-name.tgz
I will not describe here how to use packaging tools shipped with Slackware.
If you would like to know more about making packages you should read the tutorial “Getting to know Slackware packaging tools” written by Jesper Juhl, which describes in detail how to use it.
But let’s get back to KDE now, which installs perfectly with DESTDIR.