It turned out to be easier to remove the COPYING file as a final step in the installation:
override_dh_auto_install: dh_auto_install --destdir=debian/$(BINPKG)-stage1 $@ cd debian/$(BINPKG)-stage1/usr/$(GTM_INSTALL_DIR) && \ gtm_destdir=$(CURDIR)/debian/$(BINPKG) \ ./gtminstall --utf8 default --user root --group root --verbose \ --distrib . \ --installdir $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR) @echo "I: Fixing up permissions for removed write rights -- we aren't done yet!" chmod +w -R $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR) @echo "I: Fixing up permissions for setuid rights -- we aren't done yet!" chmod u+s $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR)/gtmsecshr ls -l $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR)/gtmsecshr @echo "I: Removing redundant license file. One is already available." rm $(CURDIR)/debian/$(BINPKG)/usr/$(GTM_INSTALL_DIR)/COPYING Regrading the setuid, the script above verifies that at some point the gtmsecshr has the right setuid flag: chmod u+s /home/ibanez/build2/luisibanez-fis-gtm-4077ab8/debian/fis-gtm-5.5.000/usr/lib/fis-gtm/V5.5-000_x86_64/gtmsecshr ls -l /home/ibanez/build2/luisibanez-fis-gtm-4077ab8/debian/fis-gtm-5.5.000/usr/lib/fis-gtm/V5.5-000_x86_64/gtmsecshr -rwsr-xr-x 1 root root 9888 Jul 1 13:18 /home/ibanez/build2/luisibanez-fis-gtm-4077ab8/debian/fis-gtm-5.5.000/usr/lib/fis-gtm/V5.5-000_x86_64/gtmsecshr but, then, after the packaging is completed, the permissions have been changed to: ls -l /home/ibanez/build2/luisibanez-fis-gtm-4077ab8/debian/fis-gtm-5.5.000/usr/lib/fis-gtm/V5.5-000_x86_64/gtmsecshr -rwxr-xr-x 1 ibanez ibanez 9760 Jul 1 13:18 /home/ibanez/build2/luisibanez-fis-gtm-4077ab8/debian/fis-gtm-5.5.000/usr/lib/fis-gtm/V5.5-000_x86_64/gtmsecshr -- Luis

