blob: f1f5ed1a9f24a8da4704af22b119cfc2a29de159 [file] [log] [blame]
Brad Bishop00e122a2019-10-05 11:10:57 -04001Upstream-Status: Backport [https://github.com/distcc/distcc/pull/319]
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From 2faacc2be8d7eeee0a3f66d88fedd1d3ab11070e Mon Sep 17 00:00:00 2001
5From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
6Date: Sat, 8 Dec 2018 12:50:07 +0100
7Subject: [PATCH] Fix desktop spec compliance of distccmon-gnome install
8
9Update the .desktop file and install rules for distccmon-gnome to
10conform to the freedesktop.org specifications. More specifically:
11
12- update to version 1.0 of the spec
13- remove obsolete 'Encoding' key
14- remove obsolete 'Application' category and add recommended 'GTK'
15- install icon file to the correct directory
16- strip suffix from desktop file (specifying it is deprecated)
17- while at it, remove redundant '-icon' from the filename
18- install desktop file to the correct directory
19---
20 Makefile.in | 18 ++++++++++--------
21 gnome/distccmon-gnome.desktop | 7 +++----
22 ...mon-gnome-icon.png => distccmon-gnome.png} | Bin
23 src/mon-gnome.c | 2 +-
24 4 files changed, 14 insertions(+), 13 deletions(-)
25 rename gnome/{distccmon-gnome-icon.png => distccmon-gnome.png} (100%)
26
27diff --git a/Makefile.in b/Makefile.in
28index 6e1e467..1106559 100644
29--- a/Makefile.in
30+++ b/Makefile.in
31@@ -52,13 +52,14 @@ mandir = @mandir@
32 includedir = @includedir@
33 oldincludedir = /usr/include
34 docdir = @docdir@
35-pkgdatadir = $(datadir)/@PACKAGE_NAME@
36+icondir = $(datarootdir)/pixmaps
37+desktopdir = $(datarootdir)/applications
38
39 include_server_builddir = $(builddir)/_include_server
40
41 # These must be done from here, not from autoconf, because they can
42 # contain variable expansions written in Make syntax. Ew.
43-DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DPKGDATADIR="\"${pkgdatadir}\""
44+DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DICONDIR="\"${icondir}\""
45
46 # arguments to pkgconfig
47 GNOME_PACKAGES = @GNOME_PACKAGES@
48@@ -387,7 +388,7 @@ man_HTML = man/distcc_1.html man/distccd_1.html man/distccmon_text_1.html \
49 man/lsdistcc_1.html man/pump_1.html man/include_server_1.html
50 MEN = $(man1_MEN)
51
52-gnome_data = gnome/distccmon-gnome-icon.png \
53+gnome_data = gnome/distccmon-gnome.png \
54 gnome/distccmon-gnome.desktop
55
56 popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
57@@ -1033,7 +1034,8 @@ showpaths:
58 @echo " programs $(DESTDIR)$(bindir)"
59 @echo " sbin programs $(DESTDIR)$(sbindir)"
60 @echo " system configuration $(DESTDIR)$(sysconfdir)"
61- @echo " shared data files $(DESTDIR)$(pkgdatadir)"
62+ @echo " icon file $(DESTDIR)$(icondir)"
63+ @echo " application file $(DESTDIR)$(desktopdir)"
64
65
66 # install-sh can't handle multiple arguments, but we don't need any
67@@ -1129,10 +1131,10 @@ install-example: $(example_DOCS)
68 done
69
70 install-gnome-data: $(gnome_data)
71- $(mkinstalldirs) "$(DESTDIR)$(pkgdatadir)"
72- for p in $(gnome_data); do \
73- $(INSTALL_DATA) "$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \
74- done
75+ $(mkinstalldirs) "$(DESTDIR)$(icondir)"
76+ $(mkinstalldirs) "$(DESTDIR)$(desktopdir)"
77+ $(INSTALL_DATA) gnome/distccmon-gnome.png "$(DESTDIR)$(icondir)"
78+ $(INSTALL_DATA) gnome/distccmon-gnome.desktop "$(DESTDIR)$(desktopdir)"
79
80 install-conf: $(conf_files) $(default_files)
81 $(mkinstalldirs) "$(DESTDIR)$(sysconfdir)/distcc"
82diff --git a/gnome/distccmon-gnome.desktop b/gnome/distccmon-gnome.desktop
83index bd1fa26..7205f5e 100644
84--- a/gnome/distccmon-gnome.desktop
85+++ b/gnome/distccmon-gnome.desktop
86@@ -1,6 +1,5 @@
87 [Desktop Entry]
88-Version=0.9.4
89-Encoding=UTF-8
90+Version=1.0
91 Exec=distccmon-gnome
92 Name=distcc monitor
93 Name[sv]=distcc övervakare
94@@ -8,9 +7,9 @@ GenericName=Distributed Compile Monitor
95 GenericName[sv]=Distribuerad kompileringsvervakare
96 Comment=Graphical view of distributed compile tasks
97 Comment[sv]=Grafisk vy av distribuerade kompileringsuppgifter
98-Icon=distccmon-gnome-icon.png
99+Icon=distccmon-gnome
100 TryExec=distccmon-gnome
101 Terminal=false
102 Type=Application
103-Categories=GNOME;Application;Development;
104+Categories=GNOME;GTK;Development;
105 StartupNotify=true
106diff --git a/gnome/distccmon-gnome-icon.png b/gnome/distccmon-gnome.png
107similarity index 100%
108rename from gnome/distccmon-gnome-icon.png
109rename to gnome/distccmon-gnome.png
110diff --git a/src/mon-gnome.c b/src/mon-gnome.c
111index 24681d0..bfc286d 100644
112--- a/src/mon-gnome.c
113+++ b/src/mon-gnome.c
114@@ -599,7 +599,7 @@ static GtkWidget * dcc_gnome_make_mainwin (void)
115
116 #if GTK_CHECK_VERSION(2,2,0)
117 gtk_window_set_icon_from_file (GTK_WINDOW (mainwin),
118- PKGDATADIR "/distccmon-gnome-icon.png",
119+ ICONDIR "/distccmon-gnome.png",
120 NULL);
121 #endif
122