Re: .desktop files and Makefile.am



On Fri, Jul 27, 2007 at 02:01:23PM +0100, jcupitt gmail com wrote:
On 7/27/07, Dani <daniel suruware com> wrote:
I'm changing the main Makefile.am and putting the .desktop in the main
project folder.. but without success :(

I have something like:

install-exec-hook:
        $(mkinstalldirs) ${DESTDIR}$(datadir)/applications
        -cp poop.desktop ${DESTDIR}$(datadir)/applications

Though there's probably a better (always seem to be true with auto*).

Yes, manual cp is almost never necessary (also mkinstalldirs
is a bit obsolete now, use mkdir_p).

To create an install/uninstall rule couple, just add

fooappdir = $(datadir)/applications
fooapp_DATA = foo.desktop

You can also add something like

install-data-hook:
        $(UPDATE_DESKTOP_DATABASE) $(DESTDIR)$(datadir)/applications
        $(UPDATE_MIME_DATABASE) $(DESTDIR)$(datadir)/mime

uninstall-hook:
        $(UPDATE_DESKTOP_DATABASE) $(DESTDIR)$(datadir)/applications
        $(UPDATE_MIME_DATABASE) $(DESTDIR)$(datadir)/mime

but this should be inside an automake conditional -- first,
desktop-file-utils might be unavailable so they need
a configure check, second, this is counterproductive when
building a distro package and installling into a staging
area.

None of this is actually related to Gtk+...

Yeti

--
http://gwyddion.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]