Split off several sub-packages

This commit is contained in:
YellowJacketLinux 2023-04-17 13:36:39 -07:00
parent eacd4f9b13
commit 0a73d57388

View File

@ -1,38 +1,46 @@
# Needs work, especially for none 1.core
%global specrel 0.dev1
%global specrel 0.dev2
%global vimtag 9.0.1459
# buildlevel 0 is slim cli
# buildlevel 1 is additional cli
# buildlevel 2 is basic gui
# buildlevel 3 is mate
%global buildlevel 2
# Needs work, especially for not 1.core
# Non-English strings *in this spec file* are from Google Translate
# and may not be as good as they could be.
%global vimwithx 1
%global vimgui gtk3
%global vimfeatures huge
# desktop file support
%global vimdesktopvim 1
%global vimdesktopgvim 1
%global vimdesktopicons 1
# the following gets conditionally reset later
%global vimdesktopicons 0
# additional dependencies
%global vimdepgtk3 1
%if %{?repo:1}%{!?repo:0}
%if "%{repo}" == "1.core."
%global buildlevel 0
%global vimgui no
%global vimwithx 0
%global vimfeatures normal
%global vimdesktopvim 0
%global vimdesktopgvim 0
%global vimdesktopicons 0
%global vimdepgtk3 0
%endif
%if "%{repo}" == "2.cli."
%global buildlevel 1
%global vimwithx 0
%global vimdepgtk3 0
%endif
%if "%{repo}" == "5.mate."
%global vimgui gnome2
%endif
%endif
# reset some defaults
%if 0%{vimwithx} == 0
%global vimgui no
%global vimdesktopgvim 0
%endif
%if "%{repo}" == "5.mate."
%global buildlevel 3
%global vimgui gnome2
%endif
%if 0%{vimdesktopvim} == 1
%global vimdesktopicons 1
%endif
@ -44,15 +52,15 @@ Summary: The vim text editor
Group: Applications/Text
License: VIM
URL: https://www.vim.org/
Source0: https://github.com/vim/vim/archive/refs/tags/v%{vimtag}.tar.gz
Source0: https://github.com/vim/vim/archive/refs/tags/v%{vimtag}.tar.gz
Source1: etc-vimrc
BuildRequires: ncurses-devel
BuildRequires: libacl-devel
BuildRequires: libattr-devel
BuildRequires: gpm-devel
%if 0%{buildlevel} > 1
BuildRequires: gtk+-devel >= 3.24.36
%if 0%{vimdepgtk3} == 1
BuildRequires: gtk3-devel >= 3.24.36
%endif
#Requires:
@ -60,27 +68,173 @@ BuildRequires: gtk+-devel >= 3.24.36
Vim is a highly configurable text editor built to make creating and changing any
kind of text very efficient.
%prep
%setup -q
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
%if 0%{buildlevel} == 1
echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' >> src/feature.h
%if 0%{vimdesktopvim} == 1
%package desktop
Summary: VIM Desktop File
Group: Applications/Text
Requires: vim = %{version}-%{release}
BuildArch: noarch
%description desktop
This package includes the desktop metadata file needed to add the vim
launcher to the desktop menu.
You only need this package if you want to launch vim from a graphical
desktop menu.
%endif
%if 0%{vimdesktopgvim} == 1
%package -n gvim-desktop
Summary: Graphical VIM Desktop File
Group: Applications/Text
Requires: %{_bindir}/gvim
Requires: vim = %{version}-%{release}
BuildArch: noarch
%description -n gvim-desktop
This package includes the desktop metadata file needed to add the vim
launcher to the desktop menu.
You only need this package if you want to launch vim from a graphical
desktop menu.
%endif
%prep
%setup -q
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
echo '#define SYS_GVIMRC_FILE "/etc/gvimrc"' >> src/feature.h
%package man-da
Summary: vim manual pages in Danish
Summary(da): vim manual sider dansk
Group: Documentation
Requires: vim = %{version}-%{release}
BuildArch: noarch
%description man-da
This package contains the vim manual pages for the Danish language,
including ISO8859-1 and UTF-8 encodings.
%description(da) man-da
Denne pakke indeholder vim-manualsiderne for det danske sprog, inklusive
ISO8859-1 og UTF-8-kodninger.
%package man-de
Summary: vim manual pages in German
Summary(de): vim Handbuchseiten in Deutsch
Group: Documentation
Requires: vim = %{version}-%{release}
BuildArch: noarch
%description man-de
This package contains the vim manual pages for the German language,
including ISO8859-1 and UTF-8 encodings.
%description(de) man-de
Dieses Paket enthält die vim-Handbuchseiten für die deutsche Sprache,
einschließlich ISO8859-1- und UTF-8-Kodierungen.
%package man-fr
Summary: vim manual pages in French
Summary(fr): vim pages de manuel en français
Group: Documentation
Requires: vim = %{version}-%{release}
BuildArch: noarch
%description man-fr
This package contains the vim manual pages for the German language,
including ISO8859-1 and UTF-8 encodings.
%description(fr) man-fr
Ce paquet contient les pages de manuel vim pour la langue allemande,
y compris les encodages ISO8859-1 et UTF-8.
%package man-it
Summary: vim manual pages in Italian
Summary(it): vim pagine di manuale in italiano
Group: Documentation
Requires: vim = %{version}-%{release}
BuildArch: noarch
%description man-it
This package contains the vim manual pages for the Italian language,
including ISO8859-1 and UTF-8 encodings.
%description(de) man-it
Questo pacchetto contiene le pagine di manuale di vim per la lingua
italiana, comprese le codifiche ISO8859-1 e UTF-8.
%package man-ja
Summary: vim manual pages in Japanese
Summary(ja): 日本語のvimマニュアルページ
Group: Documentation
Requires: vim = %{version}-%{release}
BuildArch: noarch
%description man-ja
This package contains the vim manual pages for the Japanese language.
%description(ja) man-ja
このパッケージには、日本語の vim マニュアル ページが含まれています。
%package man-pl
Summary: vim manual pages in Polish
Summary(pl): strony podręcznika vima w języku polskim
Group: Documentation
Requires: vim = %{version}-%{release}
BuildArch: noarch
%description man-pl
This package contains the vim manual pages for the Polish language,
including ISO8859-2 and UTF-8 encodings.
%description(pl) man-pl
Ten pakiet zawiera strony podręcznika vima dla języka polskiego, w tym
kodowanie ISO8859-2 i UTF-8.
%package man-ru
Summary: vim manual pages in Russian
Summary(ru): справочные страницы vim на русском языке
Group: Documentation
Requires: vim = %{version}-%{release}
BuildArch: noarch
%description man-ru
This package contains the vim manual pages for the Russian language,
including KOI8-R and UTF-8 encodings.
%description(ru) man-ru
Этот пакет содержит справочные страницы vim для русского языка, включая
кодировки KOI8-R и UTF-8.
%package man-tr
Summary: vim manual pages in Turkish
Summary(tr): Türkçe vim kılavuz sayfaları
Group: Documentation
Requires: vim = %{version}-%{release}
BuildArch: noarch
%description man-tr
This package contains the vim manual pages for the Turkish language,
including ISO8859-9 and UTF-8 encodings.
%description(tr) man-tr
Bu paket, ISO8859-9 ve UTF-8 kodlamaları dahil olmak üzere Türkçe
için vim kılavuz sayfalarını içerir.
%build
%configure \
--with-features=%{vimfeatures} \
%if 0%{buildlevel} < 2
%if 0%{vimwithx} == 0
--without-x \
%else
--with-gui=%{vimgui} \
%endif
%if 0%{buildlevel} > 0
--enable-python3interp=dynamic \
--with-python3=python3 \
%endif
--with-tlib=ncursesw
make %{?_smp_mflags}
@ -97,6 +251,10 @@ done
install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/vimrc
%if 0%{vimwithx} == 1
sed -i 's?set mouse=$?set mouse=a?' %{buildroot}%{_sysconfdir}/vimrc
%endif
%files
%defattr(-,root,root,-)
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/vimrc
@ -110,21 +268,13 @@ install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/vimrc
%{_bindir}/view
%{_bindir}/vimdiff
# desktop file support
%if 0%{vimdesktopvim} == 1
%attr(0644,root,root) %{_datadir}/applications/vim.desktop
%else
%if 0%{vimdesktopvim} == 0
%exclude %{_datadir}/applications/vim.desktop
%endif
%if 0%{vimdesktopgvim} == 1
%attr(0644,root,root) %{_datadir}/applications/gvim.desktop
%else
%if 0%{vimdesktopgvim} == 0
%exclude %{_datadir}/applications/gvim.desktop
%endif
%if 0%{vimdesktopicons} == 1
%attr(0644,root,root) %{_datadir}/icons/hicolor/48x48/apps/gvim.png
%attr(0644,root,root) %{_datadir}/icons/locolor/16x16/apps/gvim.png
%attr(0644,root,root) %{_datadir}/icons/locolor/32x32/apps/gvim.png
%else
%if 0%{vimdesktopicons} == 0
%exclude %{_datadir}/icons/hicolor/48x48/apps/gvim.png
%exclude %{_datadir}/icons/locolor/16x16/apps/gvim.png
%exclude %{_datadir}/icons/locolor/32x32/apps/gvim.png
@ -142,7 +292,29 @@ install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/vimrc
%{_mandir}/man1/rvim.1*
%{_mandir}/man1/vi.1*
%{_mandir}/man1/view.1*
# %%lang(da)
%license LICENSE
%doc LICENSE README*
%if 0%{vimdesktopvim} == 1
%files desktop
%defattr(-,root,root,-)
%attr(0644,root,root) %{_datadir}/applications/vim.desktop
%attr(0644,root,root) %{_datadir}/icons/hicolor/48x48/apps/gvim.png
%attr(0644,root,root) %{_datadir}/icons/locolor/16x16/apps/gvim.png
%attr(0644,root,root) %{_datadir}/icons/locolor/32x32/apps/gvim.png
%endif
%if 0%{vimdesktopgvim} == 1
%files -n gvim-desktop
%defattr(-,root,root,-)
%attr(0644,root,root) %{_datadir}/applications/vim.desktop
%attr(0644,root,root) %{_datadir}/icons/hicolor/48x48/apps/gvim.png
%attr(0644,root,root) %{_datadir}/icons/locolor/16x16/apps/gvim.png
%attr(0644,root,root) %{_datadir}/icons/locolor/32x32/apps/gvim.png
%endif
%files man-da
%defattr(-,root,root,-)
%lang(da) %attr(0644,root,root) %{_mandir}/da/man1/vim.1*
%lang(da) %attr(0644,root,root) %{_mandir}/da/man1/vimdiff.1*
%lang(da) %attr(0644,root,root) %{_mandir}/da/man1/vimtutor.1*
@ -167,7 +339,9 @@ install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/vimrc
%lang(da) %{_mandir}/da.UTF-8/man1/rvim.1*
%lang(da) %{_mandir}/da.UTF-8/man1/vi.1*
%lang(da) %{_mandir}/da.UTF-8/man1/view.1*
# %%lang(de)
%files man-de
%defattr(-,root,root,-)
%lang(de) %attr(0644,root,root) %{_mandir}/de/man1/vim.1*
%lang(de) %{_mandir}/de/man1/ex.1*
%lang(de) %{_mandir}/de/man1/rview.1*
@ -186,7 +360,9 @@ install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/vimrc
%lang(de) %{_mandir}/de.UTF-8/man1/rvim.1*
%lang(de) %{_mandir}/de.UTF-8/man1/vi.1*
%lang(de) %{_mandir}/de.UTF-8/man1/view.1*
# %%lang(fr)
%files man-fr
%defattr(-,root,root,)
%lang(fr) %attr(0644,root,root) %{_mandir}/fr/man1/evim.1*
%lang(fr) %attr(0644,root,root) %{_mandir}/fr/man1/vim.1*
%lang(fr) %attr(0644,root,root) %{_mandir}/fr/man1/vimdiff.1*
@ -217,7 +393,9 @@ install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/vimrc
%lang(fr) %{_mandir}/fr.UTF-8/man1/rvim.1*
%lang(fr) %{_mandir}/fr.UTF-8/man1/vi.1*
%lang(fr) %{_mandir}/fr.UTF-8/man1/view.1*
# %%lang(it)
%files man-it
%defattr(-,root,root,-)
%lang(it) %attr(0644,root,root) %{_mandir}/it/man1/evim.1*
%lang(it) %attr(0644,root,root) %{_mandir}/it/man1/vim.1*
%lang(it) %attr(0644,root,root) %{_mandir}/it/man1/vimdiff.1*
@ -248,7 +426,9 @@ install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/vimrc
%lang(it) %{_mandir}/it.UTF-8/man1/rvim.1*
%lang(it) %{_mandir}/it.UTF-8/man1/vi.1*
%lang(it) %{_mandir}/it.UTF-8/man1/view.1*
# %%lang(ja)
%files man-ja
%defattr(-,root,root,-)
%lang(ja) %attr(0644,root,root) %{_mandir}/ja/man1/evim.1*
%lang(ja) %attr(0644,root,root) %{_mandir}/ja/man1/vim.1*
%lang(ja) %attr(0644,root,root) %{_mandir}/ja/man1/vimdiff.1*
@ -259,7 +439,9 @@ install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/vimrc
%lang(ja) %{_mandir}/ja/man1/rvim.1*
%lang(ja) %{_mandir}/ja/man1/vi.1*
%lang(ja) %{_mandir}/ja/man1/view.1*
# %%lang(pl)
%files man-pl
%defattr(-,root,root,-)
%lang(pl) %attr(0644,root,root) %{_mandir}/pl/man1/evim.1*
%lang(pl) %attr(0644,root,root) %{_mandir}/pl/man1/vim.1*
%lang(pl) %attr(0644,root,root) %{_mandir}/pl/man1/vimdiff.1*
@ -290,7 +472,9 @@ install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/vimrc
%lang(pl) %{_mandir}/pl.UTF-8/man1/rvim.1*
%lang(pl) %{_mandir}/pl.UTF-8/man1/vi.1*
%lang(pl) %{_mandir}/pl.UTF-8/man1/view.1*
# %%lang(ru)
%files man-ru
%defattr(-,root,root,-)
%lang(ru) %attr(0644,root,root) %{_mandir}/ru.KOI8-R/man1/evim.1*
%lang(ru) %attr(0644,root,root) %{_mandir}/ru.KOI8-R/man1/vim.1*
%lang(ru) %attr(0644,root,root) %{_mandir}/ru.KOI8-R/man1/vimdiff.1*
@ -311,7 +495,9 @@ install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/vimrc
%lang(ru) %{_mandir}/ru.UTF-8/man1/rvim.1*
%lang(ru) %{_mandir}/ru.UTF-8/man1/vi.1*
%lang(ru) %{_mandir}/ru.UTF-8/man1/view.1*
# %%lang(tr)
%files man-tr
%defattr(-,root,root,-)
%lang(tr) %attr(0644,root,root) %{_mandir}/tr/man1/evim.1*
%lang(tr) %attr(0644,root,root) %{_mandir}/tr/man1/vim.1*
%lang(tr) %attr(0644,root,root) %{_mandir}/tr/man1/vimdiff.1*
@ -340,11 +526,13 @@ install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/vimrc
%lang(tr) %{_mandir}/tr.UTF-8/man1/vi.1*
%lang(tr) %{_mandir}/tr.UTF-8/man1/view.1*
# end man pages
%license LICENSE
%doc LICENSE README*
%changelog
* Mon Apr 17 2023 Michael A. Peters <anymouseprophet@gmail.com> - 9.0.1459-0.dev2
- Split non-English man pages into separate packages, clean up build options.
* Sun Apr 16 2023 Michael A. Peters <anymouseprophet@gmail.com> - 9.0.1459-0.dev1
- Initial spec file for YJL (RPM bootstrapping LFS/BLFS 11.3)