diff --git a/vim.spec b/vim.spec index bb692ab..ee24dc3 100644 --- a/vim.spec +++ b/vim.spec @@ -353,7 +353,7 @@ cp -f os_unix.h os_unix.h.save # --disable-gpm - disabling support for General Purpose Mouse - Linux mouse daemon perl -pi -e "s/vimrc/virc/" os_unix.h -%configure \ +%configure CFLAGS="${CFLAGS} -DSYS_VIMRC_FILE='\"/etc/virc\"'" \ --prefix=%{_prefix} --with-features=small --with-x=no \ --enable-multibyte \ --disable-netbeans \ @@ -382,7 +382,7 @@ mv -f os_unix.h.save os_unix.h # it is for multibyte languages in Vim with X # --enable-termtruecolor - use terminal with true colors -%configure \ +%configure CFLAGS="${CFLAGS} -DSYS_VIMRC_FILE='\"/etc/vimrc\"'" \ --with-features=huge \ --enable-python3interp=dynamic \ --enable-perlinterp=dynamic \ @@ -425,7 +425,7 @@ mv -f os_unix.h.save os_unix.h cp vim gvim make clean -%configure \ +%configure CFLAGS="${CFLAGS} -DSYS_VIMRC_FILE='\"/etc/vimrc\"'" \ --prefix=%{_prefix} --with-features=huge \ --enable-python3interp=dynamic \ --enable-perlinterp=dynamic \ @@ -545,10 +545,6 @@ 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 @@ -569,9 +565,6 @@ install -p -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/vimrc 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 \ @@ -618,6 +611,16 @@ 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} +install -p -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/virc +install -p -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/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 +sed -i -e "s/augroup fedora/augroup redhat/" %{buildroot}/%{_sysconfdir}/virc +%endif + %if %{with default_editor} mkdir -p %{buildroot}/%{_sysconfdir}/profile.d install -p -m644 %{SOURCE9} %{buildroot}/%{_sysconfdir}/profile.d/vim-default-editor.sh @@ -627,12 +630,6 @@ install -p -m644 %{SOURCE11} %{buildroot}/%{_datadir}/fish/vendor_conf.d/vim-def mkdir -p %{buildroot}/%{_datadir}/fish/vendor_functions.d/ %endif -# 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 -sed -i -e "s/augroup fedora/augroup redhat/" %{buildroot}/%{_sysconfdir}/virc -%endif - mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/ install -p -m644 %{SOURCE8} %{buildroot}%{_rpmconfigdir}/macros.d/ @@ -682,7 +679,6 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %doc runtime/docs %dir %{_datadir}/%{name} %{_datadir}/%{name}/vimfiles/template.spec -%{_datadir}/%{name}/vimrc %dir %{_datadir}/%{name}/%{vimdir} %{_datadir}/%{name}/%{vimdir}/rgb.txt %{_datadir}/%{name}/%{vimdir}/autoload @@ -831,7 +827,6 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %{_bindir}/vi %{_bindir}/view %{_datadir}/%{name}/%{vimdir}/defaults.vim -%{_datadir}/%{name}/virc %{_libexecdir}/vi %{_mandir}/man1/vi.* %{_mandir}/man1/ex.* @@ -902,6 +897,9 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %endif %changelog +* Mon Oct 11 2021 Zdenek Dohnal - 2:8.2.3404-2 +- set system vimrc via compiler macros + * Thu Sep 23 2021 Zdenek Dohnal - 2:8.2.3404-2 - remove downstream patch vim-8.0-copypaste.patch - put mouse settings into defaults.vim again