-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgear-import-rules.5.in
More file actions
97 lines (97 loc) · 2.4 KB
/
gear-import-rules.5.in
File metadata and controls
97 lines (97 loc) · 2.4 KB
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
.\" Copyright (C) 2009 Alexey Gladkov <legion@altlinux.org>
.\" Copyright (C) 2009 Dmitry V. Levin <ldv@altlinux.org>
.\"
.\" This file is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
.
.TH "GEAR-IMPORT-RULES" "5" "December 2009" "gear @VERSION@" "File Formats"
.SH NAME
gear\-import\-rules \- rule file for gear\-import
.
.
.SH DESCRIPTION
.
The rule file specifies parser patterns for
.BR gear\-import (1)
required to parse archive filename.
.
.
.SH FORMAT
.
A rule file consists of lines of the following format:
.RS 4
.PP
.IB directive\^ :
.IR <value>
.RE
.
.PP
Empty lines and lines beginning with \*(lq#\*(rq are ignored.
.
.
.SH DIRECTIVES
.
.TP
.BI "pattern: "<REGEXP>
Extended posix regexp that applies to archive filename (without path).
If pattern matches, name and version are generated using regexp back-reference.
.
.TP
.BI "name: " \[rs]<DIGIT>
Matches the DIGIT-th parenthesized subexpression that match name.
.
.TP
.BI "version: " \[rs]<DIGIT>
Matches the DIGIT-th parenthesized subexpression that match version.
.
.TP
.BI "case\-sense: "yes
Makes `sed' match REGEXP in a case-sensitive manner.
.
.TP
.BI "replace\-name: "<sed-expression>
.TP
.BI "replace\-version: "<sed-expression>
Finally, if
.B replace\-name
or
.B replace\-version
directives defined, it applied to generated name of version as sed expression.
.
.
.SH EXAMPLES
.nf
pattern: ^([0-9_-]+[-_])?([a-z0-9.-]+)_([0-9][a-z0-9.-]+)$
name: \\2
version: \\3
replace-name: s/(-(bin|src)){0,}$//
replace-version: s/([-_](bin|src)){0,}$//
.fi
.
.
.SH AUTHOR
.PP
This manual page written by Alexey Gladkov <legion@altlinux.org>.
.PP
Authors and contributors of the programs included in the
.B gear
package are listed in the manual pages for these programs.
.
.
.SH SEE ALSO
.PP
.na
.nh
.tr -\(hy
.BR gear\-import (1).