wok-6.x view vim-tiny/receipt @ rev 4956
xl2tpd: update tags
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 17 21:01:47 2010 +0100 (2010-02-17) |
parents | |
children | f917e0dfdfbd |
line source
1 # SliTaz package receipt.
3 PACKAGE="vim-tiny"
4 VERSION="7.2"
5 CATEGORY="development"
6 SHORT_DESC="Advanced text editor with no GUI"
7 MAINTAINER="erjo@slitaz.org"
8 DEPENDS="ncurses"
9 SOURCE="vim"
10 TARBALL="$SOURCE-$VERSION.tar.bz2"
11 WEB_SITE="http://www.vim.org/"
12 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL"
13 CONFIG_FILES="/etc/vimrc.tiny"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 src=vim72
19 #test -d $PACKAGE-$VERSION || mv vim72 $PACKAGE-$VERSION
20 cd $src
22 ./configure --prefix=/usr \
23 --cache-file=$PWD/config.cache \
24 --infodir=/usr/share/info \
25 --with-features=tiny \
26 --enable-gui=no \
27 --with-vim-name=$PACKAGE \
28 --disable-acl \
29 --disable-motif-check \
30 --disable-athena-check \
31 --mandir=/usr/share/man $CONFIGURE_ARGS &&
33 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/$src MAKE="make -e" &&
34 make DESTDIR=$PWD/_pkg install
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 _pkg="$PWD/vim72/_pkg"
42 mkdir -p $fs/usr $fs/usr/share $fs/etc/vim
44 cp -a $_pkg/usr/bin $fs/usr
45 cp -a $_pkg/usr/share/vim $fs/usr/share
46 cp -a $WOK/$PACKAGE/vim72/runtime/vimrc_example.vim $fs/etc/vim/vimrc
47 rm -f $fs/usr/bin/*tutor
48 }
52 # Rules to clean extras dirs or files
53 clean_wok()
54 {
55 rm -rf $PWD/vim72 2>/dev/null
56 }
58 post_install()
59 {
60 local root
61 root=$1
62 echo "Processing post-install commands..."
63 cmd=`readlink $root/bin/vi`
64 if [ ! "$cmd" = "/usr/bin/vim" ]; then
65 echo ""
66 echo "**** Actual VI link : $cmd"
67 echo ""
68 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read anser
69 if [ "$anser" == "y" ]; then
70 echo ""
71 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
72 rm $root/bin/vi && ln -sf $root/usr/bin/vim-tiny $root/bin/vi
73 status
74 else
75 echo ""
76 echo "Leaving /bin/vi to : $cmd"
77 fi
78 fi
79 }
81 post_remove()
82 {
83 # restore previous symlink
84 echo "Processing post-remove commands..."
85 ln -sf /bin/busybox /bin/vi
86 }