108 lines
2.8 KiB
RPMSpec
108 lines
2.8 KiB
RPMSpec
%global vimfiles_root %{_datadir}/vim/vimfiles
|
|
%global appdata_dir %{_datadir}/appdata
|
|
|
|
Name: vim-go
|
|
Version: 1.2
|
|
Release: 1%{?dist}
|
|
Summary: Go development plugin for Vim
|
|
Group: Applications/Editors
|
|
|
|
License: BSD
|
|
URL: https://github.com/fatih/vim-go
|
|
Source0: https://github.com/fatih/vim-go/archive/v%{version}.tar.gz
|
|
Source1: %{name}.metainfo.xml
|
|
|
|
# if %%go_arches is undefined, require golang
|
|
%if %{?go_arches:0}%{!?go_arches:1}
|
|
BuildRequires: golang
|
|
%endif
|
|
|
|
Requires: vim-common
|
|
Requires(post): vim
|
|
Requires(postun): vim
|
|
|
|
Requires: golang
|
|
|
|
BuildArch: noarch
|
|
|
|
# if %%golang_arches is defined, use it instead of %%go_arches
|
|
%if %{?golang_arches:1}%{!?golang_arches:0}
|
|
ExclusiveArch: %{golang_arches} noarch
|
|
%else
|
|
ExclusiveArch: %{go_arches} noarch
|
|
%endif
|
|
|
|
%description
|
|
Go (golang) support for Vim. It comes with predefined sensible settings
|
|
(like auto gofmt on save), has auto-complete, snippet support, improved syntax
|
|
highlighting, go tool-chain commands, etc...
|
|
If needed vim-go installs all necessary binaries for providing seamless Vim
|
|
integration with current commands. It's highly customizable and each individual
|
|
feature can be disabled/enabled easily.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
|
|
%build
|
|
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{vimfiles_root}
|
|
cp -ar {autoload,compiler,doc,ftdetect,ftplugin,indent,plugin,syntax} \
|
|
%{buildroot}%{vimfiles_root}
|
|
|
|
mkdir -p %{buildroot}%{appdata_dir}
|
|
install -m 644 %{SOURCE1} %{buildroot}%{appdata_dir}
|
|
|
|
|
|
%post
|
|
vim -c ":helptags %{vimfiles_root}/doc" -c ":q" &> /dev/null || :
|
|
|
|
|
|
%postun
|
|
> %{vimfiles_root}/doc/tags || :
|
|
vim -c ":helptags %{vimfiles_root}/doc" -c ":q" &> /dev/null || :
|
|
|
|
|
|
%files
|
|
%license LICENSE
|
|
%doc README.md
|
|
%{vimfiles_root}/autoload/*
|
|
%{vimfiles_root}/compiler/*
|
|
%{vimfiles_root}/doc/*
|
|
%{vimfiles_root}/ftdetect/*
|
|
%{vimfiles_root}/ftplugin/*
|
|
%{vimfiles_root}/indent/*
|
|
%{vimfiles_root}/plugin/*
|
|
%{vimfiles_root}/syntax/*
|
|
%{appdata_dir}/%{name}.metainfo.xml
|
|
|
|
|
|
%changelog
|
|
* Fri Oct 02 2015 Nikola Forró <nforro@redhat.com> - 1.2-1
|
|
- Updated to 1.2
|
|
Resolves #1268172
|
|
|
|
* Wed Jul 29 2015 Nikola Forró <nforro@redhat.com> - 1.1-1
|
|
- Updated to 1.1
|
|
- Added license file
|
|
Resolves #1247667
|
|
|
|
* Mon Jul 27 2015 Nikola Forró <nforro@redhat.com> - 1.0.5-5
|
|
- Added Gnome Software plug-in AppData
|
|
- Added missing ExclusiveArch and BuildRequires
|
|
|
|
* Fri Jul 24 2015 Nikola Forró <nforro@redhat.com> - 1.0.5-4
|
|
- Handled exit codes of commands in scriptlets
|
|
- Unmarked doc directory previously marked as %%doc
|
|
|
|
* Thu Jul 23 2015 Nikola Forró <nforro@redhat.com> - 1.0.5-3
|
|
- Require golang
|
|
- Added command to %%postun to clear vim tags
|
|
|
|
* Thu Jul 23 2015 Nikola Forró <nforro@redhat.com> - 1.0.5-2
|
|
- Removed unneeded rm command in %%postun section
|
|
|
|
* Tue Jul 21 2015 Nikola Forró <nforro@redhat.com> - 1.0.5-1
|
|
- Initial package
|