diff --git a/.gitignore b/.gitignore index e69de29..4c4de05 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/vim-go-1.26.tar.gz +/vim-go-1.28.tar.gz diff --git a/sources b/sources index e69de29..6c2462e 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (vim-go-1.28.tar.gz) = ebd4fbeabb3ebea0c63c1b70dd8bbf7de6ba20b33e40159bcc88d8d52a10975ab4b0ad849a4d8dd1edc2d073ca7c7ae17843cd70d415f159f07d2a212005825b diff --git a/vim-go.metainfo.xml b/vim-go.metainfo.xml new file mode 100644 index 0000000..8a316cc --- /dev/null +++ b/vim-go.metainfo.xml @@ -0,0 +1,12 @@ + + + + vim-go + gvim.desktop + vim-go + Go development plugin for Vim + https://github.com/fatih/vim-go + CC0-1.0 + BSD-3-Clause + nforro@redhat.com + diff --git a/vim-go.spec b/vim-go.spec new file mode 100644 index 0000000..4e836c7 --- /dev/null +++ b/vim-go.spec @@ -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 +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ó - 1.28-1 +- Update to 1.28 + Resolves: #2208452 + +* Tue Jun 28 2022 Nikola Forró - 1.26-1 +- Initial import