wok view gvim/receipt @ rev 23532

updated python-prompt-toolkit (0.57 -> 2.0.10)
author Hans-G?nter Theisgen
date Mon Apr 06 15:37:40 2020 +0100 (2020-04-06)
parents da0a38e4800e
children af8d823a3077
line source
1 # SliTaz package receipt.
3 PACKAGE="gvim"
4 VERSION="8.2"
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 PROVIDES="xxd"
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 \
48 VIMRCLOC=/etc/vim \
49 VIMRUNTIMEDIR=/usr/share/vim/vim82 \
50 MAKE="make -e" &&
51 make DESTDIR=$DESTDIR install
53 mkdir -p $DESTDIR/etc/vim
54 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
55 }
57 # Rules to gen a SliTaz package suitable for Tazpkg.
58 genpkg_rules()
59 {
60 mkdir -p $fs/usr/share/icons/hicolor/16x16/apps
61 mkdir -p $fs/usr/share/applications
62 mkdir -p $fs/etc
64 cp -a $install/usr/bin $fs/usr
65 cp -a $install/usr/share/vim $fs/usr/share
66 cp -a $src/runtime/vim16x16.png $fs/usr/share/icons/hicolor/16x16/apps/gvim.png
67 cp -a stuff/gvim.desktop $fs/usr/share/applications
68 cp -a $install/etc/vim $fs/etc
69 }
71 post_install()
72 {
73 cmd=$(readlink "$1/bin/vi")
74 if [ ! "$cmd" = '/usr/bin/vim' ]
75 then
76 echo ""
77 echo "**** Actual VI link : $cmd"
78 echo ""
79 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 answer
80 if [ "$answer" = 'y' ]
81 then
82 echo ""
83 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
84 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi"
85 status
86 else
87 echo ""
88 echo "Leaving /bin/vi to : $cmd"
89 fi
90 fi
91 }
93 post_remove()
94 {
95 # restore previous symlink
96 ln -sf busybox "$1/bin/vi"
97 }