File vim-syntastic.spec of Package vim-syntastic
%define realname syntastic
%define srcext tar.bz2
# Vim data directory
%if 0%{?suse_version}
%define vimdir %{_datadir}/vim/site
%else
%define vimdir %{_datadir}/vim/vimfiles
%endif
# Common info
Name: vim-%{realname}
Version: 0
Release: %{?extraver:0.}1%{?dist}
License: WTFPL
Group: Productivity/Editors/Vi
URL: https://github.com/scrooloose/syntastic
Summary: Syntax checking plugin for Vim
# Install-time parameters
Requires: vim vim-pathogen
Provides: %{realname} = %{version}
# Build-time parameters
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-root
Source: %{realname}-%{version}%{?extraver}.%{srcext}
%description
Syntastic is a syntax checking plugin for Vim that runs files through external
syntax checkers and displays any resulting errors to the user. This can be done
on demand, or automatically as files are saved. If syntax errors are detected,
the user is notified and is happy because they didn't have to compile their code
or execute their script to find them.
# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{version}%{?extraver}
%build
%install
%{__install} -d -m755 %{buildroot}%{vimdir}/bundle/syntastic
cp -r autoload %{buildroot}%{vimdir}/bundle/syntastic/
cp -r doc %{buildroot}%{vimdir}/bundle/syntastic/
cp -r plugin %{buildroot}%{vimdir}/bundle/syntastic/
cp -r syntax_checkers %{buildroot}%{vimdir}/bundle/syntastic/
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
%doc LICENCE README.markdown
%dir %{vimdir}/bundle
%dir %{vimdir}
%dir %{_datadir}/vim
%{vimdir}/bundle/syntastic
%changelog