| MKPKG.CONF(5) | File Formats Manual | MKPKG.CONF(5) |
mkpkg.conf — build
and install configuration
/etc/mkpkg.conf
mkpkg.conf is read in three ways.
mkpkg -g names another file for the first two.
shell(),
build()
and
post_build()
hooks of a MAKEPKG(5) source it as
a shell script, after PKG,
SRC and the other variables of
mkpkg(8) are exported, so it may
refer to them.
extract()
and
patch()
do not source it. This is where compilers, flags and other build
environment are set.MKPKG_* settings below itself, without a shell.
Their values must be literal: quotes and a trailing comment are removed,
but nothing is expanded. A leading export is
allowed.IGNORE_NEW.Anything a shell script can set. The shipped file sets, among others:
CC,
CXXclang and
clang++.CFLAGS,
CXXFLAGS, CPPFLAGS,
LDFLAGSPKG_CONFIG_PATHpkgconf looks.MAKEFLAGS-j$(nproc).CARGO_HOME,
GOPATHSRC so they are
part of the work directory.MKPKG_SOURCE_DIRPKGMK_SOURCE_DIR. Default: the port
directory.MKPKG_PACKAGE_DIRMKPKG_WORK_DIRMKPKG_TMP_DIRMKPKG_SECRET_KEYMKPKG_COMPRESSION_MODEgz,
xz, zst,
bz2 or lz. It is also the
file name extension. Parallel compressors are used when installed:
pigz for gz, lbzip2 or
pbzip2 for bz2, plzip for
lz; xz and
zst use all threads. Default:
gz.MKPKG_IGNORE_CHECKSUMSmkpkg -ic.MKPKG_IGNORE_FOOTPRINTmkpkg -if.MKPKG_IGNORE_SIGNATUREmkpkg -is.MKPKG_NO_STRIPThe last four are on for yes or
1, and off otherwise.
IGNORE_NEWyes,
addpkg(8) installs a package that
has files its .footprint does not list. Otherwise
it refuses. Default: no.export CC=clang export CXX=clang++ export CFLAGS="-O2 -pipe -march=x86-64-v3 -fstack-protector-strong" export CXXFLAGS="$CFLAGS" export LDFLAGS="-Wl,-O1 -Wl,--as-needed" export MAKEFLAGS="-j$(nproc)" export CARGO_HOME="$SRC/.cargo" # build in RAM MKPKG_WORK_DIR=/dev/shm MKPKG_COMPRESSION_MODE=zst IGNORE_NEW=no
An unknown MKPKG_COMPRESSION_MODE is
compressed with gzip but still used as the extension.
| September 27, 2026 | mkpkg 1.6.0 |