File desktop_icon.patch of Package gprename

--- Makefile.orig	2014-03-25 00:06:04.000000000 +0300
+++ Makefile	2014-03-26 18:24:02.435966200 +0300
@@ -26,7 +26,7 @@
 	perl -ne 's!\@INSTALLDIR\@!$(PREFIX)!g ; print' < bin/gprename > build/gprename
 	perl -ne 's!\@INSTALLDIR\@!$(PREFIX)!g ; print' < bin/gprename.desktop > build/gprename.desktop
 
-install: uninstall build
+install: build
 	# Compile all .po files to .mo
 	msgfmt -o build/locale/ca.mo	locale/ca.po
 	msgfmt -o build/locale/de.mo	locale/de.po
@@ -45,8 +45,8 @@
 	# Create directories
 	install -d "$(DESTDIR)"
 	install -d "$(DESTDIR)/bin"
-	install -d "/usr/share"
-	install -d "/usr/share/icons"
+	install -d "$(DESTDIR)/share"
+	install -d "$(DESTDIR)/share/pixmaps"
 	install -d "$(DESTDIR)/share/applications"
 	install -d "$(DESTDIR)/share/man"
 	install -d "$(DESTDIR)/share/man/man1"
@@ -67,7 +67,7 @@
 	# Copy all files in the filesystem
 	install -m 755 build/gprename                "$(DESTDIR)/bin/"
 	install -m 644 gprename-nautilus-actions.xml "$(DESTDIR)/share/applications/"
-	install -m 644 icon/gprename.png             "/usr/share/icons/"
+	install -m 644 icon/gprename.png             "$(DESTDIR)/share/pixmaps/"
 	install -m 644 man/gprename.1                "$(DESTDIR)/share/man/man1/"
 	install -m 644 build/locale/ca.mo            "$(DESTDIR)/share/locale/ca/LC_MESSAGES/gprename.mo"
 	install -m 644 build/locale/de.mo            "$(DESTDIR)/share/locale/de/LC_MESSAGES/gprename.mo"
@@ -82,8 +82,7 @@
 	install -m 644 build/locale/ru.mo            "$(DESTDIR)/share/locale/ru/LC_MESSAGES/gprename.mo"
 	install -m 644 build/locale/sv.mo            "$(DESTDIR)/share/locale/sv/LC_MESSAGES/gprename.mo"
 	install -m 644 build/locale/zh_CN.mo         "$(DESTDIR)/share/locale/zh_CN/LC_MESSAGES/gprename.mo"
-	desktop-file-install bin/gprename.desktop
-	update-desktop-database
+	desktop-file-install bin/gprename.desktop --dir="$(DESTDIR)/share/applications/"
 	@echo "Installation completed."
 
 uninstall: clean
--- bin/gprename.orig	2014-03-26 01:47:15.000000000 +0300
+++ bin/gprename	2014-03-26 18:37:12.156966200 +0300
@@ -61,7 +61,7 @@
 
 # set the locale
 setlocale(LC_ALL, '');
-bindtextdomain( 'gprename', '/usr/local/share/locale');
+bindtextdomain( 'gprename', '/usr/share/locale');
 textdomain( 'gprename' );
 
 # Change the font to courier new for the Tree and the SimpleList
@@ -127,7 +127,7 @@
 $window->add_accel_group( $accel_group );
 
 # Set the window icon
-my $icon = '/usr/share/icons/gprename.png';
+my $icon = '/usr/share/pixmaps/gprename.png';
 my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file( $icon );
 $window->set_icon( $pixbuf );
 
@@ -1440,7 +1440,7 @@
    $buffer->create_tag( 'big', size => 15 * PANGO_SCALE );
    $buffer->create_tag( 'italic', style => 'italic' );
    my $iter = $buffer->get_start_iter;
-   my $icon = '/usr/local/share/pixmaps/gprename/gprename.png';
+   my $icon = '/usr/share/pixmaps/gprename.png';
    my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file( $icon );
 
    $buffer->insert_pixbuf ($iter,  $pixbuf);

--- build/gprename.orig	2014-03-26 01:47:15.000000000 +0300
+++ build/gprename	2014-03-26 18:37:12.156966200 +0300
@@ -61,7 +61,7 @@
 
 # set the locale
 setlocale(LC_ALL, '');
-bindtextdomain( 'gprename', '/usr/local/share/locale');
+bindtextdomain( 'gprename', '/usr/share/locale');
 textdomain( 'gprename' );
 
 # Change the font to courier new for the Tree and the SimpleList
@@ -127,7 +127,7 @@
 $window->add_accel_group( $accel_group );
 
 # Set the window icon
-my $icon = '/usr/share/icons/gprename.png';
+my $icon = '/usr/share/pixmaps/gprename.png';
 my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file( $icon );
 $window->set_icon( $pixbuf );
 
@@ -1440,7 +1440,7 @@
    $buffer->create_tag( 'big', size => 15 * PANGO_SCALE );
    $buffer->create_tag( 'italic', style => 'italic' );
    my $iter = $buffer->get_start_iter;
-   my $icon = '/usr/local/share/pixmaps/gprename/gprename.png';
+   my $icon = '/usr/share/pixmaps/gprename.png';
    my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file( $icon );
 
    $buffer->insert_pixbuf ($iter,  $pixbuf);
openSUSE Build Service is sponsored by