First example we will compile xfce-theme-manager, this method applies to packages that contain a file called "configure" and is the most common:
1.Download the source package from here
2.Unpack it and enter the directory (if you are using a file manager then right click and choose "open terminal here"
3.enter the following in the terminal:
Code: Select all
./configure
Code: Select all
make
Code: Select all
su
Code: Select all
make install DESTDIR=/tmp/xfce-theme-manager-0.3.4
Code: Select all
makepkg ../xfce-theme-manager-0.3.4.tgz
The next way is using cmake, you will know its cmake if it has a file called CMakeLists.txt, I cant find a package at the moment that uses cmake for an example (ill try to remember to update this post next time I come across one) but this is how it goes:
1.unpack the source and enter the directory
2.make a directory called build
Code: Select all
mkdir build
Code: Select all
cd build
Code: Select all
cmake ..
Code: Select all
make
Code: Select all
su
Code: Select all
make install DESTDIR=/tmp/package-name
The last method I will cover is using slackbuilds. You can find a whole bunch of packages available at http://slackbuilds.org for the example lets use ffmpeg:
1.Search for ffmpeg at slackbuilds.org
2.download the source package and the slackbuild
3.unpack the slackbuild and copy the source package into the directory
4.we need to make sure the slackbuild file is executable to enter in terminal:
(keep in mind it is case sensitive)
Code: Select all
chmod +x ffmpeg.SlackBuild
Code: Select all
su
Code: Select all
./ffmpeg.SlackBuild
6.Convert to module
Hope this will help anyone that wants to get started compiling their own packages. This is just a beginners guide and as you compile more you will come across other methods of compilation as well as the need to use arguments in the configuring of a package (like selecting architecture and base directories), just remember to read the INSTALL file.
Good luck!