gear-import-rules(5)
| GEAR-IMPORT-RULES(5) | File Formats | GEAR-IMPORT-RULES(5) |
NAME
gear-import-rules - rule file for gear-import
DESCRIPTION
The rule file specifies parser patterns for gear-import(1) required to parse archive filename.
FORMAT
A rule file consists of lines of the following format:
directive: <value>
Empty lines and lines beginning with “#” are ignored.
DIRECTIVES
- pattern: <REGEXP>
- Extended posix regexp that applies to archive filename (without path). If pattern matches, name and version are generated using regexp back-reference.
- name: \<DIGIT>
- Matches the DIGIT-th parenthesized subexpression that match name.
- version: \<DIGIT>
- Matches the DIGIT-th parenthesized subexpression that match version.
- case-sense: yes
- Makes `sed' match REGEXP in a case-sensitive manner.
- replace-name: <sed-expression>
- replace-version: <sed-expression>
- Finally, if replace-name or replace-version directives defined, it applied to generated name of version as sed expression.
EXAMPLES
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,}$//
AUTHOR
This manual page written by Alexey Gladkov <legion@altlinux.org>.
Authors and contributors of the programs included in the gear package are listed in the manual pages for these programs.
SEE ALSO
| December 2009 | gear 2.5.0 |
