wok-next view vim/receipt @ rev 19582
Up: eudev, man-db (added), vim. Extra up: ncurses, tk, python, cacerts.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Dec 30 02:04:27 2016 +0200 (2016-12-30) |
parents | 6fab3264ba87 |
children | 2f73953f6cee |
line source
1 # SliTaz package receipt.
3 PACKAGE="vim"
4 VERSION="7.4"
5 CATEGORY="editors"
6 SHORT_DESC="Advanced text editor"
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="other"
9 WEB_SITE="http://www.vim.org/"
10 CONFIG_FILES="/etc/vim/vimrc"
11 TAGS="text-editor"
13 TARBALL="$PACKAGE-$VERSION.tar.bz2"
14 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL"
16 DEPENDS="ncurses acl attr diffutils"
17 # python may be removed after "ncursesw problem" solved
18 BUILD_DEPENDS="python ncurses-dev acl-dev diffutils gettext"
19 SIBLINGS="vim-tiny"
21 # Rules to configure and make the package.
22 compile_rules()
23 {
24 echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
26 ./configure \
27 --without-x \
28 --disable-gui \
29 --enable-multibyte \
30 $CONFIGURE_ARGS &&
31 make && make install
33 mkdir -p $install/etc/vim
34 cp -a $src/runtime/vimrc_example.vim $install/etc/vim/vimrc
36 mkdir -p $install/usr/share/doc
37 ln -s ../vim/vim*/doc $install/usr/share/doc/vim-$VERSION
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 cook_copy_folders etc bin vim
44 }
46 post_install()
47 {
48 cmd=$(readlink "$1/bin/vi")
49 if [ "$cmd" != '/usr/bin/vim' ]; then
50 echo
51 echo "**** Actual VI link : $cmd"
52 echo
53 echo -n 'Do you want vim for /bin/vi (y/N)? : '; read -t 30 anser
54 if [ "$anser" == 'y' ]; then
55 echo
56 echo -n 'Removing vi link to make a new one pointing on /usr/bin/vim...'
57 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi"
58 status
59 else
60 echo
61 echo "Leaving /bin/vi to : $cmd"
62 fi
63 fi
64 }
66 post_remove()
67 {
68 ln -sf /bin/busybox "$1/bin/vi"
69 }