Debian install maintainer environment variable problem

Hi,

I am using Ubuntu 8.04 (Hardy heron) and I am trying to package my application using 'dpkg'. I am following 'rules' based debian packaging. I am using install script to copy certain shared object libraries into my package installation path.

for eg: ../../../Qt-4.6.2/Release/bin/libSettings.so.1* usr/local/myapp/

Now, I am facing a problem, every time if I install the new version of the supported package (Qt here), I have to manually edit this *.install file for the path (since version is included in the path). I have tried setting an environment variable and tried to read it inside the script but in no vain.

Can anyone help me how to solve this issue? if environment variable is not the right approach, how I can proceed with this?