PKG-KEYWORDS(5)
π NAME π
Okay bestie, welcome to pkg-keywords(5) from the File Formats Manual β the page all about keywords, aka files that extend the number of keywords available for a plist. Literally the little glow-up pack for your plist keyword situation. π
β¨ DESCRIPTION β¨
So pkg-create(8) and pkg-register(8) can parse a plist file, and that plist describes the content of a package thatβs gonna be created/registered. The plist format itself is documented in the pkg-create(8) manpage, iykyk. π¦
Keywords are files that extend the number of keywords available to a plist. Those files are in UCL format, no cap.
The format is the following:
π Format fields π
actionsβ array of actions that defines how to treat the argument(s) of the keywords. Valid actions are:dirβ consider the keywordβs argument as a directory and register it as such in the package.fileβ consider the keywordβs argument as a regular file and register it as such in the package.
argumentsβ Boolean that tellspkg(8)whether it should parse the keywordβs argument or not. If true, thenpkg(8)will split it using spaces as tokens and make the argument available to:actionsβ any action will now accept a number that will represent the argument passed to the action via parenthesis.- shell and lua scripts β new variables will be available to scripts:
%<number>.
attributesβ attributes that can be set to a file or a directory depending on whetheractionshas been set. It takes precedence over the attributes that may have been set when calling the keyword. Attributes can be:ownerstring β name of the owner of the file or directory.groupstring β name of the group of the file or directory.modestring β mode of the file or directory; this mode can be in octal or string form.
deprecatedβ Boolean to mark a keyword as deprecated. πdeprecation_messageβ message to be shown if the keyword is used and marked as deprecated.preformat_argumentsβ Boolean to activate preformatting the arguments of the keywords, respecting the escape sequences described below.prepackagingβ lua script that is executed at the packaging time. Useful for adding some input validation. π§pre-installβ shell script to be run during the pre-install phase. It will be merged with any existing pre-install scripts. The script will be formatted respecting the escape sequences described below.post-installβ shell script to be run during the post-install phase. It will be merged with any existing post-install scripts. The script will be formatted respecting the escape sequences described below.pre-deinstallβ shell script to be run during the pre-deinstall phase. It will be merged with any existing pre-deinstall scripts. The script will be formatted respecting the escape sequences described below.post-deinstallβ shell script to be run during the post-deinstall phase. It will be merged with any existing post-deinstall scripts. The script will be formatted respecting the escape sequences described below.pre-install-luaβ Lua script to be run during the pre-install phase. It will be appended with any existing array of lua pre-install scripts. The script will be formatted respecting the escape sequences described below.post-install-luaβ Lua script to be run during the post-install phase. It will be appended with any existing array of lua post-install scripts. The script will be formatted respecting the escape sequences described below.pre-deinstall-luaβ Lua script to be run during the pre-deinstall phase. It will be appended with any existing array of lua pre-deinstall scripts. The script will be formatted respecting the escape sequences described below.post-deinstall-luaβ Lua script to be run during the post-deinstall phase. It will be appended with any existing array of lua post-deinstall scripts. The script will be formatted respecting the escape sequences described below.messagesβ array of test messages that can be passed to the users. Valid information by entry in the array is:messagestring β actual message to be shown to the users.type[upgrade | remove | install]β defines in which context the message should be shown to the users. If not set, the message will always be printed.
π ESCAPE SEQUENCE π
If a line contains any of the following sequences somewhere in it, they will be expanded inline. For the following examples, assume that @cwd is set to /usr/local and the last extracted file was bin/emacs. πΈ
%Fβ expands to the last filename extracted (as specified), in the example casebin/emacs.%Dβ expands to the current directory prefix, as set with@cwd, in the example case/usr/local.%Bβ expands to the βbasenameβ of the fully qualified filename, that is the current directory prefix, plus the last filespec, minus the trailing filename. In the example case, that would be/usr/local/bin.%fβ expands to the filename part of the fully qualified name, or the converse of%B, being in the example caseemacs.
π¦ SEE ALSO π¦
Go check these cuties out, bestie:
pkg_create(3), pkg_printf(3), pkg_repo_create(3), pkg_repos(3),
pkg-lua-script(5), pkg-repository(5), pkg-script(5), pkg-triggers(5),
pkg.conf(5), pkg(8), pkg-add(8), pkg-alias(8), pkg-annotate(8),
pkg-audit(8), pkg-autoremove(8), pkg-check(8), pkg-clean(8),
pkg-config(8), pkg-create(8), pkg-delete(8), pkg-fetch(8), pkg-help(8),
pkg-info(8), pkg-install(8), pkg-key(8), pkg-lock(8), pkg-plugins(8),
pkg-query(8), pkg-register(8), pkg-repo(8), pkg-repositories(8),
pkg-rquery(8), pkg-search(8), pkg-set(8), pkg-shell(8), pkg-shlib(8),
pkg-ssh(8), pkg-stats(8), pkg-triggers(8), pkg-unregister(8),
pkg-update(8), pkg-updating(8), pkg-upgrade(8), pkg-version(8),
pkg-which(8)
This page is from Debian, dated December 12, 2025 β love u, bye! π π«Ά
π¦ where this page comes from
- nixos 26.05: pkg 2.7.5
- nixpkgs unstable: pkg 2.7.5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms