Handy pkgsrc targets and tools

From Wikistix

Bunch of notes on pkgsrc make targets to help my memory when building/modifying pkgsrc packages.

Making and committing changes[edit]

Lint packages before committing, using the package pkgtools/pkglint, cleaning up any errors and warnings it reports. Build the package with the make variable PKG_DEVELOPER=yes, cleaning up any additional warnings and errors.

Changes to packages can either be submitted as cvs diff's (with -N if necessary) attached to send-pr, or, get an account for pkgsrc-wip at http://pkgsrc.org/wip/ and commit the new package version there. If committing to pkgsrc-wip, create a top level package file named eg. COMMIT_MESSAGE with the message that should be used to commit to pkgsrc proper.

Make targets[edit]

Installing[edit]

show-options
Dump available, default and currently selected package options.
fetch
Fetch the distfiles into the local ${DISTDIR} directory.
checksum
Check the fetched files checksums against distinfo.
install
Actually install for real.

Creating/Modifying Packages[edit]

extract
Stop after extracting the package distfiles.
patch
Stop after applying package patches.
makesum
Update the checksums of the packages distfiles in distfiles.
mps (makepatchsum)
Dumps new patch checksums into distfiles.
show-distfiles
Dumps out expected distfile names.
stage-install
Installs into the ${WRKSRC}/.destdir/. Handy for checking what will become the install paths.
print-PLIST
Dumps out a PLIST to stdout based on the staged installation. Sanity check before using!
show-var VARNAME=<x>
Dumps out evaluated make variable.
show-vars VARNAMES="<x> <y>"
Dumps out multiple evaluated make variables.
show-buildlink3
Show the dependency hierarchy for a package.

Misinformation found herein copyright Paul Ripke (aka “stix”) stixpjr@gmail.com.