99 lines
2.7 KiB
RPMSpec
99 lines
2.7 KiB
RPMSpec
# There is no better way how to obtain the vimfiles folder location :/
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=844975
|
|
%global vimfiles %{_datadir}/vim/vimfiles
|
|
|
|
%global rubyabi 1.9.1
|
|
%global commandt_so_dir %{ruby_vendorarchdir}/command-t
|
|
|
|
Name: vim-command-t
|
|
Version: 1.4
|
|
Release: 1%{?dist}
|
|
Summary: An extremely fast, intuitive mechanism for opening files in VIM
|
|
Group: Applications/Editors
|
|
License: BSD
|
|
URL: https://wincent.com/products/command-t
|
|
# Officialy distributed only using vimball:
|
|
# https://wincent.com/issues/1978
|
|
# git clone git://git.wincent.com/command-t.git && cd command-t/
|
|
# git archive 1.4 -o command-t-1.4.tar.gz
|
|
Source0: command-t-%{version}.tar.gz
|
|
Requires: ruby(abi) = %{rubyabi}
|
|
Requires: vim-common
|
|
BuildRequires: ruby(abi) = %{rubyabi}
|
|
BuildRequires: ruby-devel
|
|
BuildRequires: %{_bindir}/rspec
|
|
BuildRequires: rubygem(rr)
|
|
Requires(post): %{_bindir}/vim
|
|
Requires(postun): %{_bindir}/vim
|
|
|
|
%description
|
|
The Command-T plug-in for VIM provides an extremely fast, intuitive mechanism
|
|
for opening files with a minimal number of keystrokes. It's named "Command-T"
|
|
because it is inspired by the "Go to File" window bound to Command-T
|
|
in TextMate.
|
|
|
|
Files are selected by typing characters that appear in their paths, and are
|
|
ordered by an algorithm which knows that characters that appear in certain
|
|
locations (for example, immediately after a path separator) should be given
|
|
more weight.
|
|
|
|
%prep
|
|
%setup -q -c
|
|
|
|
%build
|
|
pushd ./ruby/command-t
|
|
|
|
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
|
|
ruby extconf.rb --vendor
|
|
make %{?_smp_mflags}
|
|
|
|
popd
|
|
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{vimfiles}
|
|
cp -par {doc,plugin,ruby} %{buildroot}%{vimfiles}
|
|
|
|
mkdir -p %{buildroot}%{commandt_so_dir}
|
|
chmod 0755 %{buildroot}%{vimfiles}/ruby/command-t/ext.so
|
|
mv %{buildroot}%{vimfiles}/ruby/command-t/ext.so %{buildroot}%{commandt_so_dir}
|
|
|
|
# Remove all dot files.
|
|
find %{buildroot}%{vimfiles} -name '.*' -delete
|
|
|
|
# Replace symlink with copy.
|
|
rm README.txt
|
|
cp -pa doc/command-t.txt README.txt
|
|
|
|
%check
|
|
# Get rid of Bundler
|
|
sed -i '24,+5d' spec/spec_helper.rb
|
|
|
|
rspec -Iruby spec
|
|
|
|
%post
|
|
vim -c ":helptags %{vimfiles}/doc" -c :q &> /dev/null
|
|
|
|
%postun
|
|
> %{vimfiles}/doc/tags
|
|
vim -c ":helptags %{vimfiles}/doc" -c :q &> /dev/null
|
|
|
|
%files
|
|
%doc LICENSE
|
|
%doc README.txt
|
|
%{commandt_so_dir}
|
|
%{vimfiles}/doc/*
|
|
%{vimfiles}/plugin/*
|
|
%exclude %{vimfiles}/ruby/command-t/ext*
|
|
%exclude %{vimfiles}/ruby/command-t/*.o
|
|
%exclude %{vimfiles}/ruby/command-t/*.h
|
|
%exclude %{vimfiles}/ruby/command-t/*.c
|
|
%exclude %{vimfiles}/ruby/command-t/Makefile
|
|
%exclude %{vimfiles}/ruby/command-t/mkmf.log
|
|
%exclude %{vimfiles}/ruby/command-t/depend
|
|
%{vimfiles}/ruby/*
|
|
|
|
|
|
%changelog
|
|
* Fri Aug 03 2012 Vít Ondruch <vondruch@redhat.com> - 1.4-1
|
|
- Initial package.
|