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]


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

Creating/Modifying Packages[edit]

Stop after extracting the package distfiles.
Stop after applying package patches.
Update the checksums of the packages distfiles in distfiles.
mps (makepatchsum)
Dumps new patch checksums into distfiles.
Dumps out expected distfile names.
Installs into the ${WRKSRC}/.destdir/. Handy for checking what will become the install paths.
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 the dependency hierarchy for a package.

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