CRUX : Home

Home :: Documentation :: Download :: Development :: Community :: Wiki :: Ports :: Bugs :: Links :: About

Back to wiki start page

Categories: Ports

Building packages from existing work directory


Bartlomiej Palmowski


Occasionally there appears a situation when you need to edit the sources just before building the package. Unfortunately, generating patches and/or sed'ing sources might be time consuming and frustrating. Editing sources by hand just before compiling is much faster and easier, yet pkgmk does not provide you with an option for building from once extracted sources (you may of course keep the work directory using the "-kw" switch, but the directory gets deleted the next time you invoke pkgmk). pkgmk-resume allows you to edit your sources before building, becoming an ideal tool for an when a need arises. this script is a stripped down and modified version of pkgmk, and is not intended for regular package building. It's creation has been inspired by the FS #283 ticket.

WARNING!!! pkgmk-resume is intended to help with some urgent situations, not to be used as package maintainer's everyday tool.


Get the latest sources from:

and put it somewhere in your PATH.

Use pkgmk with -kw or -eo switch to extract the sources, edit them so that they meet your requirements; then invoke pkgmk-resume to continue building from already modified sources. Also, pkgmk-resume provides you with the following options:

  -ns,  --no-strip            do not strip executable binaries or libraries
  -rw,  --remove-work         remove temporary working directory
  -cf,  --config-file <file>  use alternative configuration file
  -ne,  --noset-e             build will not fail if error occurs
  -h,   --help                print help and exit

pkgmk-resume does not delete by default the work directory before and after build; also it does not perform any Pkgfile, dir, footprint and md5sum checks.

Thanks to alancio for support and brointhemix for making this wiki page understandable ;].