wok annotate vim-tiny/receipt @ rev 9361

Up: xorg-libX11 to 1.4.2.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Mar 20 15:30:17 2011 +0000 (2011-03-20)
parents 928de5046af6
children ee65475504e7
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"
jozee@4975 14 TAGS="text-editor"
erjo@4784 15
erjo@4784 16 # Rules to configure and make the package.
erjo@4784 17 compile_rules()
erjo@4784 18 {
erjo@4784 19 cd $src
erjo@4784 20
erjo@4784 21 ./configure --prefix=/usr \
erjo@4784 22 --cache-file=$PWD/config.cache \
erjo@4784 23 --infodir=/usr/share/info \
erjo@4784 24 --with-features=tiny \
erjo@4784 25 --enable-gui=no \
lufeng369@7853 26 --enable-multibyte \
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" &&
slaxemulator@8751 34 make DESTDIR=$DESTDIR install
slaxemulator@8751 35 mkdir -p $DESTDIR/etc/vim
slaxemulator@8751 36 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
erjo@4784 37 }
erjo@4784 38
erjo@4784 39 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@4784 40 genpkg_rules()
erjo@4784 41 {
slaxemulator@8751 42 mkdir -p $fs/usr $fs/usr/share
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 rm -f $fs/usr/bin/*tutor
erjo@4784 47 }
erjo@4784 48
erjo@4784 49 post_install()
erjo@4784 50 {
erjo@4784 51 local root
erjo@4784 52 root=$1
erjo@4784 53 echo "Processing post-install commands..."
erjo@4784 54 cmd=`readlink $root/bin/vi`
erjo@4784 55 if [ ! "$cmd" = "/usr/bin/vim" ]; then
erjo@4784 56 echo ""
erjo@4784 57 echo "**** Actual VI link : $cmd"
erjo@4784 58 echo ""
erjo@4784 59 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read anser
erjo@4784 60 if [ "$anser" == "y" ]; then
erjo@4784 61 echo ""
erjo@4784 62 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
erjo@4784 63 rm $root/bin/vi && ln -sf $root/usr/bin/vim-tiny $root/bin/vi
erjo@4784 64 status
erjo@4784 65 else
erjo@4784 66 echo ""
erjo@4784 67 echo "Leaving /bin/vi to : $cmd"
erjo@4784 68 fi
erjo@4784 69 fi
erjo@4784 70 }
erjo@4784 71
erjo@4784 72 post_remove()
erjo@4784 73 {
erjo@4784 74 # restore previous symlink
erjo@4784 75 echo "Processing post-remove commands..."
slaxemulator@8751 76 ln -sf /bin/busybox $1/bin/vi
erjo@4784 77 }