wok view vim/receipt @ rev 13646

Up: expedite (1.7.1)
author Christophe Lincoln <pankso@slitaz.org>
date Fri Nov 16 00:31:15 2012 +0100 (2012-11-16)
parents dd9679f8a35f
children 749ffdd335d7
line source
1 # SliTaz package receipt.
3 PACKAGE="vim"
4 VERSION="7.3"
5 CATEGORY="development"
6 SHORT_DESC="Advanced text editor"
7 MAINTAINER="erjo@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.bz2"
9 WEB_SITE="http://www.vim.org/"
10 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL"
11 CONFIG_FILES="/etc/vim/vimrc"
12 TAGS="text-editor"
14 DEPENDS="ncurses acl diffutils"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
21 # define the place for the global vimrc file (set to /etc/vim/vimrc)
22 # (patch from Arch Linux PKGBUILD)
23 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
25 ./configure --prefix=/usr \
26 --cache-file=$PWD/config.cache \
27 --infodir=/usr/share/info \
28 --with-features=normal \
29 --with-x=no \
30 --disable-gui \
31 --enable-multibyte \
32 --disable-motif-check \
33 --disable-athena-check \
34 --mandir=/usr/share/man $CONFIGURE_ARGS &&
36 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" &&
37 make DESTDIR=$DESTDIR install
38 mkdir -p $DESTDIR/etc/vim
39 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
40 }
42 # Rules to gen a SliTaz package suitable for Tazpkg.
43 genpkg_rules()
44 {
45 mkdir -p $fs/usr/share $fs/etc
47 cp -a $_pkg/usr/bin $fs/usr
48 cp -a $_pkg/usr/share/vim $fs/usr/share
49 cp -a $_pkg/etc/vim $fs/etc
50 }
52 post_install()
53 {
54 local root
55 root=$1
56 echo "Processing post-install commands..."
57 cmd=`readlink $root/bin/vi`
58 if [ ! "$cmd" = "/usr/bin/vim" ]; then
59 echo ""
60 echo "**** Actual VI link : $cmd"
61 echo ""
62 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read anser
63 if [ "$anser" == "y" ]; then
64 echo ""
65 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
66 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
67 status
68 else
69 echo ""
70 echo "Leaving /bin/vi to : $cmd"
71 fi
72 fi
73 }
75 post_remove()
76 {
77 # restore previous symlink
78 echo "Processing post-remove commands..."
79 ln -sf /bin/busybox $1/bin/vi
80 }