wok-stable view vim/receipt @ rev 11790
Up: glpi(0.80.7)
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sat Feb 25 00:57:17 2012 +0100 (2012-02-25) |
parents | ee65475504e7 |
children |
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 DEPENDS="ncurses 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/vim/vimrc"
13 TAGS="text-editor"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src
20 # define the place for the global vimrc file (set to /etc/vim/vimrc)
21 # (patch from Arch Linux PKGBUILD)
22 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
24 ./configure --prefix=/usr \
25 --cache-file=$PWD/config.cache \
26 --infodir=/usr/share/info \
27 --with-features=normal \
28 --with-x=no \
29 --disable-gui \
30 --enable-multibyte \
31 --disable-motif-check \
32 --disable-athena-check \
33 --mandir=/usr/share/man $CONFIGURE_ARGS &&
35 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" &&
36 make DESTDIR=$DESTDIR install
37 mkdir -p $DESTDIR/etc/vim
38 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
39 }
41 # Rules to gen a SliTaz package suitable for Tazpkg.
42 genpkg_rules()
43 {
44 mkdir -p $fs/usr/share $fs/etc
46 cp -a $_pkg/usr/bin $fs/usr
47 cp -a $_pkg/usr/share/vim $fs/usr/share
48 cp -a $_pkg/etc/vim $fs/etc
49 }
51 post_install()
52 {
53 local root
54 root=$1
55 echo "Processing post-install commands..."
56 cmd=`readlink $root/bin/vi`
57 if [ ! "$cmd" = "/usr/bin/vim" ]; then
58 echo ""
59 echo "**** Actual VI link : $cmd"
60 echo ""
61 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read anser
62 if [ "$anser" == "y" ]; then
63 echo ""
64 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
65 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
66 status
67 else
68 echo ""
69 echo "Leaving /bin/vi to : $cmd"
70 fi
71 fi
72 }
74 post_remove()
75 {
76 # restore previous symlink
77 echo "Processing post-remove commands..."
78 ln -sf /bin/busybox $1/bin/vi
79 }