The modern way of doing it in Debian is with triggers, meaning that dpkg is instructed to run the postinst of script of some central package (e.g. pike7.8-core) whenever one or more files are installed in or removed from a particular directory (e.g. /usr/lib/pike7.8/modules) or subdirectory thereof. Then all modules can be byte-compiled after they are all in place, but as Martin Bähr noted, it looks like we'll have to always recompile everything for now.