When creating deb package for your project you need to specify at DEBIAN/control
file at Depends:
field to what packages your project depends. To do that you can invoke follwing command on all binaries and libraries that you want to put into your package. This will help you fill in Depends:
field.
Before start you should install apt-file: # apt-get install apt-file
ldd $LIBRARY_PATH | awk '/=>/{print $1}' | \
while read n; do echo "=== $n maybe found at: ===" && apt-file search $n | \
awk '{print $1}' | sed 's/://' | sort; done | uniq
Example:
$ ldd /usr/lib/libmodplug.so.1 | awk '/=>/{print $1}' | \
while read n; do echo "=== $n ===" && apt-file search $n | \
awk '{print $1}' | sed 's/://' | sort; done | uniq
$ ldd /usr/lib/libmodplug.so.1 | awk '/=>/{print $1}' | while read n; do echo "=== $n ===" && apt-file search $n | awk '{print $1}' | sed 's/://' | sort; done | uniq
=== libstdc++.so.6 ===
lib32stdc++6
lib32stdc++6-4.8-dbg
lib32stdc++6-4.9-dbg
libstdc++6
libstdc++6-4.8-dbg
libstdc++6-4.9-dbg
libx32stdc++6
libx32stdc++6-4.8-dbg
libx32stdc++6-4.9-dbg
=== libm.so.6 ===
libc6
libc6-i386
libc6-x32
=== libc.so.6 ===
libc6
libc6-i386
libc6-x32
=== libgcc_s.so.1 ===
lib32gcc1
lib32gcc1-dbg
libgcc1
libgcc1-dbg
libx32gcc1
libx32gcc1-dbg
So when you building deb package for your project, probably dependencies that you will put to your DEBIAN/control
file are
Depends: libstdc++6, libc6, libgcc1