# HG changeset patch # User Aleksej Bobylev # Date 1440152765 -10800 # Node ID 6c09056154b2d5b77c37309eda184e404b8a0a6f # Parent 9f653491537e852fbec38d671eed8541b123bd56 gvim: move icon, upgrade .desktop file diff -r 9f653491537e -r 6c09056154b2 gvim/receipt --- a/gvim/receipt Thu Aug 20 14:45:02 2015 +0200 +++ b/gvim/receipt Fri Aug 21 13:26:05 2015 +0300 @@ -26,18 +26,20 @@ sed -i 's|^.*\(#define SYS_VIMRC_FILE\).*$|\1 "/etc/vim/vimrc"|' $src/src/feature.h # and global gvimrc file (set to /etc/vim/gvimrc) sed -i 's|^.*\(#define SYS_GVIMRC_FILE\).*$|\1 "/etc/vim/gvimrc"|' $src/src/feature.h - - ./configure --prefix=/usr \ - --cache-file=$PWD/config.cache \ - --infodir=/usr/share/info \ - --with-features=normal \ - --with-x=yes \ - --enable-gui=gtk2 \ - --enable-multibyte \ - --disable-motif-check \ - --disable-athena-check \ - --mandir=/usr/share/man $CONFIGURE_ARGS && - + + ./configure \ + --prefix=/usr \ + --cache-file=$PWD/config.cache \ + --infodir=/usr/share/info \ + --with-features=normal \ + --with-x=yes \ + --enable-gui=gtk2 \ + --enable-multibyte \ + --disable-motif-check \ + --disable-athena-check \ + --mandir=/usr/share/man \ + $CONFIGURE_ARGS && + make VIMRCLOC=/etc/vim VIMRUNTIMEDIR=/usr/share/vim/vim73 MAKE="make -e" && make DESTDIR=$DESTDIR install mkdir -p $DESTDIR/etc/vim @@ -47,41 +49,40 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications $fs/etc + mkdir -p $fs/usr/share/icons/hicolor/16x16/apps $fs/usr/share/applications $fs/etc cp -a $install/usr/bin $fs/usr cp -a $install/usr/share/vim $fs/usr/share - cp -a $src/runtime/vim16x16.png $fs/usr/share/pixmaps/gvim.png + cp -a $src/runtime/vim16x16.png $fs/usr/share/icons/hicolor/16x16/apps/gvim.png cp -a stuff/gvim.desktop $fs/usr/share/applications cp -a $install/etc/vim $fs/etc } post_install() { - local root - root=$1 - echo "Processing post-install commands..." - cmd=`readlink $root/bin/vi` - if [ ! "$cmd" = "/usr/bin/vim" ]; then - echo "" - echo "**** Actual VI link : $cmd" - echo "" - echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 anser - if [ "$anser" == "y" ]; then - echo "" - echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..." - rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi - status - else - echo "" - echo "Leaving /bin/vi to : $cmd" - fi - fi + local root + root=$1 + + cmd=$(readlink $root/bin/vi) + if [ ! "$cmd" == '/usr/bin/vim' ]; then + echo "" + echo "**** Actual VI link : $cmd" + echo "" + echo -n "Do you want vim for /bin/vi (y/N) ? : "; read -t 30 answer + if [ "$answer" == 'y' ]; then + echo "" + echo -n "Removing vi link to make a new one pointing on /usr/bin/vim..." + rm $root/bin/vi && ln -sf $root/usr/bin/vim $root/bin/vi + status + else + echo "" + echo "Leaving /bin/vi to : $cmd" + fi + fi } post_remove() { - # restore previous symlink - echo "Processing post-remove commands..." - ln -sf /bin/busybox $1/bin/vi + # restore previous symlink + ln -sf busybox $1/bin/vi } diff -r 9f653491537e -r 6c09056154b2 gvim/stuff/gvim.desktop --- a/gvim/stuff/gvim.desktop Thu Aug 20 14:45:02 2015 +0200 +++ b/gvim/stuff/gvim.desktop Fri Aug 21 13:26:05 2015 +0300 @@ -1,12 +1,12 @@ [Desktop Entry] -Encoding=UTF-8 +Type=Application Name=Vim Text editor Name[fr]=Editeur de texte Vim Name[pt]=Editor de textos Vim Name[pt_BR]=Editor de textos Vim +Name[ru]=Текстовый редактор Vim Exec=gvim %f Icon=gvim Terminal=false -Type=Application MimeType=text/plain Categories=GTK;Utility;TextEditor;