mkpkg
[ dir ]
[ -d ]
[ -e ]
[ -w ]
[ -r
path ]
[ -n ]
[ -g
file ]
mkpkg
[ dir ]
-c [ dfs ]
mkpkg
[ dir ]
-u { x | f | s | p | any combination }
mkpkg
[ dir ]
-i [ fsc ]
mkpkg
[ dir ]
-o { d | e }
mkpkg
[ dir ]
{ -x | -f | -p | -s }mkpkg
reads a
MAKEPKG(5)
file from the current directory (or from
dir
if given), downloads sources, verifies checksums and signatures, and produces a binary package archive. The build pipeline:shell() [pre] setup wrappers (port directory) download fetch sources checksums verify sha256sums signature verify port signature extract() or auto unpack sources into $SRC patch() apply patches build() compile and install to $PKG post_build() post-build fixups strip strip binaries (unless -n) compress gzip man pages meta write declarative metadata footprint check .footprint; sign if clean shell() [post] cleanup wrappers (port directory)The package is only signed if the footprint check passes cleanly.
mkpkgmkpkg -dmkpkg -emkpkg -cmkpkg -fmkpkg -pmkpkg -smkpkg -cmkpkg -cdmkpkg -cf.footprint file.mkpkg -cs.signature file.-cdfs
removes everything.
mkpkg -uxmkpkg -uf.footprint file from the built package archive.mkpkg -us.signature file. If the package is up to date, skips the build and signs directly.mkpkg -upsignify() function block in the MAKEPKG with the current public key.-uxfs
updates checksums, footprint, and signature in one step.
mkpkg -ifmkpkg -ismkpkg -icmkpkg -odmkpkg -oe-n-w-w run, the existing work/src is reused and only work/pkg is recreated.-g file$PKG$SRC$PKGMK_SOURCE_DIR$name, $version, $releaseMAKEPKG/etc/mkpkg.conf.footprint.signature.nostrip01–10mkpkg /usr/ports/core/zlib -d # build from anywhere mkpkg -od && mkpkg -is # download then build mkpkg -up && mkpkg -us # sign a port mkpkg -cdfs && mkpkg -d # full clean rebuild
MAKEPKG(5), mkpkg.conf(5), lockbox(7), addpkg(8)