wok-6.x view gvim/receipt @ rev 20038
Add ipset, ipset-dev, iprange, firehol
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Aug 24 19:59:19 2017 +0200 (2017-08-24) |
parents | 3494cfd4c595 |
children | 02c70d036ea0 |
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 export LDFLAGS="$LDFLAGS -ltinfo"
24 # define the place for the global vimrc file (set to /etc/vim/vimrc)
25 # (patch from Arch Linux PKGBUILD)
26 sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
27 # and global gvimrc file (set to /etc/vim/gvimrc)
28 sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' $src/src/feature.h
30 ./configure \
31 --prefix=/usr \
32 --cache-file=$PWD/config.cache \
33 --infodir=/usr/share/info \
34 --with-features=normal \
35 --with-x=yes \
36 --enable-gui=gtk2 \
37 --enable-multibyte \
38 --disable-motif-check \
39 --disable-athena-check \
40 --mandir=/usr/share/man \
41 $CONFIGURE_ARGS &&
43 make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" &&
44 make DESTDIR=$DESTDIR install
45 mkdir -p $DESTDIR/etc/vim
46 cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
47 }
49 # Rules to gen a SliTaz package suitable for Tazpkg.
50 genpkg_rules()
51 {
52 mkdir -p $fs/usr/share/icons/hicolor/16x16/apps $fs/usr/share/applications $fs/etc
54 cp -a $install/usr/bin $fs/usr
55 cp -a $install/usr/share/vim $fs/usr/share
56 cp -a $src/runtime/vim16x16.png $fs/usr/share/icons/hicolor/16x16/apps/gvim.png
57 cp -a stuff/gvim.desktop $fs/usr/share/applications
58 cp -a $install/etc/vim $fs/etc
59 }
61 post_install()
62 {
63 cmd=$(readlink "$1/bin/vi")
64 if [ ! "$cmd" == '/usr/bin/vim' ]; then
65 echo ""
66 echo "**** Actual VI link : $cmd"
67 echo ""
68 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 answer
69 if [ "$answer" == 'y' ]; then
70 echo ""
71 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
72 rm "$1/bin/vi" && ln -sf /usr/bin/vim "$1/bin/vi"
73 status
74 else
75 echo ""
76 echo "Leaving /bin/vi to : $cmd"
77 fi
78 fi
79 }
81 post_remove()
82 {
83 # restore previous symlink
84 ln -sf busybox "$1/bin/vi"
85 }