Building deb packages optimized for arbitrary CPU instructions, how do I put the CPU instructions as a dependency on the deb packages ?The package isn't intended for mass distribution, but I don't want to have people confused with crashes because their CPU is too old for my builds.
How do I put hardware dependencies on .deb packages?
deb;cpu architecture
I'm not sure the dpkg format, itself, can do what you require.However you can make use of preinstall scripts.  In this you can test to see if the CPU is of the right level and abort if it is not good enough.  In this way your package won't install.The preinst script is part of the control section of a pkg; you can read about it at https://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.htmlThese are sometimes called preinstall sanity scripts.  If they end with a non-zero exit code then the package install fails.Your preinst script could be as simple as#!/bin/shset -eflags=`grep ^flags /proc/cpuinfo | head -1`if [ -z `echo $flags | grep sse4` ]then  echo Can only run on machines with SSE4 instructions.  Install failed  exit 1fiexit 0