Rename a file during install of a Debian package

Solution 1:

From Debian bug 245554 already mentioned:

this can already be easily solved if you use dh >= 9 and dh-exec. Just make your .install file executable, add #!/usr/bin/dh-exec to the top, and you can use "source => dest", like this:

#!/usr/bin/dh-exec
debian/default.conf => /etc/my-package/start.conf

Solution 2:

You cannot rename files using dh_install (via the debian/install). You will need to rename it during the debian/rules "build" target before you get to the dh_install invocation.