File vimerl.spec of Package vimerl
%define vimplugin_dir %_datadir/vim/site
%define bname vimerl
Name: %bname
Version: 1.4.3
Release: 2
Summary: The Erlang plugin for Vim
License: Vim
Group: Productivity/Text/Editors
URL: https://github.com/jimenezrick/vim-%bname
Source: %bname-%version.tar.xz
Patch: %bname-%version-git.patch
BuildArch: noarch
Requires: vim >= 7.4
BuildRequires: vim >= 7.4
%description
Vimerl is a plugin for programming in Erlang. It provides several nice features
to make your life easier when writing code.
The plugin offers the following features:
- Syntax highlighting
- Code indenting
- Code folding
- Code omni completion
- Syntax checking with |quickfix| support
- Code skeletons for the OTP behaviours
- Uses configuration from Rebar
- Pathogen compatible (http://github.com/tpope/vim-pathogen)
%prep
%setup -q -n %bname-%version
%patch -p1
sed -r -i '1s|^#![[:blank:]]*/usr/bin/env[[:blank:]]+(escript[[:blank:]]*)|#!%_bindir/\1|' \
autoload/*.erl compiler/*.erl indent/*.erl
%build
%install
for d in autoload compiler ftdetect ftplugin indent plugin syntax; do
install -d -m 0755 %buildroot%vimplugin_dir/$d
install -p -m 0644 $d/*.vim %buildroot%vimplugin_dir/$d/
done
for d in autoload compiler indent; do
install -p -m 0755 $d/*.erl %buildroot%vimplugin_dir/$d/
done
install -d -m 0755 %buildroot%vimplugin_dir/doc
install -p -m 0644 doc/* %buildroot%vimplugin_dir/doc/
install -d -m 0755 %buildroot%vimplugin_dir/plugin/erlang_skels
install -p -m 0644 plugin/erlang_skels/* %buildroot%vimplugin_dir/plugin/erlang_skels/
%files
%defattr(-,root,root)
%doc README LICENSE
%vimplugin_dir/autoload/*
%vimplugin_dir/compiler
%vimplugin_dir/ftdetect/*
%vimplugin_dir/ftplugin
%vimplugin_dir/indent
%vimplugin_dir/plugin/*
%vimplugin_dir/syntax/*
%vimplugin_dir/doc/*
%changelog
* Sun May 07 2017 Led <ledest@gmail.com> 1.4.3-2
- remove bashism in %%prep section
* Mon Mar 09 2015 Led <ledest@gmail.com> 1.4.3-1
- initial build