wok-6.x view vim/receipt @ rev 18703
jpilot: undo workaround (thanks Aleksej)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Dec 16 11:56:20 2015 +0100 (2015-12-16) |
parents | d9d7fcbb1ab3 |
children | 9e01bc6321ea |
line source
1 # SliTaz package receipt.
3 PACKAGE="vim"
4 VERSION="7.3"
5 CATEGORY="editors"
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"
16 BUILD_DEPENDS="ncurses-dev acl-dev diffutils"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 export LDFLAGS="$LDFLAGS -ltinfo"
23 # define the place for the global vimrc file (set to /etc/vim/vimrc)
24 # (patch from Arch Linux PKGBUILD)
25 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
27 ./configure --prefix=/usr \
28 --cache-file=$PWD/config.cache \
29 --infodir=/usr/share/info \
30 --with-features=normal \
31 --with-x=no \
32 --disable-gui \
33 --enable-multibyte \
34 --disable-motif-check \
35 --disable-athena-check \
36 --mandir=/usr/share/man $CONFIGURE_ARGS &&
38 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" &&
39 make DESTDIR=$DESTDIR install
40 mkdir -p $DESTDIR/etc/vim
41 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 mkdir -p $fs/usr/share $fs/etc
49 cp -a $install/usr/bin $fs/usr
50 cp -a $install/usr/share/vim $fs/usr/share
51 cp -a $install/etc/vim $fs/etc
52 }
54 post_install()
55 {
56 local root
57 root=$1
58 echo "Processing post-install commands..."
59 cmd=`readlink $root/bin/vi`
60 if [ ! "$cmd" = "/usr/bin/vim" ]; then
61 echo ""
62 echo "**** Actual VI link : $cmd"
63 echo ""
64 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 anser
65 if [ "$anser" == "y" ]; then
66 echo ""
67 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
68 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
69 status
70 else
71 echo ""
72 echo "Leaving /bin/vi to : $cmd"
73 fi
74 fi
75 }
77 post_remove()
78 {
79 # restore previous symlink
80 echo "Processing post-remove commands..."
81 ln -sf /bin/busybox $1/bin/vi
82 }