4a74e5ecc0
optional (behind bcond) - this fixes s390x - enable luajit for riscv64, which leaves ppc64le as the lone arch which uses lua - remove post and postun from the spec template, as most standard packages don't need this (and ChangeLog file, as most projects dont use this file anymore. - revert back to default compiler flags OBS-URL: https://build.opensuse.org/package/show/editors/neovim?expand=0&rev=156
40 lines
1.2 KiB
VimL
40 lines
1.2 KiB
VimL
if exists("loaded_spec") || &cp
|
|
finish
|
|
endif
|
|
let loaded_spec = 1
|
|
|
|
function! SKEL_spec()
|
|
language time en_US
|
|
if $USER != ''
|
|
let login = $USER
|
|
elseif $LOGNAME != ''
|
|
let login = $LOGNAME
|
|
else
|
|
let login = 'unknown'
|
|
endif
|
|
let newline = stridx(login, "\n")
|
|
if newline != -1
|
|
let login = strpart(login, 0, newline)
|
|
endif
|
|
if $HOSTNAME != ''
|
|
let hostname = $HOSTNAME
|
|
else
|
|
let hostname = system('hostname -f')
|
|
if v:shell_error
|
|
let hostname = 'localhost'
|
|
endif
|
|
endif
|
|
let newline = stridx(hostname, "\n")
|
|
if newline != -1
|
|
let hostname = strpart(hostname, 0, newline)
|
|
endif
|
|
exe "%s/specCURRENT_YEAR/" . strftime("%Y") . "/ge"
|
|
exe "%s/specRPM_CREATION_DATE/" . strftime("%a\ %b\ %d\ %Y") . "/ge"
|
|
exe "%s/specRPM_CREATION_AUTHOR_MAIL/" . login . "@" . hostname . "/ge"
|
|
exe "%s/specRPM_CREATION_NAME/" . expand("%:t:r") . "/ge"
|
|
setf spec
|
|
endfunction
|
|
|
|
" Skeleton for spec files
|
|
autocmd BufNewFile *.spec call SKEL_spec()
|