syntax: spec: drop invalid parentheses after "Summary"

Also, add the missing "RemovePathPostfixes", add extra word boundaries,
and reshuffle and regroup some things.
master
Benno Schulenberg 2020-02-25 11:34:41 +01:00
parent fcbe5aedbd
commit 9c70fdaef9
1 changed files with 11 additions and 10 deletions

View File

@ -4,13 +4,13 @@ syntax spec "\.spec(\.[^/]+)?$"
comment "#"
# Main tags.
color brightblue "\<(Name|Version|Release|Summary|Group|URL|Url|Epoch|Icon|Serial)[[:space:]]*:"
color brightblue "\<(BuildArch(itectures)?|Exclusive(Arch|OS)|Exclude(Arch|OS))[[:space:]]*:"
color brightblue "\<(Conflicts|Enhances|Obsoletes|Provides|Requires(\(.*\))?|Recommends|Suggests|Supplements|BuildConflicts|BuildRequires|PreReq)[[:space:]]*:"
color brightblue "\<(Epoch|Icon|Nosource|Nopatch|Serial)[[:space:]]*:"
color brightblue "\<(Provides|Requires(\(.*\))?|Obsoletes|Conflicts|Recommends|Suggests|Supplements|Enhances|PreReq)[[:space:]]*:"
color brightblue "\<(BuildRoot|BuildRequires|BuildConflicts|Prefix|RemovePathPostfixes)[[:space:]]*:"
color brightblue "\<(AutoReq|AutoProv|AutoReqProv)[[:space:]]*:"
color brightblue "\<(Copyright|License|Summary(\(.*\))?|Distribution|Vendor|Packager|Group|BuildRoot|Prefix)[[:space:]]*:"
color brightblue "\<(Name|Version|Release|URL|Url)[[:space:]]*:"
color brightblue "\<(Source|Patch)[0-9]*[[:space:]]*:"
color brightblue "\<(License|Copyright|Distribution|Vendor|Packager)[[:space:]]*:"
color brightblue "\<((Source|Patch)[0-9]*|Nosource|Nopatch)[[:space:]]*:"
# Architectures.
color brightred "\<(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|ppciseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x?|noarch)\>"
# Architecture and OS conditionals.
@ -22,10 +22,10 @@ color yellow start="%__" end="\ "
color magenta start="%\{" end="\}"
color yellow start="%\{__" end="\}"
# Sections.
color red "^%(build$|changelog|check$|clean$|description|files|install$|package|prep$)"
color red "^%((pre|post)(trans|un)?|trigger(prein|in|un|postun)?|verifyscript)"
color red "^%(trans)?filetrigger(in|un|postun)?"
color red "^%(sourcelist|patchlist|generate_buildrequires)"
color red "^%((prep|build|install|check|clean)$|(description|files|package|changelog)\>)"
color red "^%((pre|post)(trans|un)?|trigger(prein|in|un|postun)?)\>"
color red "^%(trans)?filetrigger(in|un|postun)\>"
color red "^%(sourcelist|patchlist|generate_buildrequires|verifyscript)\>"
# Conditionals and defines.
color brightred "%(if|elif|else|endif|define|global|undefine)\>"
@ -33,8 +33,9 @@ color brightred "%(if|elif|else|endif|define|global|undefine)\>"
color cyan "(#|%dnl[[:space:]]).*"
# Special case: "# norootforbuild" is handled as main tag.
color brightblue "^# norootforbuild"
# First the author, then just the date of %changelog entries.
# For %changelog entries: first the author, then just the date.
color yellow "^\* .+>"
color brightyellow "^\* [[:alnum:] ]+ [0-9]{4} "
# Trailing whitespace.
color ,green "[[:space:]]+$"