There’s been some interest in both email and comments on how I create the RPMs for SuSE 9.2 x8664 which don’t come on the standard distribution or thoes that I create to bring my system up to the latest versions (A link for downloads of the files discussed in this article appear at the end). Although the discussion follows making gaim RPMs, the details here will help you build any RPM for SuSE Linux 9.2 x8664.
I’m not going to go into the specifics of writing spec files for Linux RPMs in this article. On thing I hate about so many of the technical books out there is that they waste an entire chapter (or more) on obtaining, installing, and configuring the program they are talking about instead of focusing on using the utility on which the book is based. It’s a waste of trees and due to the increased page count of the book, there’s a perceived reasoning on behalf of the publisher to artificially raise the price of the book. The section gets read at most once if ever and in my oppinion, is a waste of everyone’s time. The proper proceedure, in my oppinion is to refrence another title or provide suggestions on where to look on the web or other resource center for instructions (ie. www.rpm.org in the case of rpm…). I assume that most readers are intellegent enough to figure out a lot of things for themselves…. If you would like to read more about making RPMs for your system, please visit www.rpm.org, and check out the documentation and Maximum RPM. Maximum RPM is a bit dated but all the information for making basic RPMs is correct and contained therein.
First, if you’re going to make an RPM for a distro of your choice where one doesn’t exist already, you can create a spec file for your needs from scratch or not re-invent the wheel and start with an existing RPM spec file from another Linux ditribution. The latter is what I chose to do with the gaim and gaim-encryption RPMs I build for SuSE 9.2 x86_64. I went to the download section of gaim.sourceforge.net and downloaded the SRPM for gaim, then to gaim-encryption.sourceforge.net where I downloaded the same for the gaim-encryption RPM.
Dependancies for creation and runtime of an RPM are listed in the
Requires: spec file tags. Different distributions create packages and sub-packages with different names. There is no (nor should there be, IMO) LSB specification on many of the upper level application package names on a distribution. Because of this, you might need to change the package names on either or both of these lines.
For SuSE 9.2, I have the following for the gaim.spec:
Requires: gtk2 >= 2.0.0, mozilla, audiofile, libao BuildRequires: libao-devel, gtk2-devel, libtool, audiofile-devel, pkgconfig, mozilla-devel
After making the changes above, the compile failed again but with an error saying that it could not find the right libraries to link agianst, refrenceing
/usr/lib rather than
/usr/lib64 for the 64 bit libraries.
You can tell configure what directories to use for paths by exporting the nessasery flags that are used by gcc/ld before calling confugure:
CFLAGS="$RPM_OPT_FLAGS -L/usr/lib64" LDFLAGS="-L/usr/lib64" ./confuigure...
At this point, the compile completes and I was able to install and run gaim! Whoo hoo! Or at least I thuoght… After installing this gaim plus it’s devel packages (needed to compile any plugins) , I was ready to go through the same steps with the gaim-encryption RPM only to find out that the gaim-encryption plugin was not recognized by gaim after doing so. A look into why things were not working reviled that the libraries for encryption used by gaim (mozilla’s nss libraries) are in
/opt/mozilla/lib64 which is not a standard system library path.
You should not have to modify the system library path just to get a small program to run correctly so in order to help gaim-encryption correcly find it’s libraries, you set the LD_ RUN_ PATH environment variable. If this is set at compile time a binary will look first in the directories listed in this variable before it check the system paths for it’s runtime libraries.
Just before the
configure call in the spec file, we insert the following in the gaim and gaim-encryption spec files (both for good measure):
Once these chagnes are made to both spec files, and any other quirks are worked out with file lists and any other settings such as packager, etc., make gaim. install it, make gaim-encryption, install it. Done.
A couple notes:
- SuSE does not split up the nss libraries it’s mozilla packages. So, the
mozilla-develpackage is all that’s needed (not
mozilla-nss-devel, which is how RedHat creates it’s mozilla RPMs).
- The latest versions of the gaim RPM contain a vendor section for SuSE. It uses
gnutlsfor encryption in place of
mozilla-nss.My RPMs are based on earlier versions of the RPMs and use nss. I don’t know if the gaim packagers realise that the
mozilla-develfrom SuSE contains the libraries they need.
- Currently, SuSE does not ship libsilc (Secure Internet Live Conferencing) so that plugin for gaim is not created.
DOWNLOAD: You can download the RPM and SRPM packages for
gaim-encryption that I have made along with their spec files here, in the download section.