I am currently in the process of creating a package for a closed-source binary program that depends on several older library versions. What is the preferred way to deal with this problem? I would rather not put an older version of the libraries as independant packages into the repositories only to get this one package working (that should be recompiled and linked against current versions anyway).

My current approach is to build the libraries with the program, install them into a library-subfolder and run the program with an appropriate LD_LIBRARY_PATH. Is this acceptable? Are there other alternatives?

Another problem is that the automatic ELF dependency detection process fails since the required libraries are not provided by any package. Is there a way to circumvent these errors?