[arch-commits] Commit in grsync/trunk (3 files)
Balló György
bgyorgy at archlinux.org
Sun Dec 30 11:04:56 UTC 2018
Date: Sunday, December 30, 2018 @ 11:04:56
Author: bgyorgy
Revision: 419088
upgpkg: grsync 1.2.6-4
Add AppStream metadata, use themed icon
Added:
grsync/trunk/grsync.appdata.xml
grsync/trunk/use-themed-icon.patch
Modified:
grsync/trunk/PKGBUILD
-----------------------+
PKGBUILD | 16 +++++++-
grsync.appdata.xml | 19 ++++++++++
use-themed-icon.patch | 88 ++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 120 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-12-30 11:04:43 UTC (rev 419087)
+++ PKGBUILD 2018-12-30 11:04:56 UTC (rev 419088)
@@ -4,7 +4,7 @@
pkgname=grsync
pkgver=1.2.6
-pkgrel=3
+pkgrel=4
pkgdesc="GTK+ GUI for rsync to synchronize folders, files and make backups"
arch=('x86_64')
url="http://www.opbyte.it/grsync/"
@@ -12,14 +12,23 @@
depends=('gtk3' 'rsync')
makedepends=('intltool')
source=(http://www.opbyte.it/release/$pkgname-$pkgver.tar.gz
- gtk3-port.patch)
+ grsync.appdata.xml
+ gtk3-port.patch
+ use-themed-icon.patch)
sha256sums=('66d5acea5e6767d6ed2082e1c6e250fe809cb1e797cbbee5c8e8a2d28a895619'
- '96d8911ee969b943ae0c69896d3d95271e9a794bfd8c8ce865282cd0c13011eb')
+ '5dee994cafbcf8adfda34767cbd60f7eb2039bdeccab2dfd879f045bd11fb9fd'
+ '96d8911ee969b943ae0c69896d3d95271e9a794bfd8c8ce865282cd0c13011eb'
+ '490108a9b65750162786f9aa230668736502477ce260ad1948f9d0124d5fb207')
prepare() {
cd $pkgname-$pkgver
+
# Port to GTK+ 3
patch -Np1 -i ../gtk3-port.patch
+
+ # Use themed icon
+ patch -Np1 -i ../use-themed-icon.patch
+
autoreconf -fi
}
@@ -32,4 +41,5 @@
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
+ install -Dm644 ../$pkgname.appdata.xml "$pkgdir/usr/share/metainfo/$pkgname.appdata.xml"
}
Added: grsync.appdata.xml
===================================================================
--- grsync.appdata.xml (rev 0)
+++ grsync.appdata.xml 2018-12-30 11:04:56 UTC (rev 419088)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop-application">
+ <id>it.opbyte.grsync</id>
+ <launchable type="desktop-id">grsync.desktop</launchable>
+ <name>Grsync</name>
+ <summary>Synchronize files and folders (a GTK GUI for rsync)</summary>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>GPL-2.0</project_license>
+ <description>
+ <p>Grsync is a rsync GUI (Graphical User Interface). Rsync is the well-known and powerful command line directory and file synchronization tool. It can be effectively used to synchronize local directories and it supports remote targets as well (even though it doesn't support browsing the remote folder). Sample uses of grsync include: synchronize a music collection with removable devices, backup personal files to a networked drive, replication of a partition to another one, mirroring of files, etc.</p>
+ </description>
+ <screenshots>
+ <screenshot type="default">
+ <image>http://www.opbyte.it/grsync/grsync-1.0.0.png</image>
+ </screenshot>
+ </screenshots>
+ <url type="bugtracker">https://sourceforge.net/p/grsync/bugs/</url>
+ <url type="homepage">http://www.opbyte.it/grsync/</url>
+</component>
Added: use-themed-icon.patch
===================================================================
--- use-themed-icon.patch (rev 0)
+++ use-themed-icon.patch 2018-12-30 11:04:56 UTC (rev 419088)
@@ -0,0 +1,88 @@
+diff -Naur grsync-1.2.6.orig/configure.in grsync-1.2.6/configure.in
+--- grsync-1.2.6.orig/configure.in 2016-03-15 14:08:19.000000000 +0100
++++ grsync-1.2.6/configure.in 2018-12-30 11:36:44.314049975 +0100
+@@ -48,7 +48,7 @@
+ GTK_API_VERSION="2.0"
+ fi
+ pkg_modules="gtk+-$GTK_API_VERSION >= 2.16.0"
+- OTHER_DESKTOP_ENTRIES="Icon=grsync.png"
++ OTHER_DESKTOP_ENTRIES="Icon=grsync"
+ MIMEINFO_XMLNS="xmlns='http://www.freedesktop.org/standards/shared-mime-info'"
+ MIME_OSSOCAT=""
+ )
+diff -Naur grsync-1.2.6.orig/Makefile.am grsync-1.2.6/Makefile.am
+--- grsync-1.2.6.orig/Makefile.am 2013-04-30 13:48:54.000000000 +0200
++++ grsync-1.2.6/Makefile.am 2018-12-30 11:37:36.995541833 +0100
+@@ -61,10 +61,10 @@
+ mimepackagesdir = $(mimedir)/packages
+ dist_mimepackages_DATA = grsync.xml
+
+-pixmapdir = $(datadir)/pixmaps
++pixmapdir = $(datadir)/icons/hicolor/128x128/apps
+ pixmap_DATA = pixmaps/grsync.png
+
+-pixmapbusydir = $(datadir)/pixmaps
++pixmapbusydir = $(datadir)/icons/hicolor/128x128/apps
+ pixmapbusy_DATA = pixmaps/grsync-busy.png
+
+ mimeicondir = $(datadir)/icons/hicolor/48x48/mimetypes/
+diff -Naur grsync-1.2.6.orig/src/callbacks.c grsync-1.2.6/src/callbacks.c
+--- grsync-1.2.6.orig/src/callbacks.c 2015-12-23 16:38:40.000000000 +0100
++++ grsync-1.2.6/src/callbacks.c 2018-12-30 11:41:43.179172285 +0100
+@@ -57,7 +57,7 @@
+ void set_trayicon(gboolean flag) {
+ if (flag) {
+ if (trayIcon == NULL) {
+- trayIcon = gtk_status_icon_new_from_file(icon);
++ trayIcon = gtk_status_icon_new_from_icon_name(ICON);
+ g_signal_connect(GTK_STATUS_ICON(trayIcon), "activate", G_CALLBACK(on_trayicon_activate), main_window);
+ }
+ } else {
+@@ -71,7 +71,7 @@
+
+
+ void set_trayicon_icon(gboolean busy) {
+- if (trayIcon != NULL) gtk_status_icon_set_from_file(trayIcon, busy ? icon_busy : icon);
++ if (trayIcon != NULL) gtk_status_icon_set_from_icon_name(trayIcon, busy ? ICON_BUSY : ICON);
+ }
+
+ gboolean get_checkbox(gchar* name) {
+@@ -1341,7 +1341,7 @@
+
+ gtk_show_about_dialog((GtkWindow*) main_window, "name", PACKAGE, "version", VERSION, "comments", _("Synchronize files and folders (a GTK GUI for rsync)."),
+ "copyright", _("(C) Piero Orsoni and others. Released under the GPL.\nSee COPYING for details"),
+- "website", "http://www.opbyte.it/grsync/", "artists", artists, "authors", authors, NULL);
++ "website", "http://www.opbyte.it/grsync/", "artists", artists, "authors", authors, "logo-icon-name", ICON, NULL);
+ }
+
+
+diff -Naur grsync-1.2.6.orig/src/callbacks.h grsync-1.2.6/src/callbacks.h
+--- grsync-1.2.6.orig/src/callbacks.h 2013-04-30 13:48:54.000000000 +0200
++++ grsync-1.2.6/src/callbacks.h 2018-12-30 11:41:13.194991363 +0100
+@@ -2,10 +2,8 @@
+ #define MAXOPT 100
+ #define CONFIG_GROUP "__CONFIG"
+
+-#define ICON_SOURCE "pixmaps/grsync.png"
+-#define ICON_SOURCE_BUSY "pixmaps/grsync-busy.png"
+-#define ICON_PACKAGE PACKAGE_DATA_DIR "/" ICON_SOURCE
+-#define ICON_PACKAGE_BUSY PACKAGE_DATA_DIR "/" ICON_SOURCE_BUSY
++#define ICON "grsync"
++#define ICON_BUSY "grsync-busy"
+
+ GtkBuilder *builder;
+ GtkWidget *main_window;
+diff -Naur grsync-1.2.6.orig/src/main.c grsync-1.2.6/src/main.c
+--- grsync-1.2.6.orig/src/main.c 2013-04-30 13:48:54.000000000 +0200
++++ grsync-1.2.6/src/main.c 2018-12-30 11:41:45.745911502 +0100
+@@ -68,9 +68,7 @@
+ cmdline_import = FALSE;
+ }
+
+- icon = g_file_test(ICON_SOURCE, G_FILE_TEST_EXISTS) ? ICON_SOURCE : ICON_PACKAGE;
+- icon_busy = g_file_test(ICON_SOURCE_BUSY, G_FILE_TEST_EXISTS) ? ICON_SOURCE_BUSY : ICON_PACKAGE_BUSY;
+- gtk_window_set_default_icon_from_file(icon, NULL);
++ gtk_window_set_default_icon_name(ICON);
+
+ builder = gtk_builder_new();
+ result = gtk_builder_add_from_file(builder, XMLFILE, &gerror) || gtk_builder_add_from_file(builder, PACKAGE_DATA_DIR "/" PACKAGE "/" XMLFILE, NULL);
More information about the arch-commits
mailing list