From 6833e0dc5d72914ea467701a58fb539f174483f6 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: May 21 2013 11:30:10 +0000 Subject: consistent use of macros in spec file add some links to man pages --- diff --git a/vim.spec b/vim.spec index 1aff1e7..92cb81d 100644 --- a/vim.spec +++ b/vim.spec @@ -24,7 +24,7 @@ Summary: The VIM editor URL: http://www.vim.org/ Name: vim Version: %{baseversion}.%{beta}%{patchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Vim Group: Applications/Editors Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}%{?beta}%{?CVSDATE}.tar.bz2 @@ -2119,8 +2119,8 @@ autoconf sed -e "s+VIMRCLOC = \$(VIMLOC)+VIMRCLOC = /etc+" Makefile > Makefile.tmp mv -f Makefile.tmp Makefile -export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2" -export CXXFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2" +export CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2" +export CXXFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2" %configure --with-features=huge \ --enable-pythoninterp=dynamic \ @@ -2198,15 +2198,15 @@ perl -pi -e "s/\/etc\/vimrc/\/etc\/virc/" os_unix.h make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir} %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/%{_bindir} -mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name}/vimfiles/{after,autoload,colors,compiler,doc,ftdetect,ftplugin,indent,keymap,lang,plugin,print,spell,syntax,tutor} -mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name}/vimfiles/after/{autoload,colors,compiler,doc,ftdetect,ftplugin,indent,keymap,lang,plugin,print,spell,syntax,tutor} +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_bindir} +mkdir -p %{buildroot}/%{_datadir}/%{name}/vimfiles/{after,autoload,colors,compiler,doc,ftdetect,ftplugin,indent,keymap,lang,plugin,print,spell,syntax,tutor} +mkdir -p %{buildroot}/%{_datadir}/%{name}/vimfiles/after/{autoload,colors,compiler,doc,ftdetect,ftplugin,indent,keymap,lang,plugin,print,spell,syntax,tutor} cp -f %{SOURCE11} . %if %{?fedora}%{!?fedora:0} >= 16 || %{?rhel}%{!?rhel:0} >= 6 -cp -f %{SOURCE15} $RPM_BUILD_ROOT/%{_datadir}/%{name}/vimfiles/template.spec +cp -f %{SOURCE15} %{buildroot}/%{_datadir}/%{name}/vimfiles/template.spec %else -cp -f %{SOURCE14} $RPM_BUILD_ROOT/%{_datadir}/%{name}/vimfiles/template.spec +cp -f %{SOURCE14} %{buildroot}/%{_datadir}/%{name}/vimfiles/template.spec %endif cp runtime/doc/uganda.txt LICENSE # Those aren't Linux info files but some binary files for Amiga: @@ -2214,29 +2214,29 @@ rm -f README*.info cd src -make install DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir} -make installgtutorbin DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir} -mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/{16x16,32x32,48x48,64x64}/apps -install -m755 vim $RPM_BUILD_ROOT%{_bindir}/vi -install -m755 enhanced-vim $RPM_BUILD_ROOT%{_bindir}/vim -install -m755 gvim $RPM_BUILD_ROOT%{_bindir}/gvim +make install DESTDIR=%{buildroot} BINDIR=%{_bindir} VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir} +make installgtutorbin DESTDIR=%{buildroot} BINDIR=%{_bindir} VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim/%{vimdir} +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32,48x48,64x64}/apps +install -m755 vim %{buildroot}%{_bindir}/vi +install -m755 enhanced-vim %{buildroot}%{_bindir}/vim +install -m755 gvim %{buildroot}%{_bindir}/gvim install -p -m644 %{SOURCE7} \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/gvim.png + %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/gvim.png install -p -m644 %{SOURCE8} \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/gvim.png + %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/gvim.png install -p -m644 %{SOURCE9} \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/gvim.png + %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/gvim.png install -p -m644 %{SOURCE10} \ - $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/64x64/apps/gvim.png + %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/gvim.png -( cd $RPM_BUILD_ROOT +( cd %{buildroot} ln -sf vi ./%{_bindir}/rvi ln -sf vi ./%{_bindir}/rview ln -sf vi ./%{_bindir}/view ln -sf vi ./%{_bindir}/ex ln -sf vim ./%{_bindir}/rvim ln -sf vim ./%{_bindir}/vimdiff - perl -pi -e "s,$RPM_BUILD_ROOT,," .%{_mandir}/man1/vim.1 .%{_mandir}/man1/vimtutor.1 + perl -pi -e "s,%{buildroot},," .%{_mandir}/man1/vim.1 .%{_mandir}/man1/vimtutor.1 rm -f .%{_mandir}/man1/rvim.1 ln -sf vim.1.gz .%{_mandir}/man1/vi.1.gz ln -sf vim.1.gz .%{_mandir}/man1/rvi.1.gz @@ -2247,12 +2247,12 @@ install -p -m644 %{SOURCE10} \ ln -sf gvim ./%{_bindir}/gvimdiff ln -sf gvim ./%{_bindir}/vimx %if "%{desktop_file}" == "1" - mkdir -p $RPM_BUILD_ROOT/%{_datadir}/applications + mkdir -p %{buildroot}/%{_datadir}/applications desktop-file-install \ %if 0%{?fedora} && 0%{?fedora} < 19 --vendor fedora \ %endif - --dir $RPM_BUILD_ROOT/%{_datadir}/applications \ + --dir %{buildroot}/%{_datadir}/applications \ %{SOURCE3} # --add-category "Development;TextEditor;X-Red-Hat-Base" D\ %else @@ -2264,7 +2264,7 @@ install -p -m644 %{SOURCE10} \ ln -sf menu_ja_jp.ujis.vim menu_ja_jp.eucjp.vim ) ) -pushd $RPM_BUILD_ROOT/%{_datadir}/%{name}/%{vimdir}/tutor +pushd %{buildroot}/%{_datadir}/%{name}/%{vimdir}/tutor mkdir conv iconv -f CP1252 -t UTF8 tutor.ca > conv/tutor.ca iconv -f CP1252 -t UTF8 tutor.it > conv/tutor.it @@ -2289,13 +2289,13 @@ rmdir conv popd # Dependency cleanups -chmod 644 $RPM_BUILD_ROOT/%{_datadir}/%{name}/%{vimdir}/doc/vim2html.pl \ - $RPM_BUILD_ROOT/%{_datadir}/%{name}/%{vimdir}/tools/*.pl \ - $RPM_BUILD_ROOT/%{_datadir}/%{name}/%{vimdir}/tools/vim132 +chmod 644 %{buildroot}/%{_datadir}/%{name}/%{vimdir}/doc/vim2html.pl \ + %{buildroot}/%{_datadir}/%{name}/%{vimdir}/tools/*.pl \ + %{buildroot}/%{_datadir}/%{name}/%{vimdir}/tools/vim132 chmod 644 ../runtime/doc/vim2html.pl -mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d -cat >$RPM_BUILD_ROOT/%{_sysconfdir}/profile.d/vim.sh <%{buildroot}/%{_sysconfdir}/profile.d/vim.sh </dev/null 2>&1 || alias vi=vim fi EOF -cat >$RPM_BUILD_ROOT/%{_sysconfdir}/profile.d/vim.csh <%{buildroot}/%{_sysconfdir}/profile.d/vim.csh < 100 ) then alias vi vim endif endif EOF -chmod 0644 $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d/* -install -p -m644 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/vimrc -install -p -m644 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/virc -(cd $RPM_BUILD_ROOT/%{_datadir}/%{name}/%{vimdir}/doc; +chmod 0644 %{buildroot}/%{_sysconfdir}/profile.d/* +install -p -m644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/vimrc +install -p -m644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/virc +(cd %{buildroot}/%{_datadir}/%{name}/%{vimdir}/doc; gzip -9 *.txt gzip -d help.txt.gz version7.txt.gz sponsor.txt.gz cp %{SOURCE12} . @@ -2328,35 +2328,39 @@ EOF LANG=C sort tags > tags.tmp; mv tags.tmp tags ) (cd ../runtime; rm -rf doc; ln -svf ../../vim/%{vimdir}/doc docs;) -rm -f $RPM_BUILD_ROOT/%{_datadir}/vim/%{vimdir}/macros/maze/maze*.c -rm -rf $RPM_BUILD_ROOT/%{_datadir}/vim/%{vimdir}/tools -rm -rf $RPM_BUILD_ROOT/%{_datadir}/vim/%{vimdir}/doc/vim2html.pl -rm -f $RPM_BUILD_ROOT/%{_datadir}/vim/%{vimdir}/tutor/tutor.gr.utf-8~ -( cd $RPM_BUILD_ROOT/%{_mandir} +rm -f %{buildroot}/%{_datadir}/vim/%{vimdir}/macros/maze/maze*.c +rm -rf %{buildroot}/%{_datadir}/vim/%{vimdir}/tools +rm -rf %{buildroot}/%{_datadir}/vim/%{vimdir}/doc/vim2html.pl +rm -f %{buildroot}/%{_datadir}/vim/%{vimdir}/tutor/tutor.gr.utf-8~ +( cd %{buildroot}/%{_mandir} for i in `find ??/ -type f`; do bi=`basename $i` - iconv -f latin1 -t UTF8 $i > $RPM_BUILD_ROOT/$bi - mv -f $RPM_BUILD_ROOT/$bi $i + iconv -f latin1 -t UTF8 $i > %{buildroot}/$bi + mv -f %{buildroot}/$bi $i done ) # Remove not UTF-8 manpages for i in pl.ISO8859-2 it.ISO8859-1 ru.KOI8-R fr.ISO8859-1; do - rm -rf $RPM_BUILD_ROOT/%{_mandir}/$i + rm -rf %{buildroot}/%{_mandir}/$i done # use common man1/ru directory -mv $RPM_BUILD_ROOT/%{_mandir}/ru.UTF-8 $RPM_BUILD_ROOT/%{_mandir}/ru +mv %{buildroot}/%{_mandir}/ru.UTF-8 %{buildroot}/%{_mandir}/ru # Remove duplicate man pages for i in fr.UTF-8 it.UTF-8 pl.UTF-8; do - rm -rf $RPM_BUILD_ROOT/%{_mandir}/$i + rm -rf %{buildroot}/%{_mandir}/$i done -for i in rvim.1 gvim.1 gvimdiff.1; do - echo ".so man1/vim.1" > $RPM_BUILD_ROOT/%{_mandir}/man1/$i +for i in rvim.1 gvim.1 gvimdiff.1 gex.1 gview.1 gvimtutor.1 vimx.1; do + echo ".so man1/vim.1" > %{buildroot}/%{_mandir}/man1/$i done -touch $RPM_BUILD_ROOT/%{_datadir}/%{name}/vimfiles/doc/tags +mkdir -p %{buildroot}/%{_mandir}/man5 +for i in virc.5 vimrc.5; do + echo ".so man1/vim.1" > %{buildroot}/%{_mandir}/man5/$i +done +touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %post X11 touch --no-create %{_datadir}/icons/hicolor @@ -2373,7 +2377,7 @@ fi update-desktop-database &> /dev/null ||: %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %files common %defattr(-,root,root) @@ -2440,13 +2444,21 @@ rm -rf $RPM_BUILD_ROOT %lang(zh_CN.UTF-8) %{_datadir}/%{name}/%{vimdir}/lang/zh_CN.UTF-8 %lang(zh_TW.UTF-8) %{_datadir}/%{name}/%{vimdir}/lang/zh_TW.UTF-8 /%{_bindir}/xxd -%{_mandir}/man1/vim.* %{_mandir}/man1/ex.* -%{_mandir}/man1/vi.* -%{_mandir}/man1/view.* +%{_mandir}/man1/gex.* +%{_mandir}/man1/gview.* +%{_mandir}/man1/gvim* %{_mandir}/man1/rvi.* %{_mandir}/man1/rview.* +%{_mandir}/man1/rvim.* +%{_mandir}/man1/vi.* +%{_mandir}/man1/view.* +%{_mandir}/man1/vim.* +%{_mandir}/man1/vimdiff.* +%{_mandir}/man1/vimtutor.* +%{_mandir}/man1/vimx.* %{_mandir}/man1/xxd.* +%{_mandir}/man5/vimrc.* %lang(fr) %{_mandir}/fr/man1/* %lang(it) %{_mandir}/it/man1/* %lang(pl) %{_mandir}/pl/man1/* @@ -2517,6 +2529,13 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/view %{_bindir}/rvi %{_bindir}/rview +%{_mandir}/man1/vim.* +%{_mandir}/man1/vi.* +%{_mandir}/man1/ex.* +%{_mandir}/man1/rvi.* +%{_mandir}/man1/rview.* +%{_mandir}/man1/view.* +%{_mandir}/man5/virc.* %files enhanced %defattr(-,root,root) @@ -2525,9 +2544,6 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/vimdiff %{_bindir}/vimtutor %config(noreplace) %{_sysconfdir}/profile.d/vim.* -%{_mandir}/man1/rvim.* -%{_mandir}/man1/vimdiff.* -%{_mandir}/man1/vimtutor.* %files filesystem %defattr(-,root,root) @@ -2565,10 +2581,13 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/vimx %{_bindir}/evim %{_mandir}/man1/evim.* -%{_mandir}/man1/gvim* %{_datadir}/icons/hicolor/*/apps/* %changelog +* Tue May 21 2013 Karsten Hopp 7.3.944-2 +- consistent use of macros in spec file +- add some links to man pages + * Tue May 14 2013 Karsten Hopp 7.3.944-1 - patchlevel 944