Well, finally I was able to successfully create usable deb packages with Firebird (and Borland Interbase) support enabled. What I did was:
0. Enable deb-src lines in /etc/apt/sources.list && aptitude update
Then read this page first if you need help on building deb packages.
1. Create an empty directory, lets say, ~/rebuild then change into it
Code:
mkdir ~/rebuild && cd ~/rebuild
2. Fetch qt4-x11 sources from repository:
Code:
apt-get source libqt4-sql
3. Install required build dependencies:
Code:
sudo apt-get build-dep libqt4-sql
4. Install another new dependencies, since now we need to link against libfbclient also. This should do it:
Code:
sudo aptitude install firebird2.0-super firebird2.0-dev libfbclient2
I think the firebird2.0-super package is not really necessary, but I installed anyways.
5. Unpack the sources. Maybe this is not required, to be sure run
Code:
dpkg-source -x qt4-x11_4.3.2-0ubuntu3.1.dsc
Note that version numbers may differ. Today is 4.3.2-0ubuntu3.1.
6. Change to the directory where the sources tarball was unpacked
7. Edit debian/rules file and add the line
as another option for ./configure (line ~44) to make it look like this
Code:
...
-qt-sql-psql \
-qt-sql-mysql \
-qt-sql-ibase \
-qt-sql-sqlite \
-system-sqlite \
-qt-sql-sqlite2 \
...
8. Edit config.tests/unix/ibase/ibase.pro and replace
Code:
LIBS += -lgds
by
LIBS += -lfbclient
9. Edit src/plugins/sqldrivers/ibase/ibase.pro and replace
Code:
unix:!contains( LIBS, .*gds.* ):!contains( LIBS, .*libfb.* ):LIBS *= -lgds
by
unix:!contains( LIBS, .*gds.* ):!contains( LIBS, .*libfb.* ):LIBS *= -lfbclient
10. Edit src/sql/drivers/drivers.pri and replace
Code:
unix:LIBS *= -lgds
by
unix:LIBS *= -lfbclient
In general you should replace any occurence of -lgds by -lfbclient in .pro files.
You can simply rgrep "lgds" * | less to find occurences.
11. Finally, compile and build the packages..
Code:
dpkg-buildpackage -rfakeroot -b
Wait a while. This may take 20-30 minutes, depending on the hardware you are working on. At the end, freshly built deb packages should appear in ~/rebuild
Reinstall libqt4-sql this way:
Code:
sudo dpkg -i libqt4-sql_4.3.2-0ubuntu3.1_i386.deb
Support for accessing Firebird databases should be working now.
You can check by writing a small Qt4/C++ app with the following lines:
Code:
QStringList availableDrivers = QSqlDatabase::drivers ();
foreach(QString driver , availableDrivers){
qDebug() << "Driver: " << driver ;
}
hopefully the program will print what follows:
Driver: "QPSQL7"
Driver: "QPSQL"
Driver: "QMYSQL3"
Driver: "QMYSQL"
Driver: "QSQLITE"
Driver: "QSQLITE2"
Driver: "QIBASE"
Bookmarks