From 2731506cd4734b857ba81e4ffb24b2076f342be7 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Sep 23 2021 12:27:03 +0000 Subject: vim.spec: Fix absolute links during build --- diff --git a/vim.spec b/vim.spec index c993dbc..5adc178 100644 --- a/vim.spec +++ b/vim.spec @@ -549,12 +549,16 @@ SentUpstream: 2014-05-22 EOF +mkdir -p %{buildroot}%{_sysconfdir} +install -p -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/virc +install -p -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/vimrc + ( cd %{buildroot} - ln -sf %{_libexecdir}/vi .%{_bindir}/rvi - ln -sf %{_libexecdir}/vi .%{_bindir}/rview - ln -sf %{_libexecdir}/vi .%{_bindir}/ex - ln -sf %{_bindir}/vim .%{_bindir}/rvim - ln -sf %{_bindir}/vim .%{_bindir}/vimdiff + ln -sf .%{_libexecdir}/vi .%{_bindir}/rvi + ln -sf .%{_libexecdir}/vi .%{_bindir}/rview + ln -sf .%{_libexecdir}/vi .%{_bindir}/ex + ln -sf .%{_bindir}/vim .%{_bindir}/rvim + ln -sf .%{_bindir}/vim .%{_bindir}/vimdiff perl -pi -e "s,%{buildroot},," .%{_mandir}/man1/vim.1 .%{_mandir}/man1/vimtutor.1 rm -f .%{_mandir}/man1/rvim.1 cp -p .%{_mandir}/man1/vim.1 .%{_mandir}/man1/vi.1 @@ -568,6 +572,10 @@ EOF ln -sf gvim ./%{_bindir}/evim ln -sf gvim ./%{_bindir}/gvimdiff ln -sf gvim ./%{_bindir}/vimx + + ln -sf .%{_sysconfdir}/virc .%{_datadir}/%{name}/virc + ln -sf .%{_sysconfdir}/vimrc .%{_datadir}/%{name}/vimrc + %if "%{desktop_file}" == "1" desktop-file-install \ --dir %{buildroot}/%{_datadir}/applications \ @@ -614,8 +622,6 @@ chmod 644 %{buildroot}/%{_datadir}/%{name}/%{vimdir}/doc/vim2html.pl \ %{buildroot}/%{_datadir}/%{name}/%{vimdir}/tools/vim132 chmod 644 ../runtime/doc/vim2html.pl -mkdir -p %{buildroot}/%{_sysconfdir} - %if %{with default_editor} mkdir -p %{buildroot}/%{_sysconfdir}/profile.d install -p -m644 %{SOURCE9} %{buildroot}/%{_sysconfdir}/profile.d/vim-default-editor.sh @@ -625,12 +631,6 @@ install -p -m644 %{SOURCE11} %{buildroot}/%{_datadir}/fish/vendor_conf.d/vim-def mkdir -p %{buildroot}/%{_datadir}/fish/vendor_functions.d/ %endif -install -p -m644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/virc -install -p -m644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/vimrc - -ln -sf %{_sysconfdir}/virc %{buildroot}/%{_datadir}/%{name}/virc -ln -sf %{_sysconfdir}/vimrc %{buildroot}/%{_datadir}/%{name}/vimrc - # if Vim isn't built for Fedora, use redhat augroup %if 0%{?rhel} >= 7 sed -i -e "s/augroup fedora/augroup redhat/" %{buildroot}/%{_sysconfdir}/vimrc