First of all I would like to make clear that this should just be done if you really know what you are doing, otherwise it could badly mess up your system.
Ok, you have been warned. However, in some cases it is really useful.
For example I have the proprietary SUN J2SDK (*.bin file) installed on
my system, since the JDK is not integrated into the package management
apt-get install azureus fails because of broken dependencies
So I decided to set up a dummy package to pretend that sun-j2dk-1.5 is installed. First we need to create a control file.
This will generate a template control file which can be edited to fit our needs.
Section: misc Priority: optional Standards-Version: 3.5.10 Package: my-j2sdk1.5 Provides: sun-j2sdk1.5 Architecture: all Description: Dummy package whose only purpose is to provide sun-j2sdk1.5
Now the next step is to build an actual deb package.
This file can now be installed as usual.
dpkg -i my-j2sdk1.5
Java packages can now also be installed normally because the Java SDK is registered in the system’s package database.