Debian and Ubuntu support

* abstract package management
* move conditionals inside tests with skip to avoid errors