In gentoo linux quickpkg can be utilized to quickly create a package (tbz2 format) for portage by utilizing the files already on your filesystem. This package then can be emerged on any system.
It comes with gentoolkit package.
emerge -pv gentoolkit
man quickpkg
You can do the same thing with ‘emerge’ command
emerge -B package_name
–buildpkgonly (-B) Creates binary packages for all ebuilds processed without actually merging the packages. This comes with the caveat that all build time dependencies must already be emerged on the system.
All generated packages will be stored in
${PKGDIR}/All
${PKGDIR}/