wok annotate vim/receipt @ rev 6798

Up: apr-util to 1.3.10.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue Oct 19 02:23:27 2010 +0000 (2010-10-19)
parents 4897058add72
children 403fb8adf07d
rev   line source
erjo@250 1 # SliTaz package receipt.
erjo@250 2
erjo@250 3 PACKAGE="vim"
erjo@1354 4 VERSION="7.2"
pankso@271 5 CATEGORY="development"
erjo@250 6 SHORT_DESC="Advanced text editor"
erjo@784 7 MAINTAINER="erjo@slitaz.org"
pascal@5007 8 DEPENDS="ncurses gtk+ acl xorg-libXt"
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"
mallory@6286 12 CONFIG_FILES="/etc/vim/vimrc"
jozee@4975 13 TAGS="text-editor"
erjo@250 14
erjo@250 15 # Rules to configure and make the package.
erjo@250 16 compile_rules()
erjo@250 17 {
pankso@1382 18 src="vim72"
erjo@250 19 cd $src
erjo@250 20
erjo@250 21 ./configure --prefix=/usr \
erjo@250 22 --cache-file=$PWD/config.cache \
erjo@250 23 --infodir=/usr/share/info \
erjo@250 24 --with-features=normal \
erjo@2927 25 --enable-gui=gtk2 \
erjo@2927 26 --disable-motif-check \
erjo@2927 27 --disable-athena-check \
pascal@2948 28 --mandir=/usr/share/man $CONFIGURE_ARGS &&
erjo@250 29
mallory@3100 30 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/$src MAKE="make -e" &&
erjo@250 31 make DESTDIR=$PWD/_pkg install
erjo@250 32 }
erjo@250 33
erjo@250 34 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@250 35 genpkg_rules()
erjo@250 36 {
pankso@1383 37 _pkg="$PWD/vim72/_pkg"
erjo@2927 38
erjo@2927 39 mkdir -p $fs/usr $fs/usr/share $fs/etc/vim
erjo@2927 40
erjo@250 41 cp -a $_pkg/usr/bin $fs/usr
erjo@250 42 cp -a $_pkg/usr/share/vim $fs/usr/share
erjo@2927 43 cp -a $WOK/$PACKAGE/vim72/runtime/vimrc_example.vim $fs/etc/vim/vimrc
erjo@2927 44 rm -f $fs/usr/bin/*vimtutor
erjo@2927 45 }
erjo@250 46
erjo@250 47
erjo@250 48
erjo@250 49 # Rules to clean extras dirs or files
erjo@250 50 clean_wok()
erjo@250 51 {
erjo@1354 52 rm -rf $PWD/vim72 2>/dev/null
erjo@250 53 }
erjo@250 54
erjo@250 55 post_install()
erjo@250 56 {
erjo@250 57 local root
erjo@250 58 root=$1
erjo@250 59 echo "Processing post-install commands..."
erjo@250 60 cmd=`readlink $root/bin/vi`
erjo@250 61 if [ ! "$cmd" = "/usr/bin/vim" ]; then
erjo@250 62 echo ""
erjo@250 63 echo "**** Actual VI link : $cmd"
erjo@250 64 echo ""
erjo@250 65 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read anser
erjo@250 66 if [ "$anser" == "y" ]; then
erjo@250 67 echo ""
erjo@250 68 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
erjo@1354 69 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
erjo@250 70 status
erjo@250 71 else
erjo@250 72 echo ""
erjo@250 73 echo "Leaving /bin/vi to : $cmd"
erjo@250 74 fi
erjo@250 75 fi
erjo@250 76 }
erjo@250 77
erjo@2531 78 post_remove()
erjo@2531 79 {
erjo@2531 80 # restore previous symlink
erjo@2531 81 echo "Processing post-remove commands..."
erjo@2531 82 ln -sf /bin/busybox /bin/vi
erjo@2531 83 }