refactor clib_package_new