uname --hardware-platform
probably isn't what you want, since it may very well be different from the architecture of your installed libraries and executables (think an i386 kernel and runtime installed on x86_64 hardware), and also because hardware-platform
will often end up being "unknown
" under Linux.
A well-packaged deb should probably use dpkg-architecture -qDEB_HOST_ARCH
for this (example outputs: "amd64
", "i386
", "armel
", etc), so that it gets properly overridden if someone wants to cross-compile.