wok-current annotate vim/receipt @ rev 9131

Make vim don't depends on X/GTK stuff
author Antoine Bodin <gokhlayeh@slitaz.org>
date Sun Mar 06 04:31:26 2011 +0100 (2011-03-06)
parents be13f25e790b
children 3cddd3e4bd3e
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"
gokhlayeh@9131 8 DEPENDS="ncurses"
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 {
erjo@250 18 cd $src
erjo@250 19
erjo@250 20 ./configure --prefix=/usr \
erjo@250 21 --cache-file=$PWD/config.cache \
erjo@250 22 --infodir=/usr/share/info \
erjo@250 23 --with-features=normal \
gokhlayeh@9131 24 --disable-gui \
rocky@7851 25 --enable-multibyte \
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" &&
slaxemulator@8751 31 make DESTDIR=$DESTDIR install
slaxemulator@8751 32 mkdir -p $DESTDIR/etc/vim
slaxemulator@8751 33 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
erjo@250 34 }
erjo@250 35
erjo@250 36 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@250 37 genpkg_rules()
erjo@250 38 {
slaxemulator@8751 39 mkdir -p $fs/usr $fs/usr/share
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 rm -f $fs/usr/bin/*vimtutor
erjo@2927 44 }
erjo@250 45
erjo@250 46 post_install()
erjo@250 47 {
erjo@250 48 local root
erjo@250 49 root=$1
erjo@250 50 echo "Processing post-install commands..."
erjo@250 51 cmd=`readlink $root/bin/vi`
erjo@250 52 if [ ! "$cmd" = "/usr/bin/vim" ]; then
erjo@250 53 echo ""
erjo@250 54 echo "**** Actual VI link : $cmd"
erjo@250 55 echo ""
erjo@250 56 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read anser
erjo@250 57 if [ "$anser" == "y" ]; then
erjo@250 58 echo ""
erjo@250 59 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
erjo@1354 60 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
erjo@250 61 status
erjo@250 62 else
erjo@250 63 echo ""
erjo@250 64 echo "Leaving /bin/vi to : $cmd"
erjo@250 65 fi
erjo@250 66 fi
erjo@250 67 }
erjo@250 68
erjo@2531 69 post_remove()
erjo@2531 70 {
erjo@2531 71 # restore previous symlink
erjo@2531 72 echo "Processing post-remove commands..."
slaxemulator@8751 73 ln -sf /bin/busybox $1/bin/vi
erjo@2531 74 }