wok-next diff vim-tiny/receipt @ rev 4784
Add: vim-tiny (textmode only).
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sat Jan 16 22:55:00 2010 +0100 (2010-01-16) |
parents | |
children | f917e0dfdfbd |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/vim-tiny/receipt Sat Jan 16 22:55:00 2010 +0100 1.3 @@ -0,0 +1,86 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="vim-tiny" 1.7 +VERSION="7.2" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="Advanced text editor with no GUI" 1.10 +MAINTAINER="erjo@slitaz.org" 1.11 +DEPENDS="ncurses" 1.12 +SOURCE="vim" 1.13 +TARBALL="$SOURCE-$VERSION.tar.bz2" 1.14 +WEB_SITE="http://www.vim.org/" 1.15 +WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL" 1.16 +CONFIG_FILES="/etc/vimrc.tiny" 1.17 + 1.18 +# Rules to configure and make the package. 1.19 +compile_rules() 1.20 +{ 1.21 + src=vim72 1.22 + #test -d $PACKAGE-$VERSION || mv vim72 $PACKAGE-$VERSION 1.23 + cd $src 1.24 + 1.25 + ./configure --prefix=/usr \ 1.26 + --cache-file=$PWD/config.cache \ 1.27 + --infodir=/usr/share/info \ 1.28 + --with-features=tiny \ 1.29 + --enable-gui=no \ 1.30 + --with-vim-name=$PACKAGE \ 1.31 + --disable-acl \ 1.32 + --disable-motif-check \ 1.33 + --disable-athena-check \ 1.34 + --mandir=/usr/share/man $CONFIGURE_ARGS && 1.35 + 1.36 + make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/$src MAKE="make -e" && 1.37 + make DESTDIR=$PWD/_pkg install 1.38 +} 1.39 + 1.40 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.41 +genpkg_rules() 1.42 +{ 1.43 + _pkg="$PWD/vim72/_pkg" 1.44 + 1.45 + mkdir -p $fs/usr $fs/usr/share $fs/etc/vim 1.46 + 1.47 + cp -a $_pkg/usr/bin $fs/usr 1.48 + cp -a $_pkg/usr/share/vim $fs/usr/share 1.49 + cp -a $WOK/$PACKAGE/vim72/runtime/vimrc_example.vim $fs/etc/vim/vimrc 1.50 + rm -f $fs/usr/bin/*tutor 1.51 +} 1.52 + 1.53 + 1.54 + 1.55 +# Rules to clean extras dirs or files 1.56 +clean_wok() 1.57 +{ 1.58 + rm -rf $PWD/vim72 2>/dev/null 1.59 +} 1.60 + 1.61 +post_install() 1.62 +{ 1.63 + local root 1.64 + root=$1 1.65 + echo "Processing post-install commands..." 1.66 + cmd=`readlink $root/bin/vi` 1.67 + if [ ! "$cmd" = "/usr/bin/vim" ]; then 1.68 + echo "" 1.69 + echo "**** Actual VI link : $cmd" 1.70 + echo "" 1.71 + echo -n "Do you want vim for /bin/vi (y/N) ? : "; read anser 1.72 + if [ "$anser" == "y" ]; then 1.73 + echo "" 1.74 + echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..." 1.75 + rm $root/bin/vi && ln -sf $root/usr/bin/vim-tiny $root/bin/vi 1.76 + status 1.77 + else 1.78 + echo "" 1.79 + echo "Leaving /bin/vi to : $cmd" 1.80 + fi 1.81 + fi 1.82 +} 1.83 + 1.84 +post_remove() 1.85 +{ 1.86 + # restore previous symlink 1.87 + echo "Processing post-remove commands..." 1.88 + ln -sf /bin/busybox /bin/vi 1.89 +}