wok view vim-tiny/receipt @ rev 23422

updated perltidy (20140711 -> 20200110)
author Hans-G?nter Theisgen
date Wed Apr 01 08:11:45 2020 +0100 (2020-04-01)
parents cbff385f6ca4
children e77ae4711268
line source
1 # SliTaz package receipt.
3 PACKAGE="vim-tiny"
4 VERSION="8.1.2237"
5 CATEGORY="editors"
6 TAGS="text-editor"
7 SHORT_DESC="Advanced text editor without GUI."
8 MAINTAINER="erjo@slitaz.org"
9 LICENSE="other"
10 WEB_SITE="https://www.vim.org/"
12 SOURCE="vim"
13 TARBALL="$SOURCE-$VERSION.tar.gz"
14 WGET_URL="https://github.com/$SOURCE/$SOURCE/archive/v$VERSION.tar.gz"
16 DEPENDS="ncurses"
17 BUILD_DEPENDS="ncurses-dev"
19 CONFIG_FILES="/etc/vim/vimrc"
21 # Rules to configure and make the package.
22 compile_rules()
23 {
24 export LDFLAGS="$LDFLAGS -ltinfo"
26 # define the place for the global vimrc file (set to /etc/vim/vimrc)
27 # (patch from Arch Linux PKGBUILD)
28 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
30 ./configure \
31 --prefix=/usr \
32 --cache-file=$PWD/config.cache \
33 --infodir=/usr/share/info \
34 --with-features=tiny \
35 --with-x=no \
36 --disable-gui \
37 --enable-multibyte \
38 --with-vim-name=$PACKAGE \
39 --disable-acl \
40 --disable-motif-check \
41 --disable-athena-check \
42 --mandir=/usr/share/man \
43 $CONFIGURE_ARGS &&
44 make \
45 VIMRCLOC=/etc/vim \
46 VIMRUNTIMEDIR=/usr/share/vim/vim81 \
47 MAKE="make -e" &&
48 make DESTDIR=$DESTDIR install
50 mkdir -p $DESTDIR/etc/vim
51 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
52 }
54 # Rules to gen a SliTaz package suitable for Tazpkg.
55 genpkg_rules()
56 {
57 mkdir -p $fs/usr/share
58 mkdir -p $fs/etc
60 cp -a $install/usr/bin $fs/usr
61 cp -a $install/usr/share/vim $fs/usr/share
62 cp -a $install/etc/vim $fs/etc
64 rm -f $fs/usr/bin/*tutor
65 }
67 post_install()
68 {
69 cmd=$(readlink "$1/bin/vi")
70 if [ "$cmd" != '/usr/bin/vim' ]
71 then
72 echo ''
73 echo "**** Actual VI link : $cmd"
74 echo ''
75 echo -n 'Do you want vim for /bin/vi (y/N) ? : '; read -t 30 anser
76 if [ "$anser" = 'y' ]
77 then
78 echo ''
79 action 'Removing vi link to make a new one pointing on /usr/bin/vim...'
80 rm "$1/bin/vi" && ln -sf /usr/bin/vim-tiny "$1/bin/vi"
81 status
82 else
83 echo ''
84 echo "Leaving /bin/vi to : $cmd"
85 fi
86 fi
87 }
89 post_remove()
90 {
91 # restore previous symlink
92 ln -sf /bin/busybox "$1/bin/vi"
93 }