Add gentoo support, move package installation to separate class