Turn struct pkg_categories into a pkg_object