enihcam/aur-skills / skills/aur-makepkg
aur-makepkg
VerifiedConfigure and use makepkg to build Arch Linux packages. Covers flags, options arrays, environment variables, and chroot builds. Use when building packages, troubleshooting build failures, or configuring build settings.
Skill: aur-makepkg
Purpose
Build Arch Linux packages with makepkg, configure build options, and troubleshoot failures.
Basic Usage
makepkg # build package
makepkg -s # sync + install dependencies
makepkg -i # build + install
makepkg -r # clean after build
makepkg --check # run check() function
makepkg -o # download + prepare only
makepkg -e # skip extract, resume build
makepkg -c # clean up leftover files
makepkg --printsrcinfo # generate .SRCINFO
Options Array in PKGBUILD
options=('!emptydirs' # remove empty dirs (default: keep)
'!strip' # keep debug symbols (default: strip)
'!libtool' # remove .la files (default: keep)
'!ccache' # disable ccache (default: use if installed)
'zipman' # compress man pages
'!debug') # disable debug package
Environment Variables
PKGDEST=~/packages # where .pkg.tar.zst files go
SRCDEST=~/sources # where downloaded sources are cached
SRCPKGDEST=~/srcpkg # where .src.tar.gz goes
MAKEFLAGS="-j$(nproc)" # parallel build jobs
Set in ~/.makepkg.conf (user) or /etc/makepkg.conf (system).
Chroot Builds
pkgctl build # builds in clean chroot via systemd-nspawn
Use chroot builds to verify the package builds from scratch in a clean environment.
Common Failures
- Missing deps: add to
makedependsordepends - Network required at build: unacceptable for official repos; note in comments for AUR
- Outdated checksums: run
updpkgsums - Parallel build failure: set
MAKEFLAGS="-j1"for the build, or add!makeflagstooptionsso the PKGBUILD ignores userMAKEFLAGS
Reproducible Builds
makerepropkg *.pkg.tar.zst # from devtools — verify a package is reproducible
repro -f *.pkg.tar.zst # from archlinux-repro
If the build embeds timestamps, export SOURCE_DATE_EPOCH (UNIX epoch seconds) — see reproducible-builds.org.
Related
aur-pkgbuild— PKGBUILD structureaur-audit— validation after build
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |