wok view vim/receipt @ rev 16177

8086tiny: nasm is native, do not use it
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Mar 30 16:34:03 2014 +0000 (2014-03-30)
parents 749ffdd335d7
children d9d7fcbb1ab3
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 LICENSE="other"
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 DEPENDS="ncurses acl diffutils"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
22 # define the place for the global vimrc file (set to /etc/vim/vimrc)
23 # (patch from Arch Linux PKGBUILD)
24 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
26 ./configure --prefix=/usr \
27 --cache-file=$PWD/config.cache \
28 --infodir=/usr/share/info \
29 --with-features=normal \
30 --with-x=no \
31 --disable-gui \
32 --enable-multibyte \
33 --disable-motif-check \
34 --disable-athena-check \
35 --mandir=/usr/share/man $CONFIGURE_ARGS &&
37 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" &&
38 make DESTDIR=$DESTDIR install
39 mkdir -p $DESTDIR/etc/vim
40 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 mkdir -p $fs/usr/share $fs/etc
48 cp -a $install/usr/bin $fs/usr
49 cp -a $install/usr/share/vim $fs/usr/share
50 cp -a $install/etc/vim $fs/etc
51 }
53 post_install()
54 {
55 local root
56 root=$1
57 echo "Processing post-install commands..."
58 cmd=`readlink $root/bin/vi`
59 if [ ! "$cmd" = "/usr/bin/vim" ]; then
60 echo ""
61 echo "**** Actual VI link : $cmd"
62 echo ""
63 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 anser
64 if [ "$anser" == "y" ]; then
65 echo ""
66 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
67 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
68 status
69 else
70 echo ""
71 echo "Leaving /bin/vi to : $cmd"
72 fi
73 fi
74 }
76 post_remove()
77 {
78 # restore previous symlink
79 echo "Processing post-remove commands..."
80 ln -sf /bin/busybox $1/bin/vi
81 }