Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Nikola Forró
cd8972c5ec update to 1.28
- resolves: #2208452
2023-05-29 13:28:49 +02:00
Nikola Forró
60bc597f71 Initial import 2022-06-28 17:39:05 +02:00
4 changed files with 112 additions and 0 deletions

2
.gitignore vendored
View file

@ -0,0 +1,2 @@
/vim-go-1.26.tar.gz
/vim-go-1.28.tar.gz

View file

@ -0,0 +1 @@
SHA512 (vim-go-1.28.tar.gz) = ebd4fbeabb3ebea0c63c1b70dd8bbf7de6ba20b33e40159bcc88d8d52a10975ab4b0ad849a4d8dd1edc2d073ca7c7ae17843cd70d415f159f07d2a212005825b

12
vim-go.metainfo.xml Normal file
View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2015 Nikola Forró <nforro@redhat.com> -->
<component type="addon">
<id>vim-go</id>
<extends>gvim.desktop</extends>
<name>vim-go</name>
<summary>Go development plugin for Vim</summary>
<url type="homepage">https://github.com/fatih/vim-go</url>
<metadata_license>CC0-1.0</metadata_license>
<project_license>BSD-3-Clause</project_license>
<updatecontact>nforro@redhat.com</updatecontact>
</component>

97
vim-go.spec Normal file
View file

@ -0,0 +1,97 @@
%global vimfiles_root %{_datadir}/vim/vimfiles
%global appdata_dir %{_datadir}/appdata
# do not build debugsource and debuginfo subpackages
%global debug_package %{nil}
Name: vim-go
Version: 1.28
Release: 1%{?dist}
Summary: Go development plugin for Vim
License: BSD
URL: https://github.com/fatih/vim-go
Source0: https://github.com/fatih/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: %{name}.metainfo.xml
# cannot build as noarch until golang is available on all arches
#BuildArch: noarch
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
ExclusiveArch: %{?golang_arches}%{!?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,gosnippets,indent,plugin,rplugin,syntax,templates} \
%{buildroot}%{vimfiles_root}
# remove version control files
find %{buildroot}%{vimfiles_root} -name .gitignore -o -name .gitkeep -delete
mkdir -p %{buildroot}%{appdata_dir}
install -m 644 %{SOURCE1} %{buildroot}%{appdata_dir}
# up until version 1.22, %%{vimfiles_root}/autoload/go/test-fixtures/fmt/src/imports was a symlink,
# but it changed to a directory in later versions - remove it to avoid conflict
%pretrans -p <lua>
path = rpm.expand('%{vimfiles_root}') .. '/autoload/go/test-fixtures/fmt/src/imports'
st = posix.stat(path)
if st and st.type == 'link' then
os.remove(path)
end
%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}/gosnippets/*
%{vimfiles_root}/indent/*
%{vimfiles_root}/plugin/*
%{vimfiles_root}/rplugin/*
%{vimfiles_root}/syntax/*
%{vimfiles_root}/templates/*
%{appdata_dir}/%{name}.metainfo.xml
%changelog
* Mon May 29 2023 Nikola Forró <nforro@redhat.com> - 1.28-1
- Update to 1.28
Resolves: #2208452
* Tue Jun 28 2022 Nikola Forró <nforro@redhat.com> - 1.26-1
- Initial import