Blob Blame History Raw
%global vimfiles_root %{_datadir}/vim/vimfiles
%global appdata_dir %{_datadir}/appdata

Name:           vim-go
Version:        1.13
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

# Fedora => noarch, the rest arch-specific
%if 0%{?fedora}
BuildArch:      noarch
%endif

# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
ExclusiveArch:  %{?golang_arches:%{golang_arches} noarch}%{!?golang_arches:%{ix86} x86_64 %{arm}}

Requires:       vim-common
Requires(post): vim
Requires(postun): vim

Requires:       golang

%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 Jun 09 2017 Nikola Forró <nforro@redhat.com> - 1.13-1
- Update to 1.13
  Resolves #1459151

* Fri Mar 31 2017 Nikola Forró <nforro@redhat.com> - 1.12-1
- Update to 1.12
  Resolves #1437703

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jan 10 2017 Nikola Forró <nforro@redhat.com> - 1.11-1
- Update to 1.11
  Resolves #1411559

* Tue Nov 29 2016 Nikola Forró <nforro@redhat.com> - 1.10-1
- Update to 1.10
  Resolves #1398310

* Thu Sep 15 2016 Nikola Forró <nforro@redhat.com> - 1.9-1
- Update to 1.9
  Resolves #1376315

* Wed Aug 10 2016 jchaloup <jchaloup@redhat.com> - 1.8-3
- No ppc for epel7
  related: #1361932

* Sat Aug 06 2016 jchaloup <jchaloup@redhat.com> - 1.8-2
- build section is empty => no Golang needed
  related: #1361932

* Mon Aug 01 2016 Nikola Forró <nforro@redhat.com> - 1.8-1
- Update to 1.8
  Resolves #1361932

* Wed Jun 08 2016 Nikola Forró <nforro@redhat.com> - 1.7.1-1
- Update to 1.7.1
  Resolves #1343269

* Tue Apr 26 2016 Nikola Forró <nforro@redhat.com> - 1.6-1
- Update to 1.6
  Resolves #1330382

* Thu Mar 17 2016 Nikola Forró <nforro@redhat.com> - 1.5-1
- Update to 1.5
  Resolves #1318468

* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jan 21 2016 Nikola Forró <nforro@redhat.com> - 1.4-2
- Fix mode of non-executable files

* Wed Jan 20 2016 Nikola Forró <nforro@redhat.com> - 1.4-1
- Updated to 1.4
  Resolves #1300128

* Mon Nov 23 2015 Nikola Forró <nforro@redhat.com> - 1.3-1
- Updated to 1.3
  Resolves #1284252

* 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