SHA256
1
0
forked from pool/vim

Accepting request 593350 from home:StefanBruens:branches:openSUSE:Factory

- Pre-convert gvim icons, otherwise building vim depends on
  rsvg-convert -> librsvg -> cargo -> Rust -> LLVM
- Cleanup SVG icon, make lines pixel-grid aligned
- Correct RPM Group

OBS-URL: https://build.opensuse.org/request/show/593350
OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=493
This commit is contained in:
Ismail Dönmez
2018-04-04 13:26:00 +00:00
committed by Git OBS Bridge
parent 29f5e43368
commit 9fa0824b67
8 changed files with 37 additions and 12 deletions

View File

@@ -28,7 +28,7 @@ Version: %{pkg_version}.%{patchlevel_compact}
Release: 0
Summary: Vi IMproved
License: Vim
Group: Productivity/Editors/Vi
Group: Productivity/Text/Editors
Url: http://www.vim.org/
Source: https://github.com/vim/vim/archive/v%{pkg_version}.%{patchlevel}.tar.gz#/vim-%{pkg_version}.%{patchlevel}.tar.gz
Source3: suse.vimrc
@@ -43,6 +43,11 @@ Source19: gvim.desktop
Source20: spec.skeleton
Source23: apparmor.vim
Source24: gvim.svg
Source25: gvim_24.png
Source26: gvim_32.png
Source27: gvim_48.png
Source28: gvim_64.png
Source29: gvim_96.png
Source99: %{name}-7.4-rpmlintrc
Patch3: %{name}-7.4-disable_lang_no.patch
Patch4: %{name}-7.3-gvimrc_fontset.patch
@@ -74,8 +79,6 @@ BuildRequires: pkgconfig
%if %{with python2}
BuildRequires: python2-devel
%endif
# Needed to convert svg to png
BuildRequires: rsvg-view
BuildRequires: ruby-devel
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(gtk+-3.0)
@@ -107,7 +110,7 @@ file name completion, block operations, and editing of binary data.
%package data
Summary: Data files needed for extended vim functionality
# Used to be in vim-plugins package
Group: Productivity/Editors/Vi
Group: Productivity/Text/Editors
Obsoletes: vim-plugin-matchit <= 1.13.2
Provides: vim-plugin-matchit = 1.13.2
Requires: vim-data-common = %{version}-%{release}
@@ -118,7 +121,7 @@ This package contains optional runtime & syntax files for vim.
%package data-common
Summary: Common Data files for vim & gvim
Group: Productivity/Editors/Vi
Group: Productivity/Text/Editors
BuildArch: noarch
%description data-common
@@ -126,7 +129,7 @@ This package contains common runtime & syntax files for vim and gvim.
%package -n gvim
Summary: A GUI for Vi
Group: Productivity/Editors/Vi
Group: Productivity/Text/Editors
Requires: gvim_client
Requires: vim-data = %{version}-%{release}
Requires(post): update-alternatives
@@ -235,11 +238,10 @@ gcc %{optflags} %{SOURCE13} -o vitmp
%install
%make_install STRIP=:
# create icon directory to have the icons installed and convert them to all hicolor expected sizes.
for size in %{_datadir}/icons/hicolor/*[0-9]x[0-9]*; do
SIZE=$(echo $size | awk -Fx {'print $2}')
# create icon directories and install the icons into it
for SIZE in 24 32 48 64 96; do
install -d -m 0755 %{buildroot}%{_datadir}/icons/hicolor/${SIZE}x${SIZE}/apps
rsvg-convert -h ${SIZE} -w ${SIZE} %{SOURCE24} -o %{buildroot}%{_datadir}/icons/hicolor/${SIZE}x${SIZE}/apps/gvim.png
install -m 0644 %{_sourcedir}/gvim_${SIZE}.png %{buildroot}%{_datadir}/icons/hicolor/${SIZE}x${SIZE}/apps/gvim.png
done
install -d -m 0755 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
install -m 0644 %{SOURCE24} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/gvim.svg