]> git.pld-linux.org Git - packages/vim.git/blobdiff - spec.vim
- from upstream
[packages/vim.git] / spec.vim
index cdf64e94c60061713f95406c71795dcf93c992d1..927dfe4a2642e1d1a34349bf705ad45d3c7d37c6 100644 (file)
--- a/spec.vim
+++ b/spec.vim
@@ -18,9 +18,11 @@ syn sync minlines=1000
 syn match specSpecialChar contained '[][!$()\\|>^;:]'
 syn match specColon       contained ':'
 syn match specPercent     contained '%'
+syn match specSubstChar   contained '[#%]'
 
 syn match specVariables   contained '\$\h\w*' contains=specSpecialVariablesNames,specSpecialChar
 syn match specVariables   contained '\${\w*}' contains=specSpecialVariablesNames,specSpecialChar
+syn match specVariables   contained '\${\w*[#%][^}]*}' contains=specSubstChar
 
 syn match specMacroIdentifier contained '%\h\w*' contains=specMacroNameLocal,specMacroNameOther,specPercent,specSpecialChar
 "syn match specMacroIdentifier contained '%{\w*}' contains=specMacroNameLocal,specMacroNameOther,specPercent,specSpecialChar
@@ -41,6 +43,9 @@ syn match specManpageFile '[a-zA-Z]\.1'
 
 " Day, Month and most used license acronyms
 syn keyword specLicense contained GPL LGPL BSD MIT GNU Apache PHP
+syn keyword specLicenseWarning contained unknown
+syn match specLicenseWarning contained /same as perl/
+syn match specLicenseWarning contained "(enter GPL/LGPL/BSD/BSD-like/Artistic/other license name here)"
 syn keyword specWeekday contained Mon Tue Wed Thu Fri Sat Sun
 syn keyword specMonth   contained Jan Feb Mar Apr Jun Jul Aug Sep Oct Nov Dec
 syn keyword specMonth   contained January February March April May June July August September October November December
@@ -59,7 +64,7 @@ syn match specListedFilesLib    contained '/\(lib\|include\)/'me=e-1
 syn match specListedFilesDoc    contained '/\(man\d*\|doc\|info\)\>'
 syn match specListedFilesEtc    contained '/etc/'me=e-1
 syn match specListedFilesShare  contained '/share/'me=e-1
-syn cluster specListedFiles contains=specListedFilesBin,specListedFilesLib,specListedFilesDoc,specListedFilesEtc,specListedFilesShare,specListedFilesPrefix,specVariables,specSpecialChar
+syn cluster specListedFiles contains=specListedFilesBin,specListedFilesLib,specListedFilesDoc,specListedFilesEtc,specListedFilesShare,specListedFilesPrefix,specSpecialChar
 
 " specComands
 syn match   specConfigure  contained '\./configure'
@@ -67,11 +72,15 @@ syn match   specTarCommand contained '\<tar\s\+[cxvpzjf]\{,5}\s*'
 
 " XXX don't forget to update specScriptArea when updating specMacro
 syn match   specMacro contained '%\(group\|user\)\(add\|remove\)'
-syn match   specMacro contained '%\(depmod\|banner\|service\|addusertogroup\)'
+syn match   specMacro contained '%\(depmod\|banner\|service\|addusertogroup\|env_update\)'
 syn match   specMacro contained '%\(\(nsplugin\|apache_config\)_\(un\)\?install\)'
-syn match   specMacro contained '%\(webapp_\(un\)\?register\)'
+syn match   specMacro contained '%\(\(openldap_schema\|webapp\)_\(un\)\?register\)'
 syn match   specMacro contained '%\(pear_package_\(setup\|install\)\)'
 syn match   specMacro contained '%\(py_o\?comp\|py_postclean\)'
+syn match   specMacro contained '%\(build\|install\)_kernel_modules'
+syn match   specMacro contained '%ant'
+syn match   specMacro contained '%\(php\|php4\)_webserver_restart'
+syn match   specMacro contained '%update_browser_plugins\|%browser_plugins_add_browser'
 
 syn keyword specCommandSpecial contained root
 syn keyword specCommand                contained make xmkmf mkdir chmod find sed rm strip moc echo grep ls rm mv mkdir chown install cp pwd cat tail then else elif cd gzip rmdir ln eval export touch unzip bzip2
@@ -84,11 +93,12 @@ syn keyword specSpecialVariablesNames contained RPM_BUILD_ROOT RPM_BUILD_DIR RPM
 syn keyword specMacroNameOther contained buildroot buildsubdir distribution disturl ix86 name nil optflags perl_sitearch release requires_eq vendor version
 syn keyword specMacroNameOther contained __kernel_ver date debugcflags debuginfocflags epoch kgcc kgcc_package packager
 syn keyword specMacroNameOther contained pear_package_install pear_package_setup perl_archlib perl_privlib perl_sitelib
-syn keyword specMacroNameOther contained perl_vendorarch perl_vendorlib php_pear_dir py_sitedir py_scriptdir py_sitescriptdir releq_kernel_smp
-syn keyword specMacroNameOther contained releq_kernel_up requires_php_extension requires_releq_kernel_smp requires_releq_kernel_up
-syn keyword specMacroNameOther contained requires_zend_extension ruby_mod_ver_requires_eq rpmcflags rpmcxxflags rpmldflags tmpdir x8664
-syn keyword specMacroNameOther contained ruby_archdir ruby_rubylibdir ruby_ridir ruby_sitearchdir ruby_sitelibdir ruby_version
-syn keyword specMacroNameOther contained apache_modules_api
+syn keyword specMacroNameOther contained perl_vendorarch perl_vendorlib php_pear_dir py_sitedir py_scriptdir py_sitescriptdir
+syn keyword specMacroNameOther contained requires_php_extension requires_php_pdo_module
+syn keyword specMacroNameOther contained requires_zend_extension ruby_mod_ver_requires_eq ruby_ver_requires_eq rpmcflags rpmcxxflags rpmldflags tmpdir x8664
+syn keyword specMacroNameOther contained ruby_archdir ruby_rubylibdir ruby_vendorarchdir ruby_vendorlibdir ruby_ridir ruby_sitearchdir ruby_sitelibdir ruby_version
+syn keyword specMacroNameOther contained apache_modules_api php_sysconfdir php_includedir php_extensiondir _browserpluginsdir _browserpluginsconfdir
+syn keyword specMacroNameOther contained releq_kernel releq_kernel_up releq_kernel_smp requires_releq_kernel requires_releq_kernel_up requires_releq_kernel_smp
 
 syn match   specMacroNameOther contained '\<\(PATCH\|SOURCE\)\d*\>'
 
@@ -106,8 +116,12 @@ syn keyword specMacroNameLocal contained _pgp_path _pixmapsdir _pkgconfigdir _pr
 syn keyword specMacroNameLocal contained _rpmfilename _sbindir _sharedstatedir _signature _smp_mflags _sourcedir _source_payload
 syn keyword specMacroNameLocal contained _specdir _srcrpmdir _sysconfdir _target _target_alias _target_cpu _target_os _target_platform
 syn keyword specMacroNameLocal contained _target_vendor _target_base_arch _timecheck _tmppath _topdir _usr _usrsrc _var _vendor
-syn keyword specMacroNameLocal contained __cxx __cc __make __perl __python __libtoolize __autopoint __aclocal __autoconf __automake __autoheader
-syn keyword specMacroNameLocal contained __gettextize __sed __intltoolize __install
+syn keyword specMacroNameLocal contained __cxx __cc __libtoolize __autopoint __aclocal __autoconf __automake __autoheader
+syn keyword specMacroNameLocal contained __gettextize __glib_gettextize __intltoolize
+syn keyword specMacroNameLocal contained __bzip2 __cat __chgrp __chmod __chown __cp   __cpio __file __gpg __grep __gzip
+syn keyword specMacroNameLocal contained __id  __install __ld   __make   __mkdir __mkdir_p __mv __nm  __objcopy __objdump
+syn keyword specMacroNameLocal contained __patch __perl __pgp __python __rm __rsh  __sed __ssh __strip  __tar __unzip
+
 
 
 " ------------------------------------------------------------------------------
@@ -116,8 +130,8 @@ syn keyword specMacroNameLocal contained __gettextize __sed __intltoolize __inst
 
 " One line macros - valid in all ScriptAreas
 " tip: remember do include new items on specScriptArea's skip section
-syn region specSectionMacroArea oneline matchgroup=specSectionMacro start='^%\(\(un\)\?define\|dump\|trace\|patch\d*\|setup\|configure2_13\|configure\|GNUconfigure\|find_lang\|makeinstall\|bcond_with\(out\)\?\|include\)\>' end='$' contains=specCommandOpts,specMacroIdentifier,specSectionMacroBcondArea
-syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start='^%{\(configure2_13\|configure\|GNUconfigure\|find_lang\|makeinstall\)}' end='$' contains=specCommandOpts,specMacroIdentifier
+syn region specSectionMacroArea oneline matchgroup=specSectionMacro start='^%\(\(un\)\?define\|dump\|trace\|patch\d*\|setup\|configure2_13\|configure\|GNUconfigure\|find_lang\|makeinstall\|cmake\|scons\|waf\|bcond_with\(out\)\?\|include\)\>' end='$' contains=specCommandOpts,specMacroIdentifier,specSectionMacroBcondArea
+syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start='^%{\(configure2_13\|configure\|GNUconfigure\|find_lang\|makeinstall\|cmake\|scons\|waf\)}' end='$' contains=specCommandOpts,specMacroIdentifier
 syn region specSectionMacroBcondArea oneline matchgroup=specBlock start='%{!\??\(with\(out\)\?_[a-zA-Z0-9_]\+\|debug\):' skip='\\}' end='}' contains=ALLBUT,shCase
 
 " %% Files Section %%
@@ -145,9 +159,9 @@ syn case ignore
 " PreReq and BuildPreReq deprecated by Requires ans BuildRequires
 syn region specPreAmbleDeprecated oneline matchgroup=specError start='^\(Copyright\|Serial\|PreReq\|BuildPreReq\(uires\)\?\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier
 syn region specPreAmble oneline matchgroup=specCommand
-       \ start='\(^\|\(^%{!\??\(with\(out\)\?_[a-zA-Z0-9_]\+\|debug\):\)\@<=\)\(Summary\|Name\|Version\|Packager\|Requires\|Icon\|URL\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|Conflicts\|AutoRequires\|AutoReqProv\|AutoReq\|AutoProv\|Epoch\|NoSource\)'
+       \ start='\(^\|\(^%{!\??\(with\(out\)\?_[a-zA-Z0-9_]\+\|debug\):\)\@<=\)\(Summary\|Name\|Version\|Packager\|Requires\|Suggests\|Icon\|URL\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|Conflicts\|AutoRequires\|AutoReqProv\|AutoReq\|AutoProv\|Epoch\|NoSource\)'
        \ end='$\|}\@='
-       \ contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier,specSectionMacroBcondArea
+       \ contains=specEmail,specURL,specURLMacro,specLicense,specLicenseWarning,specColon,specVariables,specSpecialChar,specMacroIdentifier,specSectionMacroBcondArea
 
 " %% Description Section %%
 syn region specDescriptionArea matchgroup=specSection start='^%description' end='^%'me=e-1
@@ -160,7 +174,7 @@ syn region specPackageArea matchgroup=specSection start='^%package' end='^%'me=e
 " %% Scripts Section %%
 syn region specScriptArea matchgroup=specSection
        \ start='^%\(prep\|build\|install\|clean\|pre\|postun\|preun\|post\|triggerin\|triggerun\|triggerpostun\|pretrans\|posttrans\|verifyscript\|check\)\>'
-       \ skip='^%{\|^%\(define\|patch\d*\|configure2_13\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\|useradd\|groupadd\|addusertogroup\|banner\|service\|py_o\?comp\|py_postclean\|\(\(nsplugin\|apache_config\)_\(un\)\?install\)\|webapp_\(un\)\?register\|depmod\|pear_package_\(setup\|install\)\)\>'
+       \ skip='^%{\|^%\(define\|patch\d*\|configure2_13\|configure\|ant\|GNUconfigure\|setup\|find_lang\|makeinstall\|cmake\|scons\|waf\|useradd\|groupadd\|addusertogroup\|banner\|service\|env_update\|py_o\?comp\|py_postclean\|\(openldap_schema\|webapp\)_\(un\)\?register\|depmod\|pear_package_\(setup\|install\)\|\(build\|install\)_kernel_modules\|php_webserver_restart\|php4_webserver_restart\|update_browser_plugins\)\>'
        \ end='^%'me=e-1
        \ contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2,specSectionMacroBcondArea
 " XXX don't forget to update specMacro when updating specScriptArea skip definition
@@ -169,7 +183,7 @@ syn region specScriptArea matchgroup=specSection
 syn region specChangelogArea matchgroup=specSection start='^%changelog' end='^%'me=e-1
        \ contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense,specRevision,specLogMessage,specLogError
 
-syn match specRevision contained "^Revision [.0-9]\+  [/0-9]\+ [:0-9]\+  [a-zA-Z0-9]\+$"
+syn match specRevision contained "^Revision [.0-9]\+  [-/0-9]\+ [:0-9]\+  [a-zA-Z0-9]\+$"
 syn region specLogMessage contained start="^[- ] " end="$" contains=specLogError,specURL,specEmail
 syn match specLogError contained "%%"
 
@@ -187,17 +201,17 @@ syn region shQuote1 contained matchgroup=shQuoteDelim start=+'+ skip=+\\'+ end=+
 syn region shQuote2 contained matchgroup=shQuoteDelim start=+"+ skip=+\\"+ end=+"+ contains=specVariables,specMacroIdentifier,specSectionMacroBcondArea
 
 syn match shOperator contained '[><|!&;]\|[!=]='
-syn region shDo transparent matchgroup=specBlock start="\<do\>" end="\<done\>" contains=ALLBUT,shFunction,shDoError,shCase,specPreAmble,@specListedFiles
+syn region shDo transparent matchgroup=specBlock start="\(^\|\s\)do\(\s\|$\)" end="\(^\|\s\)done\(\s\|$\)" contains=ALLBUT,shDoError,shCase,specPreAmble,@specListedFiles
 
 syn region specIf  matchgroup=specBlock start="%ifosf\|%ifos\|%ifnos\|%ifarch\|%ifnarch\|ifdef\|ifndef\|%if\|%else"  end='%endif'  contains=ALLBUT, specIfError, shCase, shComment
 
-syn region shIf transparent matchgroup=specBlock start="\<if\>" end="\<fi\>" contains=ALLBUT,shFunction,shIfError,shCase,@specListedFiles
+syn region shIf transparent matchgroup=specBlock start="\(^\|\s\)if\(\s\|$\)" end="\(^\|\s\)fi\(\s\|$\)" contains=ALLBUT,shIfError,shCase,@specListedFiles
 
-syn region shFor  matchgroup=specBlock start="\<for\>" end="\<in\>" contains=ALLBUT,shFunction,shInError,shCase,@specListedFiles
+syn region shFor  matchgroup=specBlock start="\(^\|\s\)for\(\s\|$\)" end="\(^\|\s\)in\(\s\|$\)" contains=ALLBUT,shInError,shCase,@specListedFiles
 
-syn region shCaseEsac transparent matchgroup=specBlock start="\<case\>" matchgroup=NONE end="\<in\>"me=s-1 contains=ALLBUT,shFunction,shCaseError,@specListedFiles nextgroup=shCaseEsac
-syn region shCaseEsac matchgroup=specBlock start="\<in\>" end="\<esac\>" contains=ALLBUT,shFunction,shCaseError,@specListedFilesBin
-syn region shCase matchgroup=specBlock contained start=")"  end=";;" contains=ALLBUT,shFunction,shCaseError,shCase,@specListedFiles
+syn region shCaseEsac transparent matchgroup=specBlock start="\(^\|\s\)case\(\s\|$\)" matchgroup=NONE end="\(^\|\s\)in\(\s\|$\)"me=s-1 contains=ALLBUT,@specListedFiles nextgroup=shCaseEsac
+syn region shCaseEsac matchgroup=specBlock start="\(^\|\s\)in\(\s\|$\)" end="\(^\|\s\)esac\(\s\|$\)" contains=ALLBUT,@specListedFilesBin
+syn region shCase matchgroup=specBlock contained start=")"  end=";;" contains=ALLBUT,shCase,@specListedFiles
 
 syn sync match shDoSync       grouphere  shDo       "\<do\>"
 syn sync match shDoSync       groupthere shDo       "\<done\>"
@@ -258,6 +272,7 @@ if version >= 508 || !exists("did_spec_syntax_inits")
   HiLink specFilesDirective            specSectionMacro
   HiLink specFilesOpts                 specOpts
   HiLink specLicense                   String
+  HiLink specLicenseWarning            specError
   HiLink specMacroNameLocal            specGlobalMacro
   HiLink specMacroNameOther            specGlobalMacro
   HiLink specManpageFile               NONE
@@ -267,6 +282,7 @@ if version >= 508 || !exists("did_spec_syntax_inits")
   HiLink specPackageOpts               specOpts
   HiLink specPercent                   Special
   HiLink specSpecialChar               Special
+  HiLink specSubstChar                 Special
   HiLink specSpecialVariables          specGlobalMacro
   HiLink specSpecialVariablesNames     specGlobalMacro
   HiLink specTarCommand                        specCommand
This page took 0.262542 seconds and 4 git commands to generate.