Refactor distribution support

I refactored the switch/case statement a bit to get rid of the duplicated `package` statements.
Defining now only the package names in the $packages variable and then using it for a single `package` statement _after_ the switch/case block.

This PR depends upon the _debian-support_ PR.