wok-4.x annotate 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
rev   line source
erjo@4784 1 # SliTaz package receipt.
erjo@4784 2
erjo@4784 3 PACKAGE="vim-tiny"
erjo@4784 4 VERSION="7.2"
erjo@4784 5 CATEGORY="development"
erjo@4784 6 SHORT_DESC="Advanced text editor with no GUI"
erjo@4784 7 MAINTAINER="erjo@slitaz.org"
erjo@4784 8 DEPENDS="ncurses"
erjo@4784 9 SOURCE="vim"
erjo@4784 10 TARBALL="$SOURCE-$VERSION.tar.bz2"
erjo@4784 11 WEB_SITE="http://www.vim.org/"
erjo@4784 12 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL"
erjo@4784 13 CONFIG_FILES="/etc/vimrc.tiny"
erjo@4784 14
erjo@4784 15 # Rules to configure and make the package.
erjo@4784 16 compile_rules()
erjo@4784 17 {
erjo@4784 18 src=vim72
erjo@4784 19 #test -d $PACKAGE-$VERSION || mv vim72 $PACKAGE-$VERSION
erjo@4784 20 cd $src
erjo@4784 21
erjo@4784 22 ./configure --prefix=/usr \
erjo@4784 23 --cache-file=$PWD/config.cache \
erjo@4784 24 --infodir=/usr/share/info \
erjo@4784 25 --with-features=tiny \
erjo@4784 26 --enable-gui=no \
erjo@4784 27 --with-vim-name=$PACKAGE \
erjo@4784 28 --disable-acl \
erjo@4784 29 --disable-motif-check \
erjo@4784 30 --disable-athena-check \
erjo@4784 31 --mandir=/usr/share/man $CONFIGURE_ARGS &&
erjo@4784 32
erjo@4784 33 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/$src MAKE="make -e" &&
erjo@4784 34 make DESTDIR=$PWD/_pkg install
erjo@4784 35 }
erjo@4784 36
erjo@4784 37 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@4784 38 genpkg_rules()
erjo@4784 39 {
erjo@4784 40 _pkg="$PWD/vim72/_pkg"
erjo@4784 41
erjo@4784 42 mkdir -p $fs/usr $fs/usr/share $fs/etc/vim
erjo@4784 43
erjo@4784 44 cp -a $_pkg/usr/bin $fs/usr
erjo@4784 45 cp -a $_pkg/usr/share/vim $fs/usr/share
erjo@4784 46 cp -a $WOK/$PACKAGE/vim72/runtime/vimrc_example.vim $fs/etc/vim/vimrc
erjo@4784 47 rm -f $fs/usr/bin/*tutor
erjo@4784 48 }
erjo@4784 49
erjo@4784 50
erjo@4784 51
erjo@4784 52 # Rules to clean extras dirs or files
erjo@4784 53 clean_wok()
erjo@4784 54 {
erjo@4784 55 rm -rf $PWD/vim72 2>/dev/null
erjo@4784 56 }
erjo@4784 57
erjo@4784 58 post_install()
erjo@4784 59 {
erjo@4784 60 local root
erjo@4784 61 root=$1
erjo@4784 62 echo "Processing post-install commands..."
erjo@4784 63 cmd=`readlink $root/bin/vi`
erjo@4784 64 if [ ! "$cmd" = "/usr/bin/vim" ]; then
erjo@4784 65 echo ""
erjo@4784 66 echo "**** Actual VI link : $cmd"
erjo@4784 67 echo ""
erjo@4784 68 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read anser
erjo@4784 69 if [ "$anser" == "y" ]; then
erjo@4784 70 echo ""
erjo@4784 71 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
erjo@4784 72 rm $root/bin/vi && ln -sf $root/usr/bin/vim-tiny $root/bin/vi
erjo@4784 73 status
erjo@4784 74 else
erjo@4784 75 echo ""
erjo@4784 76 echo "Leaving /bin/vi to : $cmd"
erjo@4784 77 fi
erjo@4784 78 fi
erjo@4784 79 }
erjo@4784 80
erjo@4784 81 post_remove()
erjo@4784 82 {
erjo@4784 83 # restore previous symlink
erjo@4784 84 echo "Processing post-remove commands..."
erjo@4784 85 ln -sf /bin/busybox /bin/vi
erjo@4784 86 }