wok-next view vim-tiny/receipt @ rev 20715

Up nsd (4.1.21)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sun May 27 13:10:46 2018 +0300 (2018-05-27)
parents f1752c8b2a2a
children
line source
1 # SliTaz package receipt.
3 PACKAGE="vim-tiny"
4 VERSION="7.4"
5 CATEGORY="editors"
6 SHORT_DESC="Advanced text editor with no GUI"
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="vim-$VERSION.tar.bz2"
14 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL"
16 DEPENDS="ncurses"
17 BUILD_DEPENDS="ncurses-dev"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
24 ./configure --prefix=/usr \
25 --with-features=tiny \
26 --without-x \
27 --disable-gui \
28 --enable-multibyte \
29 --with-vim-name=$PACKAGE \
30 --disable-acl \
31 $CONFIGURE_ARGS &&
32 make && make install
34 mkdir -p $DESTDIR/etc/vim
35 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
37 mkdir -p $install/usr/share/doc
38 mv $install/usr/share/vim/vim*/doc $install/usr/share/doc/$PACKAGE-$VERSION
39 }
41 # Rules to gen a SliTaz package suitable for Tazpkg.
42 genpkg_rules()
43 {
44 copy etc/ bin/ vim/
45 rm -f $fs/usr/bin/*tutor
46 rm -rf $fs/usr/share/vim/vim*/tutor
47 }
49 post_install()
50 {
51 cmd=$(readlink "$1/bin/vi")
52 if [ "$cmd" != '/usr/bin/vim' ]; then
53 echo
54 echo "**** Actual VI link : $cmd"
55 echo
56 echo -n 'Do you want vim for /bin/vi (y/N)? : '; read -t 30 anser
57 if [ "$anser" == 'y' ]; then
58 echo
59 action 'Removing vi link to make a new one pointing on /usr/bin/vim...'
60 rm "$1/bin/vi" && ln -sf /usr/bin/vim-tiny "$1/bin/vi"
61 status
62 else
63 echo
64 echo "Leaving /bin/vi to $cmd"
65 fi
66 fi
67 }
69 post_remove()
70 {
71 # restore previous symlink
72 ln -sf /bin/busybox "$1/bin/vi"
73 }