Update mkpkg function