Adding a .deb file to the debian package as a dependency

advertisements

I am trying to package a program (FCL) but it has a dependency - libccd - which I had to package myself. So now I have created a libccd_2.0-1.deb file using check-install and I would like it to be installed as FCL dependency. So I added libccd (>= 1.0) in the control file of FCL Debian package. But the FCL package is complaining that it can't find the dependency libccd.

How can I make FCL package install the libccd_2.0-1.deb when it sees the dependency libccd? Also, where should I add the .deb file in the FCL Debian package?


No you can't. dpkg (which is used for installing individual .deb files) cannot fullfil dependencies.

Dependencies can be resolved only by apt-get / aptitude, but they cannot install .deb files directly, they can install packages only from repositories. Each repository has a metadata file and apt build its knowledge database, so when dependency says package libccd is needed, it will know that is available from repository XY.

But dpkg doesn't know where to search for needed packages. You can install your packages either by installing the libccd*.deb first, then by installing the fcl*.deb itself. Or preferably you can put them both as parameters of one dpkg call like this: dpkg -i fcl*.deb libccd*.deb and dpkg will figure itself which of those 2 to install first. (Or you can create your own repository where you will have both packages with related metadata.)