wok-next diff gvim/receipt @ rev 13034

Add compiler & vnc tags
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Jun 12 20:04:51 2012 +0200 (2012-06-12)
parents 240266efee48
children 749ffdd335d7
line diff
     1.1 --- a/gvim/receipt	Sun Mar 06 22:05:16 2011 +0100
     1.2 +++ b/gvim/receipt	Tue Jun 12 20:04:51 2012 +0200
     1.3 @@ -1,11 +1,11 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="gvim"
     1.7 -VERSION="7.2"
     1.8 +VERSION="7.3"
     1.9  CATEGORY="development"
    1.10  SHORT_DESC="Advanced text editor, with gtk+ GUI"
    1.11  MAINTAINER="erjo@slitaz.org"
    1.12 -DEPENDS="ncurses gtk+ xorg-libXt"
    1.13 +DEPENDS="ncurses gtk+ xorg-libXt xorg-libXau xorg-libXdmcp"
    1.14  SOURCE="vim"
    1.15  TARBALL="$SOURCE-$VERSION.tar.bz2"
    1.16  WEB_SITE="http://www.vim.org/"
    1.17 @@ -17,18 +17,25 @@
    1.18  compile_rules()
    1.19  {
    1.20  	cd $src
    1.21 +
    1.22 +	# define the place for the global vimrc file (set to /etc/vim/vimrc)
    1.23 +	# (patch from Arch Linux PKGBUILD)
    1.24 +	sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
    1.25 +	# and global gvimrc file (set to /etc/vim/gvimrc)
    1.26 +	sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' $src/src/feature.h
    1.27  	
    1.28  	./configure --prefix=/usr \
    1.29  	 --cache-file=$PWD/config.cache \
    1.30  	 --infodir=/usr/share/info \
    1.31  	 --with-features=normal \
    1.32 +	 --with-x=yes \
    1.33  	 --enable-gui=gtk2 \
    1.34   	 --enable-multibyte \
    1.35  	 --disable-motif-check \
    1.36  	 --disable-athena-check \
    1.37  	 --mandir=/usr/share/man $CONFIGURE_ARGS && 
    1.38  	 
    1.39 -	make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim72 MAKE="make -e" &&
    1.40 +	make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" &&
    1.41  	make DESTDIR=$DESTDIR install
    1.42  	mkdir -p $DESTDIR/etc/vim
    1.43  	cp -a $src/runtime/vimrc_example.vim $DESTDIR/etc/vim/vimrc
    1.44 @@ -37,14 +44,42 @@
    1.45  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.46  genpkg_rules()
    1.47  {
    1.48 -	mkdir -p -p $fs/usr/share/pixmaps \
    1.49 -		-p $fs/usr/share/applications
    1.50 +	mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications $fs/etc
    1.51  
    1.52  	cp -a $_pkg/usr/bin $fs/usr
    1.53  	cp -a $_pkg/usr/share/vim $fs/usr/share
    1.54  	cp -a $src/runtime/vim16x16.png $fs/usr/share/pixmaps/gvim.png
    1.55  	cp -a stuff/gvim.desktop $fs/usr/share/applications
    1.56 -	rm -f $fs/usr/bin/*vimtutor
    1.57 +	cp -a $_pkg/etc/vim $fs/etc
    1.58  }
    1.59  
    1.60 +post_install()
    1.61 +{
    1.62 +    local root
    1.63 +    root=$1
    1.64 +    echo "Processing post-install commands..."
    1.65 +    cmd=`readlink $root/bin/vi`
    1.66 +    if [ ! "$cmd" = "/usr/bin/vim" ]; then
    1.67 +        echo ""
    1.68 +        echo "**** Actual VI link : $cmd"
    1.69 +        echo ""
    1.70 +        echo -n "Do you want vim  for /bin/vi (y/N) ? : "; read anser
    1.71 +        if [ "$anser" == "y" ]; then
    1.72 +            echo ""
    1.73 +            echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
    1.74 +            rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
    1.75 +            status
    1.76 +        else
    1.77 +            echo ""
    1.78 +            echo "Leaving /bin/vi to : $cmd"
    1.79 +        fi
    1.80 +    fi
    1.81 +}
    1.82  
    1.83 +post_remove()
    1.84 +{
    1.85 +        # restore previous symlink
    1.86 +        echo "Processing post-remove commands..."
    1.87 +        ln -sf /bin/busybox $1/bin/vi
    1.88 +}
    1.89 +