blob: 9a15609ad05f3169b5b2f8f746f551cbd948d524 (
plain)
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
|
%define syntax vcl
Summary: Vim syntax: Varnish configuation Language
Name: vim-syntax-%{syntax}
Version: 1.3
Release: 0.2
License: GPL v2
Group: Applications/Editors/Vim
Source0: vcl.vim
URL: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/vim-syntax-vcl/
Requires: vim-rt >= 4:7.2.170
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _vimdatadir %{_datadir}/vim
%description
Vim syntax for Varnish configuation Language (VCL).
%prep
rev=$(awk '/^".*Revision:/{print $5}' %{SOURCE0})
if [ "$rev" != "%{version}" ]; then
: Update version $rev, and retry
exit 1
fi
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_vimdatadir}/{syntax,ftdetect}
cp -a %{SOURCE0} $RPM_BUILD_ROOT%{_vimdatadir}/syntax
cat > $RPM_BUILD_ROOT%{_vimdatadir}/ftdetect/%{syntax}.vim <<-EOF
au BufNewFile,BufRead *.vcl setf %{syntax}
EOF
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%{_vimdatadir}/syntax/*.vim
%{_vimdatadir}/ftdetect/*.vim
|