wok-6.x view gvim/receipt @ rev 22312
get-LibreOffice: look for available versions
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Nov 14 10:49:19 2019 +0100 (2019-11-14) |
parents | 02c70d036ea0 |
children | da0a38e4800e |
line source
1 # SliTaz package receipt.
3 PACKAGE="gvim"
4 VERSION="8.1"
5 CATEGORY="editors"
6 TAGS="text-editor"
7 SHORT_DESC="Advanced text editor, with gtk+ GUI."
8 MAINTAINER="erjo@slitaz.org"
9 LICENSE="other"
10 WEB_SITE="https://www.vim.org/"
12 SOURCE="vim"
13 TARBALL="$SOURCE-$VERSION.tar.bz2"
14 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL"
16 DEPENDS="gtk+ ncurses xorg-libXau xorg-libXdmcp xorg-libXt"
17 BUILD_DEPENDS="gtk+-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"|' \
28 $src/src/feature.h
29 # and global gvimrc file (set to /etc/vim/gvimrc)
30 sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' \
31 $src/src/feature.h
33 ./configure \
34 --prefix=/usr \
35 --cache-file=$PWD/config.cache \
36 --infodir=/usr/share/info \
37 --mandir=/usr/share/man \
38 --with-features=normal \
39 --with-x=yes \
40 --enable-gui=gtk2 \
41 --enable-multibyte \
42 --disable-athena-check \
43 --disable-motif-check \
44 $CONFIGURE_ARGS &&
46 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim81 MAKE="make -e" &&
47 make DESTDIR=$DESTDIR install
49 mkdir -p $DESTDIR/etc/vim
50 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
51 }
53 # Rules to gen a SliTaz package suitable for Tazpkg.
54 genpkg_rules()
55 {
56 mkdir -p \
57 $fs/usr/share/icons/hicolor/16x16/apps \
58 $fs/usr/share/applications \
59 $fs/etc
61 cp -a $install/usr/bin $fs/usr
62 cp -a $install/usr/share/vim $fs/usr/share
63 cp -a $src/runtime/vim16x16.png $fs/usr/share/icons/hicolor/16x16/apps/gvim.png
64 cp -a stuff/gvim.desktop $fs/usr/share/applications
65 cp -a $install/etc/vim $fs/etc
66 }
68 post_install()
69 {
70 cmd=$(readlink "$1/bin/vi")
71 if [ ! "$cmd" = '/usr/bin/vim' ]; 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 answer
76 if [ "$answer" = 'y' ]; then
77 echo ""
78 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
79 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi"
80 status
81 else
82 echo ""
83 echo "Leaving /bin/vi to : $cmd"
84 fi
85 fi
86 }
88 post_remove()
89 {
90 # restore previous symlink
91 ln -sf busybox "$1/bin/vi"
92 }