MAKEPKG.CONF(5)
π MAKEPKG.CONF(5) π
okay bestie, welcome to makepkg.conf β the config file that tells makepkg how to serve looks. π
This is the manual page for it, and we are going through every single variable, no skips, no cap. β¨
πΈ NAME πΈ
makepkg.conf - makepkg configuration file
π¦ SYNOPSIS π¦
/etc/makepkg.conf, $XDG_CONFIG_HOME/pacman/makepkg.conf, ~/.makepkg.conf
β¨ DESCRIPTION β¨
Configuration options for makepkg are stored in makepkg.conf. This file is sourced so you can include any special compiler flags you wish to use. This is helpful when building for different architectures or with different optimizations. However, only the variables described below are exported to the build environment.
β οΈ Note β This does not guarantee that all package Makefiles will use your exported variables. Some of them are non-standard.
The system-wide configuration file is found in /etc/makepkg.conf. Specific additions (e.g. build flags for additional languages) can be placed in /etc/makepkg.conf.d/*.conf.
Individual options can be overridden (or added to) on a per-user basis in $XDG_CONFIG_HOME/pacman/makepkg.conf or ~/.makepkg.conf, with the former taking priority.
The default file is fairly well commented, so it may be easiest to simply follow directions given there for customization.
π OPTIONS π
DLAGENTS=('protocol::/path/to/command [options]' ...)β Sets the download agents used to fetch source files specified with a URL in thePKGBUILD(5)file. Options can be specified for each command as well, and any protocol can have a download agent. Any spaces in option arguments are required to be escaped to avoid being split. Several examples are provided in the defaultmakepkg.conf.
If present, %u will be replaced with the download URL. Otherwise, the download URL will be placed on the end of the command. If present, %o will be replaced with the local file name, plus a β.partβ extension, which allows makepkg to handle resuming file downloads.
VCSCLIENTS=('protocol::package' ...)β Sets the packages required to fetch version controlled source files. When required, makepkg will check that these packages are installed or are included in thedependsormakedependsarrays in thePKGBUILD.CARCH="carch"β Specifies your computer architecture; possible values include such things as βi686β, βx86_64β, βppcβ, etc. This should be automatically set on installation.CHOST="chost"β A string such as βi686-pc-linux-gnuβ; do not touch this unless you know what you are doing. This can be commented out by most users if desired.NPROC=""β Sets the number of processors to use for parallel jobs in makepkg. Note: this does not affect parallelization of tasks duringbuild()and related functions.CPPFLAGS="cppflags"β Flags used for the C preprocessor; seeCFLAGSfor more information.CFLAGS="cflags"β Flags used for the C compiler. This is a key part to the use of makepkg. Usually several options are specified, and the most common string resembles something like this: β-march=i686 -O2 -pipeβ. Another useful option may be-mcpuin place of-march. Readgcc(1)for more details on the wide variety of compiler flags available.CXXFLAGS="cxxflags"β Flags used for the C++ compiler; seeCFLAGSfor more info.LDFLAGS="ldflags"β Flags used for the linker. Several options may be specified with common usage resembling β-Wl,--hash-style=gnuβ. Readld(1)for more details on available linker flags.LTOFLAGS="ltoflags"β Additional compiler and linker flags appended toCFLAGS,CXXFLAGSandLDFLAGSwhen building with link time optimization. If empty, β-fltoβ is used.MAKEFLAGS="makeflags"β This is often used to set the number of jobs used; for example,-j2. Other flags that make accepts can also be passed.DEBUG_CFLAGS="debug_cflags"β Additional compiler flags appended toCFLAGSfor use in debugging. Usually this would include: β-gβ. Readgcc(1)for more details on the wide variety of compiler flags available.DEBUG_CXXFLAGS="debug_cxxflags"β Debug flags used for the C++ compiler; seeDEBUG_CFLAGSfor more info.BUILDENV=(!distcc !color !ccache check !sign)β This array contains options that affect the build environment; the defaults are shown here. All options should always be left in the array; to enable or disable an option, simply remove or add an β!β at the front of the option. If an option is specified multiple times, the final value takes precedence. Each option works as follows:distccβ Use the distributed C/C++/ObjC compiler to spread compilation among multiple machines. If this is enabled,DISTCC_HOSTSmust be specified as well.colorβ Colorize output messages, making output easier to read.ccacheβ Use ccache to cache compilation by default. This allows for faster compiles if you are continuously recompiling the same packages. It can be disabled for individual packages by placing!ccachein thePKGBUILDoptions array.checkβ Run thecheck()function if present in thePKGBUILD. This can be enabled or disabled for individual packages through the use of makepkgβs--checkand--nocheckoptions, respectively.signβ Generate a PGP signature file using GnuPG. This will executegpg --detach-signon the built package to generate a detached signature file, using the GPG agent, if it is available. The signature file will be the entire file name of the package with a β.sigβ extension.
DISTCC_HOSTS="host1 ..."β If using DistCC, this is used to specify a space-delimited list of hosts running in the DistCC cluster. In addition, you will want to modify yourMAKEFLAGS.BUILDDIR="/path/to/directory"β If this value is not set, packages will, by default, be built in subdirectories of the directory that makepkg is called from. This option allows setting the build location to another directory. Incorrect use of$startdirin aPKGBUILDmay cause building with this option to fail.GPGKEY=""β Specify a key to use for GPG signing instead of the default key in the keyring. Can be overridden with makepkgβs--keyoption.OPTIONS=(!strip docs libtool staticlibs emptydirs ...)β This array contains options that affect default packaging. They are equivalent to options that can be placed in thePKGBUILD; the defaults are shown here. All options should always be left in the array; to enable or disable an option, simply remove or add an β!β at the front of the option. If an option is specified multiple times, the final value takes precedence. Each option works as follows:stripβ Strip symbols from binaries and libraries. If you frequently use a debugger on programs or libraries, it may be helpful to disable this option.docsβ Save doc directories. If you wish to delete doc directories, specify!docsin the array. The directories affected are specified by theDOC_DIRSvariable.libtoolβ Leave libtool (.la) files in packages. Specify!libtoolto remove them.staticlibsβ Leave static library (.a) files in packages. Specify!staticlibsto remove them, if they have a shared counterpart.emptydirsβ Leave empty directories in packages.zipmanβ Compress manual (man and info) pages with gzip. The directories affected are specified by theMAN_DIRSvariable.purgeβ Remove files specified by thePURGE_TARGETSvariable from the package.debugβ Add the user-specified debug flags as specified inDEBUG_CFLAGSandDEBUG_CXXFLAGSto their counterpart buildflags. Creates a separate package containing the debug symbols when used with βstripβ.ltoβ Enable building packages using link time optimization. Adds the flags specified inLTOFLAGStoCFLAGS,CXXFLAGSandLDFLAGS(or β-fltoβ ifLTOFLAGSis empty).autodepsβ Enable the automatic addition of libraries to thedependsandprovidesarrays. Search library directories are controlled by theLIB_DIRSvariable defined below.
INTEGRITY_CHECK=(check1 ...)β File integrity checks to use. Multiple checks may be specified; this affects both generation and checking. The current valid options are:ck,md5,sha1,sha224,sha256,sha384,sha512, andb2.STRIP_BINARIES="--strip-all"β Options to be used when stripping binaries. Seestrip(1)for details.STRIP_SHARED="--strip-unneeded"β Options to be used when stripping shared libraries or PIE executables. Seestrip(1)for details.STRIP_STATIC="--strip-debug"β Options to be used when stripping static libraries. Seestrip(1)for details.MAN_DIRS=(usr{,/local}{,/share}/{man,info} ...)β Ifzipmanis specified in theOPTIONSarray, this variable will instruct makepkg where to look to compress manual (man and info) pages. If you build packages that are located inopt/, you may need to add the directory to this array. NOTE: Do not add the leading slash to the directory name.DOC_DIRS=(usr/{,share/}{doc,gtk-doc} ...)β If!docsis specified in theOPTIONSarray, this variable will instruct makepkg where to look to remove docs. If you build packages that are located inopt/, you may need to add the directory to this array. NOTE: Do not add the leading slash to the directory name.LIB_DIRS=(lib:usr/lib ...)β Ifautodepsis specified in theOPTIONSarray, this variable will instruct makepkg where to look to find libraries to add to theprovidesarray. The format is"prefix:path", whereprovideswill be added for libraries found in"path"with the specified prefix added.PURGE_TARGETS=(usr/{,share}/info/dir .podlist *.pod...)β Ifpurgeis specified in theOPTIONSarray, this variable will instruct makepkg which files to remove from the package. This is useful for index files that are added by multiple packages.DBGSRCDIR="/usr/src/debug"β Ifstripanddebugare specified in theOPTIONSarray, this variable will instruct makepkg where to place source files for installed binaries. The binaries will be modified to link this directory for the debugger search path.PKGDEST="/path/to/directory"β where your shiny finished packages go π if you don't set this, they just get dumped in the current directory (aka wherever thePKGBUILD(5)is chillin'). Lots of people love having one single home for all their packages, so this is the setting for that vibe. A common pick is/home/packages. so organized, so slay β¨SRCDEST="/path/to/directory"β where downloaded source files land π¦ leave it unset and they only ever live in the current directory. If you're the type who wants all your source tarballs in one central spot for easy cleanup (bestie, same), set the path here. centralized chaos is still chaos, but cuter πSRCPKGDEST="/path/to/directory"β same deal but for source package files π¦ unset means they sit in the current directory. Lots of people keep all their source package files in one central location so cleanup is easy, so you can set that path right here. iykykLOGDEST="/path/to/directory"β where the log files go π if you don't set it, logs get written to the current directory. Setting it centralizes your log location, which makes cleanup and compression so much easier. future you says thank you π«ΆPACKAGER="John Doe <john@example.com>"β this is what gets used when someone queries a package to see who built it π the format shown is required for PGP key lookup through WKD, so don't freestyle it. Highly recommended: swap in your own name and email. main character credit, but make it you β¨COMPRESSGZ="(gzip -c -f -n)",COMPRESSBZ2="(bzip2 -c -f)",COMPRESSXZ="(xz -c -z -)",COMPRESSZST="(zstd -c -z -)",COMPRESSLZO"(lzop -q)",COMPRESSLRZ="(lrzip -q)",COMPRESSLZ4="(lz4 -q)",COMPRESSZ="(compress -c -f)",COMPRESSLZ="(lzip -c -f)"β these set the command and the options used when compressing compiled or source packages in the named format ποΈPKGEXT=".pkg.tar.gz",SRCEXT=".src.tar.gz"β sets the compression used when making compiled or source packages πΈ valid suffixes are.pkgor.src(forPKGEXTandSRCEXTrespectively) followed by one of.tar.gz,.tar.bz2,.tar.xz,.tar.zst,.tar.lzo,.tar.lrz,.tar.lz4,.tar.lzand.tar.Z, or just plain.tarto disable compression entirely. pick your fighter πPACMAN_AUTH=()β specify a command prefix for running pacman as root π if it's unset,makepkgwill check for the presence ofsudo(8)andsu(1)in turn, and try the first one it finds. detective mode activated π΅οΈ
If present, %c will be replaced with the shell-quoted form of the command to run. Otherwise, the command to run is just appended to the auth command. simple as that, no cap
β¨ SEE ALSO β¨
makepkg(8), pacman(8), PKGBUILD(5) π―
Peep the pacman website at https://archlinux.org/pacman/ for current info on pacman and its related tools. bookmark it fr fr π
π BUGS π
Bugs? Bestie, you must be kidding β there are no bugs in this software π iconic behavior honestly.
But if we happen to be wrong (rude), please report them to the issue tracker at https://gitlab.archlinux.org/pacman/pacman/-/issues and bring specific info: your command-line, the nature of the bug, and even the package database if it helps π receipts, we need receipts πΈ
π AUTHORS π
Current maintainers:
- Allan McRae <allan@archlinux.org>
- Andrew Gregory <andrew.gregory.8@gmail.com>
- Morgan Adamiec <morganamilo@archlinux.org>
Past major contributors:
- Judd Vinet <jvinet@zeroflux.org>
- Aurelien Foret <aurelien@archlinux.org>
- Aaron Griffin <aaron@archlinux.org>
- Dan McGee <dan@archlinux.org>
- Xavier Chantry <shiningxc@gmail.com>
- Nagy Gabor <ngaba@bibl.u-szeged.hu>
- Dave Reisner <dreisner@archlinux.org>
- Eli Schwartz <eschwartz@archlinux.org>
For additional contributors, run git shortlog -s on the pacman.git repository π§ legends, every single one
okay that's the whole page bestie, you ate that π«Ά this was Pacman 7.1.0, dated 2026-10-15, and it's the MAKEPKG.CONF(5) manual β go forth and build something gorgeous πβ¨π
π¦ where this page comes from
- arch rolling: pacman 7.1.0.r9.g54d9411-3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms