Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
doc: describe the new options for keywords
Baptiste Daroussin committed 5 years ago
commit 07fbefb43e850f40c86d7b17e9729e29dde9c316
parent a0bb0f8
2 files changed +51 -68
modified docs/pkg-create.8
@@ -403,74 +403,6 @@ Available keywords are the following:
Set the internal directory pointer to point to
.Ar directory .
All subsequent filenames will be assumed relative to this directory.
-
.It Cm @preexec Ar Command
-
Execute
-
.Ar command
-
as part of the pre-install scripts.
-
.It Cm @preunexec Ar command
-
Execute
-
.Ar command
-
as part of the pre-deinstall scripts.
-
.It Cm @postexec Ar command
-
Execute
-
.Ar command
-
as part of the post-install scripts.
-
.It Cm @postunexec Ar command
-
Execute
-
.Ar command
-
as part of the post-deinstall scripts.
-
.It Cm @exec Ar command Pq deprecated
-
Execute
-
.Ar command
-
as part of the unpacking process.
-
If
-
.Ar command
-
contains any of the following sequences somewhere in it, they will
-
be expanded inline.
-
For the following examples, assume that
-
.Cm @cwd
-
is set to
-
.Pa /usr/local
-
and the last extracted file was
-
.Pa bin/emacs .
-
.Bl -tag -width indent -compact
-
.It Cm "%F"
-
Expands to the last filename extracted (as specified), in the example case
-
.Pa bin/emacs .
-
.It Cm "\&%D"
-
Expand to the current directory prefix, as set with
-
.Cm @cwd ,
-
in the example case
-
.Pa /usr/local .
-
.It Cm "\&%B"
-
Expand to the
-
.Dq 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
-
.Pa /usr/local/bin .
-
.It Cm "%f"
-
Expand to the filename part of the fully qualified name, or
-
the converse of
-
.Cm \&%B ,
-
being in the example case,
-
.Pa emacs .
-
.El
-
.It Cm @unexec Ar command Pq deprecated
-
Execute
-
.Ar command
-
as part of the deinstallation process.
-
Expansion of special
-
.Cm %
-
sequences is the same as for
-
.Cm @exec .
-
This command is not executed during the package add, as
-
.Cm @exec
-
is, but rather when the package is deleted.
-
This is useful for deleting links and other ancillary files that were
-
created as a result of adding the package, but not directly known to
-
the package's table of contents (and hence not automatically
-
removable).
.It Cm @mode Ar mode
Set default permission for all subsequently extracted files to
.Ar mode .
@@ -513,6 +445,7 @@ Note: only one level of
.Cm @include
is allowed
.El
+
.Sh ESCAPE SEQUENCES
.\" ---------------------------------------------------------------------------
.Sh ENVIRONMENT
The following environment variables affect the execution of
modified docs/pkg-keywords.5
@@ -66,30 +66,46 @@ Name of the group of the file or directory.
.It Cm mode Ar string
mode of the file or directory, this mode can be in numeric or string form.
.El
+
.It Cm deprecated
+
Boolean to mark a keyword as deprecated
+
.It Cm deprecation_message
+
Message to be show if the keyword is used and mark as deprecated
+
.It Cm preformat_arguments
+
Boolean to activate the preformating the arguemnts of the keywords repescting the escape sequences descibred below.
+
.It Cm prepackaging
+
lua script which is executed at the packaging time. Useful to add some input validation.
.It Cm 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 define later.
.It Cm 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 define later.
.It Cm 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 define later.
.It Cm 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 define later.
.It Cm 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 define later.
.It Cm 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 define later.
.It Cm 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 define later.
.It Cm 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 define later.
.It Cm messages
Array of test messages that can be passed to the users.
Valid information by entry in the array are:
@@ -101,6 +117,40 @@ defines in which contect the message should be shown to the users.
If not set, the message will always be printed
.El
.El
+
.Sh ESCAPE SEQUENCE
+
If
+
.Ar line
+
contains any of the following sequences somewhere in it, they will
+
be expanded inline.
+
For the following examples, assume that
+
.Cm @cwd
+
is set to
+
.Pa /usr/local
+
and the last extracted file was
+
.Pa bin/emacs .
+
.Bl -tag -width indent -compact
+
.It Cm "%F"
+
Expands to the last filename extracted (as specified), in the example case
+
.Pa bin/emacs .
+
.It Cm "\&%D"
+
Expand to the current directory prefix, as set with
+
.Cm @cwd ,
+
in the example case
+
.Pa /usr/local .
+
.It Cm "\&%B"
+
Expand to the
+
.Dq 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
+
.Pa /usr/local/bin .
+
.It Cm "%f"
+
Expand to the filename part of the fully qualified name, or
+
the converse of
+
.Cm \&%B ,
+
being in the example case,
+
.Pa emacs .
+
.El
.Sh SEE ALSO
.Xr pkg_printf 3 ,
.Xr pkg_repos 3 ,