wok-6.x view vim/receipt @ rev 20906
perl-glib: fix wget_url
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Feb 27 10:53:14 2019 +0100 (2019-02-27) |
parents | 6fab3264ba87 |
children | c16b1e0dda38 |
line source
1 # SliTaz package receipt.
3 PACKAGE="vim"
4 VERSION="7.3"
5 CATEGORY="editors"
6 SHORT_DESC="Advanced text editor"
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="other"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://www.vim.org/"
11 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL"
12 CONFIG_FILES="/etc/vim/vimrc"
13 TAGS="text-editor"
15 DEPENDS="ncurses acl diffutils"
16 BUILD_DEPENDS="ncurses-dev acl-dev diffutils"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 export LDFLAGS="$LDFLAGS -ltinfo"
23 # define the place for the global vimrc file (set to /etc/vim/vimrc)
24 # (patch from Arch Linux PKGBUILD)
25 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
27 ./configure \
28 --prefix=/usr \
29 --cache-file=$PWD/config.cache \
30 --infodir=/usr/share/info \
31 --with-features=normal \
32 --with-x=no \
33 --disable-gui \
34 --enable-multibyte \
35 --disable-motif-check \
36 --disable-athena-check \
37 --mandir=/usr/share/man $CONFIGURE_ARGS &&
39 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" &&
40 make DESTDIR=$DESTDIR install
41 mkdir -p $DESTDIR/etc/vim
42 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
43 }
45 # Rules to gen a SliTaz package suitable for Tazpkg.
46 genpkg_rules()
47 {
48 mkdir -p $fs/usr/share $fs/etc
50 cp -a $install/usr/bin $fs/usr
51 cp -a $install/usr/share/vim $fs/usr/share
52 cp -a $install/etc/vim $fs/etc
53 }
55 post_install()
56 {
57 cmd=$(readlink "$1/bin/vi")
58 if [ "$cmd" != '/usr/bin/vim' ]; then
59 echo ''
60 echo "**** Actual VI link : $cmd"
61 echo ''
62 echo -n 'Do you want vim for /bin/vi (y/N) ? : '; read -t 30 anser
63 if [ "$anser" = 'y' ]; then
64 echo ''
65 echo -n 'Removing vi link to make a new one pointing on /usr/bin/vim...'
66 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi"
67 status
68 else
69 echo ''
70 echo "Leaving /bin/vi to : $cmd"
71 fi
72 fi
73 }
75 post_remove()
76 {
77 # restore previous symlink
78 ln -sf /bin/busybox "$1/bin/vi"
79 }