A less local version of the above patch. Uses pkg-config instead of gimptool.
-- Tzafrir Cohen | tzaf...@jabber.org | VIM is http://tzafrir.org.il | | a Mutt's tzaf...@cohens.org.il | | best ICQ# 16849754 | | friend
diff -ur orig/Makefile cbmplugs-1.2.1/Makefile --- orig/Makefile 2009-08-22 22:54:29.000000000 +0300 +++ cbmplugs-1.2.1/Makefile 2009-09-07 00:17:34.000000000 +0300 @@ -9,12 +9,12 @@ ifdef GIMP12 GIMPTOOL := gimptool-1.2 -PALETTE_DIR := $(DESTDIR)/usr/share/gimp/1.2/palettes +PALETTE_DIR := /usr/share/gimp/1.2/palettes AM_CFLAGS += -DGIMP12 EXTENSION := $(EXTENSION12) else GIMPTOOL := gimptool-2.0 -PALETTE_DIR := $(DESTDIR)/usr/share/gimp/2.0/palettes +PALETTE_DIR := /usr/share/gimp/2.0/palettes EXTENSION := $(EXTENSION20) endif @@ -23,8 +23,7 @@ GIMP_UNINSTALL_BIN := --uninstall-bin # Use Makefile as plugin to install, to be sure the file exists PALETTE_DIR := \ - $$($(GIMPTOOL) --dry-run $(GIMP_INSTALL_BIN) Makefile | \ - tail -n 1 | sed -e 's/.* \(.*\)\/Makefile/\1/;s/plug-ins/palettes/') + $(shell pkg-config --variable=gimpdatadir gimp-2.0)/palettes else GIMP_INSTALL_BIN := --install-admin-bin GIMP_UNINSTALL_BIN := --uninstall-admin-bin @@ -32,8 +31,7 @@ # Use Makefile as plugin to install, to be sure the file exists PLUGIN_DIR := \ - $$($(GIMPTOOL) --dry-run $(GIMP_INSTALL_BIN) Makefile | \ - tail -n 1 | sed -e 's/.* \(.*\)\/Makefile/\1/') + $(shell pkg-config --variable=gimplibdir gimp-2.0)/plug-ins AM_CFLAGS += `$(GIMPTOOL) --cflags-noui` # AM_CFLAGS += -Werror @@ -74,16 +72,16 @@ .PHONY: install-plugins install-plugins: - $(INSTALL_DIR) $(PLUGIN_DIR) &&\ + $(INSTALL_DIR) $(DESTDIR)$(PLUGIN_DIR) &&\ for plugin in $(PLUGINS); do \ - $(INSTALL) $$plugin$(EXTENSION) $(PLUGIN_DIR); \ + $(INSTALL) $$plugin$(EXTENSION) $(DESTDIR)$(PLUGIN_DIR);\ done .PHONY: install-palettes install-palettes: - $(INSTALL_DIR) $(PALETTE_DIR) &&\ + $(INSTALL_DIR) $(DESTDIR)$(PALETTE_DIR) &&\ for palette in $(PALETTES); do \ - $(INSTALL_DATA) $$palette $(PALETTE_DIR); \ + $(INSTALL_DATA) $$palette $(DESTDIR)$(PALETTE_DIR); \ done .PHONY: install