]> spindle.queued.net Git - midori/commitdiff
Install scalable icon with autotools
authorChristian Dywan <christian@twotoasts.de>
Sun, 1 Jun 2008 19:57:27 +0000 (21:57 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 1 Jun 2008 19:57:27 +0000 (21:57 +0200)
Makefile.am
configure.in
data/Makefile.am [new file with mode: 0644]

index 3f505e2810bdc4a89bde078aac392784ccf77bc3..d8b5d3a92937a97706c187c49955161efbdf9c17 100644 (file)
@@ -1,6 +1,6 @@
 AUTOMAKE_OPTIONS = gnu
 
-SUBDIRS = katze src po
+SUBDIRS = katze src po data
 
 desktopdir = $(datadir)/applications
 desktop_in_files = midori.desktop
index c21df45afe8a951ef5891b6f35bca391b3534ff1..784509be17a1d8145b52973c3984235cfbcff5e1 100644 (file)
@@ -102,7 +102,8 @@ AC_CONFIG_FILES([
     Makefile       \
     katze/Makefile \
     src/Makefile   \
-    po/Makefile.in
+    po/Makefile.in \
+    data/Makefile
 ])
 AC_OUTPUT
 
diff --git a/data/Makefile.am b/data/Makefile.am
new file mode 100644 (file)
index 0000000..6341bfc
--- /dev/null
@@ -0,0 +1,17 @@
+iconsdir = $(datadir)/icons/hicolor/scalable/apps
+icons_DATA = midori.svg
+
+EXTRA_DIST = $(icons_DATA)
+
+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