wok-next annotate vim/receipt @ rev 1251

Minor fix
author Dominique Corbex <domcox@users.sourceforge.net>
date Tue Aug 12 20:05:51 2008 +0200 (2008-08-12)
parents 90463812cd74
children 81e2015673ca
rev   line source
erjo@250 1 # SliTaz package receipt.
erjo@250 2
erjo@250 3 PACKAGE="vim"
erjo@250 4 VERSION="7.1"
pankso@271 5 CATEGORY="development"
erjo@250 6 SHORT_DESC="Advanced text editor"
erjo@784 7 MAINTAINER="erjo@slitaz.org"
erjo@250 8 DEPENDS=""
erjo@250 9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
erjo@250 10 WEB_SITE="http://www.vim.org/"
erjo@250 11 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL"
erjo@250 12
erjo@250 13 # Rules to configure and make the package.
erjo@250 14 compile_rules()
erjo@250 15 {
erjo@250 16 src="vim71"
erjo@250 17 cd $src
erjo@250 18
erjo@250 19 ./configure --prefix=/usr \
erjo@250 20 --cache-file=$PWD/config.cache \
erjo@250 21 --infodir=/usr/share/info \
erjo@250 22 --with-features=normal \
erjo@250 23 --enable-gui=no \
erjo@250 24 --without-x
erjo@250 25 --mandir=/usr/share/man $CONFIGURE_ARGS
erjo@250 26
erjo@250 27 make
erjo@250 28 make DESTDIR=$PWD/_pkg install
erjo@250 29 }
erjo@250 30
erjo@250 31 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@250 32 genpkg_rules()
erjo@250 33 {
erjo@250 34 _pkg="$PWD/vim71/_pkg"
erjo@250 35 mkdir -p $fs/usr $fs/usr/share
erjo@250 36 cp -a $_pkg/usr/bin $fs/usr
erjo@250 37 cp -a $_pkg/usr/share/vim $fs/usr/share
erjo@250 38
erjo@250 39 rm -f $fs/usr/bin/vimtutor
erjo@250 40
erjo@250 41 strip -s $fs/usr/bin/*
erjo@250 42 }
erjo@250 43
erjo@250 44
erjo@250 45 # Rules to clean extras dirs or files
erjo@250 46 clean_wok()
erjo@250 47 {
erjo@250 48 rm -rf $PWD/vim71 2>/dev/null
erjo@250 49 }
erjo@250 50
erjo@250 51 post_install()
erjo@250 52 {
erjo@250 53 local root
erjo@250 54 root=$1
erjo@250 55 echo "Processing post-install commands..."
erjo@250 56 cmd=`readlink $root/bin/vi`
erjo@250 57 if [ ! "$cmd" = "/usr/bin/vim" ]; then
erjo@250 58 echo ""
erjo@250 59 echo "**** Actual VI link : $cmd"
erjo@250 60 echo ""
erjo@250 61 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read anser
erjo@250 62 if [ "$anser" == "y" ]; then
erjo@250 63 echo ""
erjo@250 64 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
erjo@250 65 rm $root/bin/vi && ln -s $root/usr/bin/vim $root/bin/vi
erjo@250 66 status
erjo@250 67 else
erjo@250 68 echo ""
erjo@250 69 echo "Leaving /bin/vi to : $cmd"
erjo@250 70 fi
erjo@250 71 fi
erjo@250 72 }
erjo@250 73