Created a (hopefully) sane way to install desktop data.
authorFredrik Tolf <fredrik@dolda2000.com>
Sat, 13 Oct 2007 21:50:10 +0000 (23:50 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Sat, 13 Oct 2007 21:50:10 +0000 (23:50 +0200)
Makefile.am
clients/Makefile.am
clients/gtk2/Makefile.am
clients/gui-shell/Makefile.am
configure.in
share/Makefile.am [new file with mode: 0644]
share/dolcon-gtk.desktop [moved from clients/gtk2/dolcon.desktop with 84% similarity]
share/dolcon-shell.desktop [moved from clients/gui-shell/dolcon.desktop with 85% similarity]
share/dolcon.png [new file with mode: 0644]
share/hellodolda.png [moved from clients/hellodolda.png with 100% similarity]

index 33f89f9..ed048ee 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS= common daemon include lib clients config po autopackage doc contrib
+SUBDIRS= common daemon include lib clients config po autopackage doc contrib share
 
 ACLOCAL_AMFLAGS = -I m4
 
index 749421f..81b53bd 100644 (file)
@@ -1,8 +1,5 @@
 SUBDIRS=gtk2 tty gnome-trans-applet gaim gui-shell
-EXTRA_DIST=hellodolda.png dolda-icon.xpm
-
-iconsdir = $(datadir)/pixmaps
-icons_DATA = hellodolda.png
+EXTRA_DIST=dolda-icon.xpm
 
 noinst_PROGRAMS=test
 
index 13561ad..298ec86 100644 (file)
@@ -1,8 +1,5 @@
 if CLI_GTK2
 bin_PROGRAMS=dolcon
-if !GUISHELL
-app_DATA=dolcon.desktop
-endif
 endif
 
 dolcon_SOURCES=        dolcon.c \
@@ -14,7 +11,7 @@ dolcon_SOURCES=       dolcon.c \
                progressbar.c \
                progressbar.h
 
-EXTRA_DIST=mainwnd.desc inpdialog.desc pref.desc reslist.desc dolcon.desktop
+EXTRA_DIST=mainwnd.desc inpdialog.desc pref.desc reslist.desc
 
 BUILT_SOURCES= mainwnd.gtk inpdialog.gtk pref.gtk reslist.gtk
 
@@ -33,5 +30,3 @@ dolcon_CPPFLAGS=@GTK2_CFLAGS@ @LIBXML_CFLAGS@ \
         | $(top_srcdir)/common/makegdesc -h "$${basename}.gtkh" >$@
 
 mainwnd.desc: ../../config.h
-
-appdir=$(datadir)/applications
index 43e6afc..4400398 100644 (file)
@@ -1,13 +1,12 @@
 if GUISHELL
 bin_PROGRAMS=dolcon-launch doldacond-shell
-app_DATA=dolcon.desktop
 endif
 
 dolcon_launch_SOURCES=launch.c
 
 doldacond_shell_SOURCES=dsh.c
 
-EXTRA_DIST=dsh-start.desc dsh-menu.desc dolcon.desktop
+EXTRA_DIST=dsh-start.desc dsh-menu.desc
 BUILT_SOURCES=dsh-start.gtk dsh-menu.gtk
 
 dsh.c: dsh-start.gtk dsh-menu.gtk
@@ -24,5 +23,3 @@ doldacond_shell_CPPFLAGS=@GTK2_CFLAGS@ @LIBNOTIFY_CFLAGS@ \
        basename="$${target%.gtk}"; \
        cpp $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $< \
         | $(top_srcdir)/common/makegdesc -h "$${basename}.gtkh" >$@
-
-appdir=$(datadir)/applications
index d93efa0..daf5d05 100644 (file)
@@ -279,6 +279,7 @@ config/Makefile
 config/cmd/Makefile
 config/util/Makefile
 contrib/Makefile
+share/Makefile
 autopackage/doldacond.apspec
 autopackage/dolcon.apspec
 autopackage/dcuilib.apspec
diff --git a/share/Makefile.am b/share/Makefile.am
new file mode 100644 (file)
index 0000000..90dbd7a
--- /dev/null
@@ -0,0 +1,24 @@
+appdir=$(datadir)/applications
+iconsdir=$(datadir)/icons/hicolor/48x48/apps
+
+icons_DATA=
+
+if GUISHELL
+realdesktop=dolcon-shell.desktop
+icons_DATA+=dolcon.png
+else
+if CLI_GTK2
+realdesktop=dolcon-gtk.desktop
+icons_DATA+=dolcon.png
+else
+realdesktop=none
+endif
+endif
+
+EXTRA_DIST=hellodolda.png dolda-icon.png dolcon-gtk.desktop dolcon-shell.desktop
+
+install-data-local:
+       if [ "$$realdesktop" != none ]; then \
+               $(mkinstalldirs) $(DESTDIR)$(appdir); \
+               $(INSTALL_DATA) $(srcdir)/$(realdesktop) $(DESTDIR)$(appdir)/dolcon.desktop; \
+       fi
similarity index 84%
rename from clients/gtk2/dolcon.desktop
rename to share/dolcon-gtk.desktop
index 9aaabf0..c751c99 100644 (file)
@@ -3,6 +3,6 @@ Encoding=UTF-8
 Categories=Network
 Type=Application
 Terminal=false
-Icon=hellodolda.png
+Icon=dolcon
 Exec=dolcon
 Name=Dolda Connect
similarity index 85%
rename from clients/gui-shell/dolcon.desktop
rename to share/dolcon-shell.desktop
index 4aa168f..ccec04a 100644 (file)
@@ -3,6 +3,6 @@ Encoding=UTF-8
 Categories=Network
 Type=Application
 Terminal=false
-Icon=hellodolda.png
+Icon=dolcon
 Exec=dolcon-launch
 Name=Dolda Connect
diff --git a/share/dolcon.png b/share/dolcon.png
new file mode 100644 (file)
index 0000000..34edd91
Binary files /dev/null and b/share/dolcon.png differ
similarity index 100%
rename from clients/hellodolda.png
rename to share/hellodolda.png