#!/bin/sh ## script for auto-making Vim 6.1 RPM ## Time-stamp: VIM_LASTPATCH=320 IMCUSTOM=061 ## get SourceCodes and Patches from net ## cd && mkdir -p rpmdir/{RPMS,SRPMS,BUILD,SOURCES,SPECS} cd rpmdir/SOURCES if [ ! -s vim-6.1.tar.bz2 ] ; then wget ftp://ftp.vim.org/pub/vim/unix/vim-6.1.tar.bz2 fi if [ ! -s vim-6.1-extra.tar.gz ] ; then wget ftp://ftp.vim.org/pub/vim/extra/vim-6.1-extra.tar.gz fi if [ ! -s vim-6.1-lang.tar.gz ] ; then wget ftp://ftp.vim.org/pub/vim/extra/vim-6.1-lang.tar.gz fi if [ ! -s im_custom$IMCUSTOM.diff.gz ] ; then wget http://hp.vector.co.jp/authors/VA020411/Vim/im_custom/im_custom$IMCUSTOM.diff.gz fi if [ ! -s 6.1.1-100.gz ] ; then wget ftp://ftp.vim.org/pub/vim/patches/6.1.1-100.gz fi if [ ! -s 6.1.101-200.gz ] ; then wget ftp://ftp.vim.org/pub/vim/patches/6.1.101-200.gz fi if [ ! -s 6.1.201-300.gz ] ; then wget ftp://ftp.vim.org/pub/vim/patches/6.1.201-300.gz fi FIRST=301 C=$FIRST while test $C -le $VIM_LASTPATCH do if [ ! -s 6.1.$C ]; then wget ftp://ftp.vim.org/pub/vim/patches/6.1.$C fi C=`expr $C + 1` done ## prepare to make rpm ## cd ~ echo %_topdir $HOME/rpmdir > .rpmmacros cat >rpmdir/SPECS/vim.spec << END_OF_LINE Summary: Vim editor with im_custom Name: vim Version: 6.1.${VIM_LASTPATCH}_im${IMCUSTOM} Release: 1 URL: http://hp.vector.co.jp/authors/VA020411/Vim/ Source0: vim-6.1.tar.bz2 Source1: vim-6.1-extra.tar.gz Source2: vim-6.1-lang.tar.gz Patch0: im_custom${IMCUSTOM}.diff.gz Patch1: 6.1.1-100.gz Patch2: 6.1.101-200.gz Patch3: 6.1.201-300.gz END_OF_LINE C=$FIRST while test $C -le $VIM_LASTPATCH do echo Patch`expr $C - $FIRST + 4`: 6.1.$C >>rpmdir/SPECS/vim.spec C=`expr $C + 1` done cat >>rpmdir/SPECS/vim.spec << END_OF_LINE License: GPL Group: Applications/Editors Conflicts: vim-common, vim-enhanced BuildRoot: %{_tmppath}/%{name}-root %description Vim 6.1 patch ${VIM_LASTPATCH} with im_custom${IMCUSTOM} (canna,skk,pobox enabled). %prep ## decompress Source0,1,2 %setup -q -n vim61 -b1 -b2 ## apply patch %patch1 -p0 %patch2 -p0 %patch3 -p0 END_OF_LINE C=$FIRST while test $C -le $VIM_LASTPATCH do echo %patch`expr $C - $FIRST + 4` -p0 >>rpmdir/SPECS/vim.spec C=`expr $C + 1` done cat >>rpmdir/SPECS/vim.spec << END_OF_LINE %patch0 -p0 %build ./configure --prefix=/usr --enable-multibyte --enable-canna --enable-skk --enable-pobox make %install rm -rf %{buildroot} mkdir %{buildroot} make install DESTDIR=%{buildroot} %clean rm -rf %{buildroot} %files %defattr(-,root,root) /usr/bin/vim /usr/bin/gvim /usr/bin/gview /usr/bin/rgvim /usr/bin/rgview /usr/bin/evim /usr/bin/eview /usr/bin/gvimdiff /usr/bin/ex /usr/bin/view /usr/bin/rvim /usr/bin/rview /usr/bin/vimdiff /usr/bin/vimtutor /usr/bin/xxd %doc /usr/man/man1 %doc /usr/share/vim/vim61/doc /usr/share/vim/vim61/colors /usr/share/vim/vim61/syntax /usr/share/vim/vim61/indent /usr/share/vim/vim61/ftplugin /usr/share/vim/vim61/plugin /usr/share/vim/vim61/tutor /usr/share/vim/vim61/compiler /usr/share/vim/vim61/macros/hanoi /usr/share/vim/vim61/macros/life /usr/share/vim/vim61/macros/maze /usr/share/vim/vim61/macros/urm /usr/share/vim/vim61/tools /usr/share/vim/vim61/lang/af/LC_MESSAGES /usr/share/vim/vim61/lang/cs/LC_MESSAGES /usr/share/vim/vim61/lang/de/LC_MESSAGES /usr/share/vim/vim61/lang/es/LC_MESSAGES /usr/share/vim/vim61/lang/fr/LC_MESSAGES /usr/share/vim/vim61/lang/it/LC_MESSAGES /usr/share/vim/vim61/lang/ja/LC_MESSAGES /usr/share/vim/vim61/lang/ko/LC_MESSAGES /usr/share/vim/vim61/lang/pl/LC_MESSAGES /usr/share/vim/vim61/lang/sk/LC_MESSAGES /usr/share/vim/vim61/lang/uk/LC_MESSAGES /usr/share/vim/vim61/lang/zh_TW/LC_MESSAGES /usr/share/vim/vim61/lang/zh_CN/LC_MESSAGES /usr/share/vim/vim61/lang/zh_CN.UTF-8/LC_MESSAGES /usr/share/vim/vim61/keymap %changelog * Sat Feb 8 2003 Itou Hiroki - add patch3 * Mon Jan 20 2003 Itou Hiroki - Initial build for RedHatLinux7.1/7.2/7.3 END_OF_LINE ## make rpm ## rpmbuild -ba rpmdir/SPECS/vim.spec echo echo vim-6.1.${VIM_LASTPATCH}_im${IMCUSTOM} RPM package is ready in $HOME/rpmdir/RPMS/i386 echo