wok-stable view vim/receipt @ rev 6286
Fix: Fix vimrc location
author | Mallory Mollo <mallory@sweetpeople.org> |
---|---|
date | Wed Sep 15 20:41:56 2010 +0200 (2010-09-15) |
parents | 4897058add72 |
children | 403fb8adf07d |
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 --disable-motif-check \
27 --disable-athena-check \
28 --mandir=/usr/share/man $CONFIGURE_ARGS &&
30 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/$src MAKE="make -e" &&
31 make DESTDIR=$PWD/_pkg install
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 _pkg="$PWD/vim72/_pkg"
39 mkdir -p $fs/usr $fs/usr/share $fs/etc/vim
41 cp -a $_pkg/usr/bin $fs/usr
42 cp -a $_pkg/usr/share/vim $fs/usr/share
43 cp -a $WOK/$PACKAGE/vim72/runtime/vimrc_example.vim $fs/etc/vim/vimrc
44 rm -f $fs/usr/bin/*vimtutor
45 }
49 # Rules to clean extras dirs or files
50 clean_wok()
51 {
52 rm -rf $PWD/vim72 2>/dev/null
53 }
55 post_install()
56 {
57 local root
58 root=$1
59 echo "Processing post-install commands..."
60 cmd=`readlink $root/bin/vi`
61 if [ ! "$cmd" = "/usr/bin/vim" ]; then
62 echo ""
63 echo "**** Actual VI link : $cmd"
64 echo ""
65 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read anser
66 if [ "$anser" == "y" ]; then
67 echo ""
68 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
69 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
70 status
71 else
72 echo ""
73 echo "Leaving /bin/vi to : $cmd"
74 fi
75 fi
76 }
78 post_remove()
79 {
80 # restore previous symlink
81 echo "Processing post-remove commands..."
82 ln -sf /bin/busybox /bin/vi
83 }