From: Fredrik Tolf Date: Sat, 13 Oct 2007 21:50:10 +0000 (+0200) Subject: Created a (hopefully) sane way to install desktop data. X-Git-Tag: 1.0~20 X-Git-Url: http://git.dolda2000.com/gitweb/?p=doldaconnect.git;a=commitdiff_plain;h=444e8c2819bc52a48804c125829f187177af02b4 Created a (hopefully) sane way to install desktop data. --- diff --git a/Makefile.am b/Makefile.am index 33f89f9..ed048ee 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/clients/Makefile.am b/clients/Makefile.am index 749421f..81b53bd 100644 --- a/clients/Makefile.am +++ b/clients/Makefile.am @@ -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 diff --git a/clients/gtk2/Makefile.am b/clients/gtk2/Makefile.am index 13561ad..298ec86 100644 --- a/clients/gtk2/Makefile.am +++ b/clients/gtk2/Makefile.am @@ -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 diff --git a/clients/gui-shell/Makefile.am b/clients/gui-shell/Makefile.am index 43e6afc..4400398 100644 --- a/clients/gui-shell/Makefile.am +++ b/clients/gui-shell/Makefile.am @@ -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 diff --git a/configure.in b/configure.in index d93efa0..daf5d05 100644 --- a/configure.in +++ b/configure.in @@ -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 index 0000000..90dbd7a --- /dev/null +++ b/share/Makefile.am @@ -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 diff --git a/clients/gtk2/dolcon.desktop b/share/dolcon-gtk.desktop similarity index 84% rename from clients/gtk2/dolcon.desktop rename to share/dolcon-gtk.desktop index 9aaabf0..c751c99 100644 --- a/clients/gtk2/dolcon.desktop +++ b/share/dolcon-gtk.desktop @@ -3,6 +3,6 @@ Encoding=UTF-8 Categories=Network Type=Application Terminal=false -Icon=hellodolda.png +Icon=dolcon Exec=dolcon Name=Dolda Connect diff --git a/clients/gui-shell/dolcon.desktop b/share/dolcon-shell.desktop similarity index 85% rename from clients/gui-shell/dolcon.desktop rename to share/dolcon-shell.desktop index 4aa168f..ccec04a 100644 --- a/clients/gui-shell/dolcon.desktop +++ b/share/dolcon-shell.desktop @@ -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 index 0000000..34edd91 Binary files /dev/null and b/share/dolcon.png differ diff --git a/clients/hellodolda.png b/share/hellodolda.png similarity index 100% rename from clients/hellodolda.png rename to share/hellodolda.png