wok rev 18303

gvim: move icon, upgrade .desktop file
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Aug 21 13:26:05 2015 +0300 (2015-08-21)
parents 9f653491537e
children 014b3427b79d
files gvim/receipt gvim/stuff/gvim.desktop
line diff
     1.1 --- a/gvim/receipt	Thu Aug 20 14:45:02 2015 +0200
     1.2 +++ b/gvim/receipt	Fri Aug 21 13:26:05 2015 +0300
     1.3 @@ -26,18 +26,20 @@
     1.4  	sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h
     1.5  	# and global gvimrc file (set to /etc/vim/gvimrc)
     1.6  	sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' $src/src/feature.h
     1.7 -	
     1.8 -	./configure --prefix=/usr \
     1.9 -	 --cache-file=$PWD/config.cache \
    1.10 -	 --infodir=/usr/share/info \
    1.11 -	 --with-features=normal \
    1.12 -	 --with-x=yes \
    1.13 -	 --enable-gui=gtk2 \
    1.14 - 	 --enable-multibyte \
    1.15 -	 --disable-motif-check \
    1.16 -	 --disable-athena-check \
    1.17 -	 --mandir=/usr/share/man $CONFIGURE_ARGS && 
    1.18 -	 
    1.19 +
    1.20 +	./configure \
    1.21 +		--prefix=/usr \
    1.22 +		--cache-file=$PWD/config.cache \
    1.23 +		--infodir=/usr/share/info \
    1.24 +		--with-features=normal \
    1.25 +		--with-x=yes \
    1.26 +		--enable-gui=gtk2 \
    1.27 +		--enable-multibyte \
    1.28 +		--disable-motif-check \
    1.29 +		--disable-athena-check \
    1.30 +		--mandir=/usr/share/man \
    1.31 +		$CONFIGURE_ARGS &&
    1.32 +
    1.33  	make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" &&
    1.34  	make DESTDIR=$DESTDIR install
    1.35  	mkdir -p $DESTDIR/etc/vim
    1.36 @@ -47,41 +49,40 @@
    1.37  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.38  genpkg_rules()
    1.39  {
    1.40 -	mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications $fs/etc
    1.41 +	mkdir -p $fs/usr/share/icons/hicolor/16x16/apps $fs/usr/share/applications $fs/etc
    1.42  
    1.43  	cp -a $install/usr/bin $fs/usr
    1.44  	cp -a $install/usr/share/vim $fs/usr/share
    1.45 -	cp -a $src/runtime/vim16x16.png $fs/usr/share/pixmaps/gvim.png
    1.46 +	cp -a $src/runtime/vim16x16.png $fs/usr/share/icons/hicolor/16x16/apps/gvim.png
    1.47  	cp -a stuff/gvim.desktop $fs/usr/share/applications
    1.48  	cp -a $install/etc/vim $fs/etc
    1.49  }
    1.50  
    1.51  post_install()
    1.52  {
    1.53 -    local root
    1.54 -    root=$1
    1.55 -    echo "Processing post-install commands..."
    1.56 -    cmd=`readlink $root/bin/vi`
    1.57 -    if [ ! "$cmd" = "/usr/bin/vim" ]; then
    1.58 -        echo ""
    1.59 -        echo "**** Actual VI link : $cmd"
    1.60 -        echo ""
    1.61 -        echo -n "Do you want vim  for /bin/vi (y/N) ? : "; read -t 30 anser
    1.62 -        if [ "$anser" == "y" ]; then
    1.63 -            echo ""
    1.64 -            echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
    1.65 -            rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
    1.66 -            status
    1.67 -        else
    1.68 -            echo ""
    1.69 -            echo "Leaving /bin/vi to : $cmd"
    1.70 -        fi
    1.71 -    fi
    1.72 +	local root
    1.73 +	root=$1
    1.74 +
    1.75 +	cmd=$(readlink $root/bin/vi)
    1.76 +	if [ ! "$cmd" == '/usr/bin/vim' ]; then
    1.77 +		echo ""
    1.78 +		echo "**** Actual VI link : $cmd"
    1.79 +		echo ""
    1.80 +		echo -n "Do you want vim  for /bin/vi (y/N) ? : "; read -t 30 answer
    1.81 +		if [ "$answer" == 'y' ]; then
    1.82 +			echo ""
    1.83 +			echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..."
    1.84 +			rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi
    1.85 +			status
    1.86 +		else
    1.87 +			echo ""
    1.88 +			echo "Leaving /bin/vi to : $cmd"
    1.89 +		fi
    1.90 +	fi
    1.91  }
    1.92  
    1.93  post_remove()
    1.94  {
    1.95 -        # restore previous symlink
    1.96 -        echo "Processing post-remove commands..."
    1.97 -        ln -sf /bin/busybox $1/bin/vi
    1.98 +	# restore previous symlink
    1.99 +	ln -sf busybox $1/bin/vi
   1.100  }
     2.1 --- a/gvim/stuff/gvim.desktop	Thu Aug 20 14:45:02 2015 +0200
     2.2 +++ b/gvim/stuff/gvim.desktop	Fri Aug 21 13:26:05 2015 +0300
     2.3 @@ -1,12 +1,12 @@
     2.4  [Desktop Entry]
     2.5 -Encoding=UTF-8
     2.6 +Type=Application
     2.7  Name=Vim Text editor
     2.8  Name[fr]=Editeur de texte Vim
     2.9  Name[pt]=Editor de textos Vim
    2.10  Name[pt_BR]=Editor de textos Vim
    2.11 +Name[ru]=Текстовый редактор Vim
    2.12  Exec=gvim %f
    2.13  Icon=gvim
    2.14  Terminal=false
    2.15 -Type=Application
    2.16  MimeType=text/plain
    2.17  Categories=GTK;Utility;TextEditor;