OpenDBX/Setup/Unix-like/Packages from source

From Linuxnetworks
< OpenDBX‎ | Setup/Unix-like
Revision as of 17:36, 15 June 2008 by Nose (Talk | contribs)

Jump to: navigation, search

.deb packages

Compiling and building packages for Debian-like distributions is simple and it prevents messing up your system. Make sure you have a few required packages installed:

  • fakeroot
  • debhelper
  • docbook2x

Yo can do this by using the apt-get utility:

apt-get install fakeroot debhelper docbook2x

After these requriements are met, unpack the .tar.gz, change into this directory and build the .deb packages:

fakeroot debian/rules binary

If you want to build only one or a few backends you have to modify the debian/rules file inside the OpenDBX .tar.gz file. The line

backends := firebird mssql mysql odbc pgsql sqlite sqlite3 sybase

contains the backends which should be build and for which the development packages must be available.

The files will be installed to their standard locations (/usr/lib, /usr/lib/opendbx, /usr/include and /usr/bin) by the Debian package manager:

dpkg -i ../libopendbx1*x.y.z*.deb ../opendbx*_x.y.z*.deb

This would install the main library, all generated backend and the utilities.

.rpm packages

It's similar for rpm based distributions. There is a spec file inside the .tar.gz, which build the complete package automatically (be sure, you have installed all necessary libraries and header files):

rpm -ta opendbx-x.y.z.tar.gz

or with the newer command:

rpmbuild -ta opendbx-x.y.z.tar.gz

By default only the mysql, pgsql and sqlite3 backend is included when building rpm packages. The defaults can be overwritten via command line by adding "--with <backend>" or "--without <backend>", e.g.

rpmbuild -ta opendbx-x.y.z.tar.gz --with sqlite --without pgsql

The files will be installed to their standard locations (/usr/lib, /usr/lib/opendbx, /usr/include and /usr/bin) by the package manager:

rpm -i opendbx*x.y.z*.rpm

This would install the main library, all generated backend and the utility package.