wok view gvim/receipt @ rev 18058

Add py3k3: Python 3.3.x - py3k is 3.2.x
author Nathan Neulinger <nneul@neulinger.org>
date Sat May 16 14:55:13 2015 +0000 (2015-05-16)
parents 2a2d57bb6788
children 6c09056154b2
line source
1 # SliTaz package receipt.
3 PACKAGE="gvim"
4 VERSION="7.3"
5 CATEGORY="development"
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 --prefix=/usr \
31 --cache-file=$PWD/config.cache \
32 --infodir=/usr/share/info \
33 --with-features=normal \
34 --with-x=yes \
35 --enable-gui=gtk2 \
36 --enable-multibyte \
37 --disable-motif-check \
38 --disable-athena-check \
39 --mandir=/usr/share/man $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/pixmaps $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/pixmaps/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 local root
62 root=$1
63 echo "Processing post-install commands..."
64 cmd=`readlink $root/bin/vi`
65 if [ ! "$cmd" = "/usr/bin/vim" ]; then
66 echo ""
67 echo "**** Actual VI link : $cmd"
68 echo ""
69 echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 anser
70 if [ "$anser" == "y" ]; then
71 echo ""
72 echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
73 rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
74 status
75 else
76 echo ""
77 echo "Leaving /bin/vi to : $cmd"
78 fi
79 fi
80 }
82 post_remove()
83 {
84 # restore previous symlink
85 echo "Processing post-remove commands..."
86 ln -sf /bin/busybox $1/bin/vi
87 }