wok-next view vim/receipt @ rev 20905

Update packages from ISO and LFS backages (all but toolchain)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Aug 07 00:30:45 2018 +0300 (2018-08-07)
parents 2f73953f6cee
children 2949147cd6ec
line source
1 # SliTaz package receipt v2.
3 PACKAGE="vim"
4 VERSION="8.1"
5 CATEGORY="editors"
6 SHORT_DESC="Advanced text editor"
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="other"
9 WEB_SITE="http://www.vim.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
12 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL"
14 BUILD_DEPENDS="python ncurses-dev acl-dev diffutils gettext"
15 SPLIT="vim-tiny:tiny"
17 compile_rules() {
18 echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
20 case $SET in
21 '') SET_ARGS='';;
22 tiny) SET_ARGS='--with-features=tiny --with-vim-name=vim-tiny --disable-acl';;
23 esac
25 ./configure \
26 --without-x \
27 --disable-gui \
28 --enable-multibyte \
29 $SET_ARGS \
30 $CONFIGURE_ARGS &&
31 make &&
32 make install || return 1
34 install -Dm644 runtime/vimrc_example.vim $install/etc/vim/vimrc
36 mkdir -p $install/usr/share/doc
37 ln -s ../vim/vim${VERSION//./}/doc $install/usr/share/doc/vim-$VERSION
38 }
40 # TODO: put common files to vim-common package; maybe compile in the single set
42 genpkg_rules() {
43 case $PACKAGE in
44 vim)
45 copy @std
46 DEPENDS="ncurses acl attr diffutils"
47 ;;
48 vim-tiny)
49 copy @std
50 rm -f $fs/usr/bin/*tutor
51 rm -rf $fs/usr/share/vim/vim*/tutor
52 DEPENDS="ncurses"
53 ;;
54 esac
55 CONFIG_FILES="/etc/vim/vimrc"
56 TAGS="text-editor"
57 }
59 # common post-install for vim and vim-tiny
60 post_install() {
61 cmd=$(readlink "$1/bin/vi")
62 [ "$cmd" != '/usr/bin/vim' ] || return
63 echo
64 echo "**** Actual VI link : $cmd"
65 echo
66 echo -n 'Do you want vim for /bin/vi (y/N)? : '; read -t 30 anser
67 if [ "$anser" == 'y' ]; then
68 echo
69 action 'Removing vi link to make a new one pointing on /usr/bin/vim...'
70 rm "$1/bin/vi"; ln -sf ../usr/bin/vim "$1/bin/vi"
71 status
72 else
73 echo
74 echo "Leaving /bin/vi to $cmd"
75 fi
76 }