forked from freebsd/pkg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpkg-keywords.5
194 lines (194 loc) · 6.33 KB
/
pkg-keywords.5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
.\"
.\" FreeBSD pkg - a next generation package for the installation and maintenance
.\" of non-core utilities.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.Dd January 29, 2020
.Dt PKG-KEYWORDS 5
.Os
.Sh NAME
.Nm Keywords
.Nd files to extend the number of keywords avaiable for plist
.Sh DESCRIPTION
.Xr pkg-create 8
and
.Xr pkg-register 8
can parse a plist file, which describes the content of a package to be created/registered.
The plist format is documented in the
.Xr pkg-create 8
manpage .
.Pp
.Nm
are files that extends the number of keywords available to a plist.
Those files are in UCL format.
.Pp
The format is the following:
.Bl -tag -width Ds
.It Cm actions
Array of actions which defines what do to the argument(s) of the keywords.
Valid actions are:
.Bl -tag -width Ds
.It Va dir
Consider the argument of the keyword as a directory and register it as such in the package
.It Va file
Consider the argument of the keyword as a regular file and register it as such in the package
.El
.It Cm arguments
Boolean which tells
.Xr pkg 8
if it should parse the argument of the keyword or not.
If
.Va true
then pkg will make split it using spaces as token and make the argument available to:
.Bl -tag -width Ds
.It Cm actions
Any action will now accept a number that will represent the argument passed to the action via parenthesis.
.It Cm shell and lua scripts
New variables will be available to scripts: \%%<number>.
.El
.It Cm attributes
attributes that can be set to a file or a directory depending if actions has been set.
It will take the precedence over the attributes that may have been set when calling the keyword.
Attributes can be:
.Bl -tag -width Ds
.It Cm owner Ar string
Name of the owner of the file or directory.
.It Cm group Ar string
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:
.Bl -tag
.It Cm message Ar string
actual message to be shown to the users.
.It Cm type Op Ar upgrade | Ar remove | Ar install
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_create 3 ,
.Xr pkg_printf 3 ,
.Xr pkg_repos 3 ,
.Xr pkg-lua-script 5 ,
.Xr pkg-repository 5 ,
.Xr pkg-script 5 ,
.Xr pkg-triggers 5 ,
.Xr pkg.conf 5 ,
.Xr pkg 8 ,
.Xr pkg-add 8 ,
.Xr pkg-alias 8 ,
.Xr pkg-annotate 8 ,
.Xr pkg-audit 8 ,
.Xr pkg-autoremove 8 ,
.Xr pkg-check 8 ,
.Xr pkg-clean 8 ,
.Xr pkg-config 8 ,
.Xr pkg-create 8 ,
.Xr pkg-delete 8 ,
.Xr pkg-fetch 8 ,
.Xr pkg-info 8 ,
.Xr pkg-install 8 ,
.Xr pkg-lock 8 ,
.Xr pkg-query 8 ,
.Xr pkg-register 8 ,
.Xr pkg-repo 8 ,
.Xr pkg-rquery 8 ,
.Xr pkg-search 8 ,
.Xr pkg-set 8 ,
.Xr pkg-shell 8 ,
.Xr pkg-shlib 8 ,
.Xr pkg-ssh 8 ,
.Xr pkg-stats 8 ,
.Xr pkg-triggers 8 ,
.Xr pkg-update 8 ,
.Xr pkg-updating 8 ,
.Xr pkg-upgrade 8 ,
.Xr pkg-version 8 ,
.Xr pkg-which 8