I have created a deb package for an application created in Qt. I have included all the libraries that the application depends on, to be installed in a folder next to the application itself:
/usr/share/MyCompany/MyProduct/executable
/usr/share/MyCompany/MyProduct/Frameworks
Then exported LD_LIBRARY_PATH
pointing to the Frameworks
directory.
All perfect... Until I had to add QT Assistant, which requires additional libraries.
After checking the dependencies for Qt Assistant, I added all the required libraries, including libQtHelp.so.4
and libQtWebKit.so.4
, in the same directory.
My deb is very simple, I create the structure desired then set the "install" to copy my files to the target directories.
blah_1/* /usr/share/MyCompany/MyProduct/
To create the package, I create the tar then
dh_make --copyright gpl -f ../blah-1.0.tar.gz
dpkg-buildpackage -rfakeroot [email protected]
When running the installer on a clean (no Qt) system, I am getting dependency errors:
me:~$ sudo dpkg -i /path/blah_1.0-1_i386.deb
Selecting previously unselected package blah.
(Reading database ... 141841 files and directories currently installed.)
Unpacking blah (from .../blah_1.0-1_i386.deb) ...
dpkg: dependency problems prevent configuration of blah:
blah depends on libqt4-help (>= 4:4.8.0); however:
Package libqt4-help is not installed.
blah depends on libqtwebkit4 (>= 2.2~2011week36); however:
Package libqtwebkit4 is not installed.
dpkg: error processing blah (--install):
dependency problems - leaving unconfigured
Processing triggers for shared-mime-info ...
Processing triggers for desktop-file-utils ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for gnome-menus ...
Errors were encountered while processing:
blah
Unfortunately the system I am installing doesn't have (and will not have) internet access. How can I provide the packages required, in the same deb installer ?
Or, how can I disable checking for dependencies, since I am providing the required libs ?
(Ubuntu 12.04 if that is relevant)
Update: I ran
sudo dpkg -i --ignore-depends=libqt4-help,libqtwebkit4 /path/blah_1.0-1_i386.deb
The program installed correctly and ran perfectly.
Inside the package, in the /DEBIAN/control
, i see listed the unwanted dependencies.
After calling dh_make I had no dependencies in the control file.
The dpkg-buildpackage must have placed the dependencies after checking (likely for assistant).
Can I remove them somehow ? Can I put a flag somewhere not to include dependencies ?
Or... still.... can I add in my packaging thing the deb packages and is there a command I can give to pre-install as part of the package installation ?
If there is no solution.... I suppose I can provide a script to run the dpkg command as above, with ignore-depends, but then he package cannot be installed from the Software Center...