Before you package up your application into a deb you need to codesign the binary with ldid
Make sure you sign the binary
For example
ldid -S myappfolder/myapp
Also make sure the correct permissions are set.
chmod 0755 myappfolder/myapp
chown 0:0 myappfolder/myapp