aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2015-10-22 10:23:50 +0100
committerRichard van der Hoff <richard@matrix.org>2015-10-22 10:23:50 +0100
commitff8f52b9214642bb61ef3b910a1aee57753762b4 (patch)
treeae723d7f04805b873d1091922d56602c22a59670 /Makefile
parent0052f2fb12740259671446cad312488dd27c16b4 (diff)
downloadpurple-matrix-ff8f52b9214642bb61ef3b910a1aee57753762b4.tar.gz
Install matrix icons
Install the artwork in the right place so that pidgin uses it.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 1eea370..4076d18 100644
--- a/Makefile
+++ b/Makefile
@@ -2,12 +2,18 @@
CC=gcc
LIBS=purple json-glib-1.0 glib-2.0
-CFLAGS+=-DPURPLE_PLUGINS $(shell pkg-config --cflags $(LIBS))
+
+PKG_CONFIG=pkg-config
+CFLAGS+=-DPURPLE_PLUGINS $(shell $(PKG_CONFIG) --cflags $(LIBS))
CFLAGS+=-fPIC -DPIC
CFLAGS+=-Wall -g -O0 -Werror
LDLIBS+=$(shell pkg-config --libs $(LIBS))
LDLIBS+=-lhttp_parser
+PLUGIN_DIR_PURPLE = $(shell $(PKG_CONFIG) --variable=plugindir purple)
+DATA_ROOT_DIR_PURPLE = $(shell $(PKG_CONFIG) --variable=datarootdir purple)
+
+
# generate .d files when compiling
CPPFLAGS+=-MMD
@@ -20,8 +26,12 @@ clean:
rm -f $(OBJECTS) $(OBJECTS:.o=.d) $(TARGET)
install:
- mkdir -p $(DESTDIR)/usr/lib/purple-2
- install -m 664 $(TARGET) $(DESTDIR)/usr/lib/purple-2/
+ mkdir -p $(DESTDIR)$(PLUGIN_DIR_PURPLE)
+ install -m 664 $(TARGET) $(DESTDIR)$(PLUGIN_DIR_PURPLE)
+ for i in 16 22 48; do \
+ mkdir -p $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/$$i; \
+ install -m 664 matrix-$${i}px.png $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/$$i/matrix.png; \
+ done
$(TARGET): $(OBJECTS)