wok view vim/receipt @ rev 8215

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