I have a library and few binaries that I want to pack as Debian package. I have dependency on : libboost-log*, libprotobuf* etc.
I don't want to add dependency on dev packages "libboost-all-dev" etc and want to add dependency non dev packages. I realized by looking at the ubuntu packages archive that some of these libraries change name in different version of ubuntu:
libboost-filesystem1.65 and libboost-filesystem1.58
Do I need to create separate package for each ubuntu versions (14, 16, 18 etc)?
Also my binaries are compiled on ubuntu 18 and they get linked to latest version of boost (1.65) . When I pack and install same on older version(ubuntu 16 where version of boost is 1.58), I get error while running binary.
myprog: error while loading shared libraries: libboost_system.so.1.65.1: cannot open shared object file: No such file or directory
Is there a way I can compile by binary just on on version of ubuntu and specify dependencies in a way that package works on all ubuntu version?