]> err.no Git - mapper/commitdiff
Handle schema and icon cache
authorKaj-Michael Lang <milang@onion.tal.org>
Wed, 16 Jan 2008 11:54:47 +0000 (13:54 +0200)
committerKaj-Michael Lang <milang@onion.tal.org>
Wed, 16 Jan 2008 11:54:47 +0000 (13:54 +0200)
data/Makefile.am

index 56b2a7ee396b481cef57bb4176385cb210c61abe..f0c7a79ea8e1eb9035e7b884b45a2e8eef75dbc8 100644 (file)
@@ -29,6 +29,34 @@ icon_40x40_DATA = icons/40x40/mapper.png
 icon_scalable_DATA = icons/scalable/mapper.png
 images_DATA = pixmaps/home.png pixmaps/generic.png
 
-EXTRA_DIST = $(serviceentry_DATA) $(desktopentry_DATA) $(icon_26x26_DATA) $(icon_40x40_DATA) $(icon_scalable_DATA) $(images_DATA)
+schema_in_files = mapper.schemas.in
+schemadir = $(GCONF_SCHEMA_FILE_DIR)
+schema_DATA = $(schema_in_files:.schemas.in=.schemas)
+@INTLTOOL_SCHEMAS_RULE@
+
+EXTRA_DIST = $(serviceentry_DATA) $(desktopentry_DATA) $(icon_26x26_DATA) $(icon_40x40_DATA) $(icon_scalable_DATA) $(images_DATA) mapper.schemas.in
 
 SUBDIRS = help
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
+
+install-data-hook: update-icon-cache
+uninstall-hook: update-icon-cache
+update-icon-cache:
+       @-if test -z "$(DESTDIR)"; then \
+               echo "Updating Gtk icon cache."; \
+               $(gtk_update_icon_cache); \
+       else \
+               echo "*** Icon cache not updated.  After (un)install, run this:"; \
+               echo "***   $(gtk_update_icon_cache)"; \
+       fi
+
+
+install-data-local: $(schema_DATA)
+if GCONF_SCHEMAS_INSTALL
+       if test -z "$(DESTDIR)" ; then \
+       for p in $^ ; do \
+               GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p 2>&1 > /dev/null; \
+       done \
+       fi
+endif