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