wok-current view gvim/receipt @ rev 22822
Add emu8051
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Feb 06 12:27:36 2020 +0100 (2020-02-06) |
parents | bd87193daed4 |
children | e9af2ddc813b |
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/"
11 PROVIDES="xxd"
13 SOURCE="vim"
14 TARBALL="$SOURCE-$VERSION.tar.bz2"
15 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL"
17 DEPENDS="gtk+ ncurses xorg-libXau xorg-libXdmcp xorg-libXt"
18 BUILD_DEPENDS="gtk+-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"|' \
29 $src/src/feature.h
30 # and global gvimrc file (set to /etc/vim/gvimrc)
31 sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' \
32 $src/src/feature.h
34 ./configure \
35 --prefix=/usr \
36 --cache-file=$PWD/config.cache \
37 --infodir=/usr/share/info \
38 --mandir=/usr/share/man \
39 --with-features=normal \
40 --with-x=yes \
41 --enable-gui=gtk2 \
42 --enable-multibyte \
43 --disable-athena-check \
44 --disable-motif-check \
45 $CONFIGURE_ARGS &&
47 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim81 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 \
58 $fs/usr/share/icons/hicolor/16x16/apps \
59 $fs/usr/share/applications \
60 $fs/etc
62 cp -a $install/usr/bin $fs/usr
63 cp -a $install/usr/share/vim $fs/usr/share
64 cp -a $src/runtime/vim16x16.png $fs/usr/share/icons/hicolor/16x16/apps/gvim.png
65 cp -a stuff/gvim.desktop $fs/usr/share/applications
66 cp -a $install/etc/vim $fs/etc
67 }
69 post_install()
70 {
71 cmd=$(readlink "$1/bin/vi")
72 if [ ! "$cmd" = '/usr/bin/vim' ]; then
73 echo ""
74 echo "**** Actual VI link : $cmd"
75 echo ""
76 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 answer
77 if [ "$answer" = 'y' ]; then
78 echo ""
79 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
80 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$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 busybox "$1/bin/vi"
93 }