Sunday, June 17, 2012

Applications Not in Chakra

Every so often I run across an application that I want to install, but it isn't part of the Chakra repositories (the official or community). Sometimes this can be dealt with by using the Chakra supplied converter.

aur2ccr application_name

The converter doesn't come as part of the standard installation, so you'll have to install it yourself.

ccr -S aur2ccr

Be warned though, the Chakra team supplies this only in recognition that there might be the occasional application in the AUR system that someone just can't live without. Always make certain that the application that you are looking for doesn't already exist in the CCR. There, I've done my bit of warning, so let's carry on.

Sometimes the AUR just doesn't have the application that you're looking for, or it isn't the latest version, or perhaps you're just trying to update the version that you have already converted over. What ever the reason, let's go through the steps of building up an application from the source code. There is no code writing here for this.

The first step is fairly obvious. Download the source code from the developer's site, verify that you have everything, and decompress it to your packaging location. You'll also need to verify that you have satisfied all of the dependencies necessary for the application build.

Assuming that you've made it this far, make sure you type the following commands in the main directory of the source. This location for me looks something like this: ~/packages/application_name/.

./configure --prefix=/usr 
make

Assuming success by this point, the next step would be to check the build.

make check

For Chakra, you'll need next to make a package so you can install it.

makepkg -s

The -s will use sudo to auto install any remaining dependencies that you may have missed. This command will fail if you don't have a PKGBUILD file set up. If this is coming from the AUR, then it will already have one. Otherwise, you can copy the default one.

cp /usr/share/pacman/PKGBUILD.proto PKGBUILD

If you're not sure what to change in the PKGBUILD file, then I can only suggest that you take a look at one that works.

Now we can install the application and see if it works.

sudo pacman -U application_package_filename

Once you've verified that it works, you might want to share it with others. Just in case someone else might be interested in the application that you've spent all this time on. Before you can share it, you need to make the necessary file.

makepkg --source

If you need checksums for the packages, you can use the following to get what you need.

makepkg -g

Once you have this file, you can upload it to the CCR. You've now become one of the Chakra community contributors. Have fun.

No comments: