Tutorial 2 - How to build Xerces-C++ RPMs.
Download Xerces-C++ sources
KXML Editor version 2.x (currently in CVS) use Xerces-C++ parser. You need installed it for running new KXML Editor. This tutorial describes, how to make instalable RPMs from Xerces-C++ 2.7.0 sources. I have tested it on SuSE 9.2 running on AMD64. Download xerces-c-current.tar.gz from Xerces-C++ project pages.
Look inside xerces-c-current.tar.gz
- for example using Krusader and
copy xerces-c-src_2_7_0
directory somewhere.
Prepare sources
Run terminal, switch to directory where is xerces-c-src_2_7_0
and make source tarball using:
tar -zcvf xerces-c-src_2_7_0.tar.gz xerces-c-src_2_7_0
Download .spec file
Downnload file xerces-c.spec and save it to the same directory, where is
xerces-c-src_2_7_0.tar.gz
.
This file contain definition for create RPM. It is slightly different form file distributed in Xerces-C++ 2.7.0,
because original .spec file has problems
when used on 64 bit platforms. There is /%{_lib}
instead of hardcoded /lib
. This allow using correct lib64
directories instead of lib
when compiled for 64 bit.
Build RPM packages
Build RPMs using commands (as root):
cp xerces-c-src_2_7_0.tar.gz /usr/src/packages/SOURCES/
rpmbuild -bb xerces-c.spec --target x86_64
Of course use correct --target
for your machine - i686
etc... If all is correct,
you will have RPMs in /usr/src/packages/RPMS/your-target
directory. Install them using command (as root):
rpm -Uvh xerces-c*.rpm