vim.spec: clean up dependencies and provide comments

This commit is contained in:
Zdenek Dohnal 2021-06-24 11:35:59 +02:00
parent ece46e8119
commit dc4c46d622

113
vim.spec
View File

@ -30,6 +30,7 @@ URL: http://www.vim.org/
Name: vim
Version: %{baseversion}.%{patchlevel}
Release: 1%{?dist}
Epoch: 2
License: Vim and MIT
Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}-%{patchlevel}.tar.bz2
Source1: virc
@ -73,14 +74,18 @@ Patch3017: vim-python3-tests.patch
# fips warning
Patch3018: vim-crypto-warning.patch
# uses autoconf in spec file
BuildRequires: autoconf
%if %{desktop_file}
# for /usr/bin/desktop-file-install
BuildRequires: desktop-file-utils >= %{desktop_file_utils_version}
Requires: desktop-file-utils
%endif
# gcc is no longer in buildroot by default
BuildRequires: gcc
# uses make
BuildRequires: make
%if %{with libsodium_crypt}
BuildRequires: libsodium
%endif
# for translations
BuildRequires: gettext
# glibc in F35 bootstraped several conversion formats from
# iconv into a separate package. Vim needs those additional
# formats during compilation.
@ -89,25 +94,39 @@ BuildRequires: libsodium
%if 0%{?fedora} >= 35
BuildRequires: glibc-gconv-extra
%endif
BuildRequires: python3-devel ncurses-devel gettext perl-devel
BuildRequires: perl-generators
BuildRequires: perl(ExtUtils::Embed) perl(ExtUtils::ParseXS)
BuildRequires: libacl-devel gpm-devel autoconf file
# for mouse support in console
BuildRequires: gpm-devel
# for setting ACL on created files
BuildRequires: libacl-devel
# selinux support
%if %{WITH_SELINUX}
BuildRequires: libselinux-devel
%endif
%if "%{withruby}" == "1"
BuildRequires: ruby-devel ruby
# for xchacha20 encryption
%if %{with libsodium_crypt}
BuildRequires: libsodium
%endif
# for lua plugin
%if "%{withlua}" == "1"
BuildRequires: lua-devel
%endif
%if %{desktop_file}
# for /usr/bin/desktop-file-install
Requires: desktop-file-utils
BuildRequires: desktop-file-utils >= %{desktop_file_utils_version}
# uses make
BuildRequires: make
# screen handling library
BuildRequires: ncurses-devel
# for perl plugin
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: perl(ExtUtils::Embed)
BuildRequires: perl(ExtUtils::ParseXS)
# for python plugin
BuildRequires: python3-devel
# for ruby plugin
%if "%{withruby}" == "1"
BuildRequires: ruby
BuildRequires: ruby-devel
%endif
Epoch: 2
%description
VIM (VIsual editor iMproved) is an updated and improved version of the
@ -165,6 +184,7 @@ only available when the vim-common package is installed.
%package enhanced
Summary: A version of the VIM editor which includes recent enhancements
# remove Conflicts for wrappers after F34 is EOL
Conflicts: vim-wrappers < 2:8.2.2488-1
# vim bundles libvterm, which is used during build - so we need to provide
# bundled libvterm for catching possible libvterm CVEs
@ -172,17 +192,22 @@ Provides: bundled(libvterm)
Provides: vim
Provides: %{_bindir}/mergetool
Provides: %{_bindir}/vim
Requires: vim-common = %{epoch}:%{version}-%{release} which
Requires: vim-common = %{epoch}:%{version}-%{release}
# required for vimtutor (#395371)
Requires: which
# suggest python3, python2, lua, ruby and perl packages because of their
# embedded functionality in Vim/GVim
Suggests: python3 python3-libs
Suggests: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) perl-devel
%if "%{withruby}" == "1"
Suggests: ruby-libs ruby
%endif
%if "%{withlua}" == "1"
Suggests: lua-libs
%endif
Suggests: perl-devel
Suggests: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Suggests: python3
Suggests: python3-libs
%if "%{withruby}" == "1"
Suggests: ruby
Suggests: ruby-libs
%endif
%description enhanced
VIM (VIsual editor iMproved) is an updated and improved version of the
@ -207,32 +232,49 @@ packages that add vim files, p.e. additional syntax files or filetypes.
%package X11
Summary: The VIM version of the vi editor for the X Window System - GVim
# needed in configure script to have correct macros enabled for GUI (#1603272)
# devel of libICE, gtk3, libSM, libX11, libXpm and libXt are needed in buildroot
# so configure script can have correct macros enabled for GUI (#1603272)
# generic gnome toolkit for graphical support
BuildRequires: gtk3-devel
# inter-client exchange library - for X session management protocol
BuildRequires: libICE-devel
# X session management library
BuildRequires: libSM-devel
# core X11 protocol client library
BuildRequires: libX11-devel
# X PixMap library for X11 - for creating images in X PixMap format
BuildRequires: libXpm-devel
# X Toolkit Intrinsics library - working with widgets?
BuildRequires: libXt-devel
# for testing validity of appdata file
BuildRequires: libappstream-glib
# for sound support
BuildRequires: libcanberra-devel
BuildRequires: libX11-devel
BuildRequires: libSM-devel
BuildRequires: libXt-devel
BuildRequires: libXpm-devel
BuildRequires: libICE-devel
Provides: gvim
Provides: %{_bindir}/mergetool
Provides: %{_bindir}/gvim
# GVIM graphics are based on GTK3
Requires: gtk3
# needed for icons (#226526)
Requires: hicolor-icon-theme
Requires: vim-common = %{epoch}:%{version}-%{release} libattr >= 2.4 gtk3
# for getting/setting extended attributes - they are pairs (name:value)
# from inodes (files, dirs etc.)
Requires: libattr >= 2.4
Requires: vim-common = %{epoch}:%{version}-%{release}
# suggest python3, python2, lua, ruby and perl packages because of their
# embedded functionality in Vim/GVim
Suggests: python3 python3-libs
Suggests: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) perl-devel
%if "%{withruby}" == "1"
Suggests: ruby-libs ruby
%endif
%if "%{withlua}" == "1"
Suggests: lua-libs
%endif
Suggests: perl-devel
Suggests: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Suggests: python3
Suggests: python3-libs
%if "%{withruby}" == "1"
Suggests: ruby
Suggests: ruby-libs
%endif
%description X11
VIM (VIsual editor iMproved) is an updated and improved version of the
@ -253,6 +295,7 @@ Summary: Set vim as the default editor
BuildArch: noarch
Conflicts: system-default-editor
# conflict with nano-default-editor which doesn't provide system-default-editor
# remove after F33 is EOL
Conflicts: nano-default-editor < 5.3-3
Provides: system-default-editor
Requires: vim-enhanced