wok-next view gvim/receipt @ rev 20451

xcb-util* are obsolete -> xorg-xcb-util* (again)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Feb 28 14:26:56 2018 +0200 (2018-02-28)
parents 9e01bc6321ea
children d958fec46c9f
line source
1 # SliTaz package receipt.
3 PACKAGE="gvim"
4 VERSION="7.3"
5 CATEGORY="editors"
6 SHORT_DESC="Advanced text editor, with gtk+ GUI"
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="other"
9 SOURCE="vim"
10 TARBALL="$SOURCE-$VERSION.tar.bz2"
11 WEB_SITE="http://www.vim.org/"
12 WGET_URL="ftp://ftp.vim.org/pub/vim/unix/$TARBALL"
13 CONFIG_FILES="/etc/vim/vimrc"
14 TAGS="text-editor"
16 DEPENDS="ncurses gtk+ xorg-libXt xorg-libXau xorg-libXdmcp"
17 BUILD_DEPENDS="gtk+-dev"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 # define the place for the global vimrc file (set to /etc/vim/vimrc)
23 # (patch from Arch Linux PKGBUILD)
24 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
25 # and global gvimrc file (set to /etc/vim/gvimrc)
26 sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' $src/src/feature.h
28 ./configure \
29 --prefix=/usr \
30 --cache-file=$PWD/config.cache \
31 --infodir=/usr/share/info \
32 --with-features=normal \
33 --with-x=yes \
34 --enable-gui=gtk2 \
35 --enable-multibyte \
36 --disable-motif-check \
37 --disable-athena-check \
38 --mandir=/usr/share/man \
39 $CONFIGURE_ARGS &&
41 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" &&
42 make DESTDIR=$DESTDIR install
43 mkdir -p $DESTDIR/etc/vim
44 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
45 }
47 # Rules to gen a SliTaz package suitable for Tazpkg.
48 genpkg_rules()
49 {
50 mkdir -p $fs/usr/share/icons/hicolor/16x16/apps $fs/usr/share/applications $fs/etc
52 cp -a $install/usr/bin $fs/usr
53 cp -a $install/usr/share/vim $fs/usr/share
54 cp -a $src/runtime/vim16x16.png $fs/usr/share/icons/hicolor/16x16/apps/gvim.png
55 cp -a stuff/gvim.desktop $fs/usr/share/applications
56 cp -a $install/etc/vim $fs/etc
57 }
59 post_install()
60 {
61 cmd=$(readlink "$1/bin/vi")
62 if [ ! "$cmd" == '/usr/bin/vim' ]; then
63 echo ""
64 echo "**** Actual VI link : $cmd"
65 echo ""
66 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 answer
67 if [ "$answer" == 'y' ]; then
68 echo ""
69 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
70 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi"
71 status
72 else
73 echo ""
74 echo "Leaving /bin/vi to : $cmd"
75 fi
76 fi
77 }
79 post_remove()
80 {
81 # restore previous symlink
82 ln -sf busybox "$1/bin/vi"
83 }