wok view vim/receipt @ rev 4503

slitaz-loram*: extract by default
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Nov 22 12:40:18 2009 +0100 (2009-11-22)
parents ea33e0d11cb6
children f917e0dfdfbd
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"
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/vimrc"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 src="vim72"
18 cd $src
20 ./configure --prefix=/usr \
21 --cache-file=$PWD/config.cache \
22 --infodir=/usr/share/info \
23 --with-features=normal \
24 --enable-gui=gtk2 \
25 --disable-motif-check \
26 --disable-athena-check \
27 --mandir=/usr/share/man $CONFIGURE_ARGS &&
29 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/$src MAKE="make -e" &&
30 make DESTDIR=$PWD/_pkg install
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 _pkg="$PWD/vim72/_pkg"
38 mkdir -p $fs/usr $fs/usr/share $fs/etc/vim
40 cp -a $_pkg/usr/bin $fs/usr
41 cp -a $_pkg/usr/share/vim $fs/usr/share
42 cp -a $WOK/$PACKAGE/vim72/runtime/vimrc_example.vim $fs/etc/vim/vimrc
43 rm -f $fs/usr/bin/*vimtutor
44 }
48 # Rules to clean extras dirs or files
49 clean_wok()
50 {
51 rm -rf $PWD/vim72 2>/dev/null
52 }
54 post_install()
55 {
56 local root
57 root=$1
58 echo "Processing post-install commands..."
59 cmd=`readlink $root/bin/vi`
60 if [ ! "$cmd" = "/usr/bin/vim" ]; then
61 echo ""
62 echo "**** Actual VI link : $cmd"
63 echo ""
64 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read anser
65 if [ "$anser" == "y" ]; then
66 echo ""
67 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
68 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
69 status
70 else
71 echo ""
72 echo "Leaving /bin/vi to : $cmd"
73 fi
74 fi
75 }
77 post_remove()
78 {
79 # restore previous symlink
80 echo "Processing post-remove commands..."
81 ln -sf /bin/busybox /bin/vi
82 }