From 8f1bf7139ad5ae6f9c553029f4c37df82290096d Mon Sep 17 00:00:00 2001 From: David Date: Thu, 29 May 2014 15:39:37 +1200 Subject: User can now specify theme dir --- Makefile | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f718739..379b9a5 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,12 @@ MAKE = make CC = gcc PREFIX=/usr BINDIR=$(PREFIX)/bin +SHAREDIR=$(PREFIX)/share +LOCALEDIR=$(SHAREDIR)/locale/ + SUDO=/usr/bin/sudo TRAYFREQ_SET=$(BINDIR)/trayfreq-set -LOCALE_DIR=$(PREFIX)/share/locale/ +TRAYFREQ_CONF=/etc/trayfreq.conf ifdef DEBUG EXTRA_CFLAGS+=-DDEBUG @@ -16,7 +19,8 @@ EXTRA_CFLAGS+= -DPREFIX=\"$(PREFIX)\" \ -DBINDIR=\"$(BINDIR)\" \ -DSUDO=\"$(SUDO)\" \ -DTRAYFREQ_SET=\"$(TRAYFREQ_SET)\" \ - -DLOCALE_DIR=\"$(LOCALE_DIR)\" + -DLOCALEDIR=\"$(LOCALEDIR)\" \ + -DSHAREDIR=\"$(SHAREDIR)\" DEPS = bat_tray.h \ @@ -111,7 +115,6 @@ trayfreq-set: \ ######################################################################## - ######################################################################## # Make language file(s) lang: @@ -120,20 +123,26 @@ lang: ######################################################################## +# Prepare template config file +config: + sed -e 's:SHAREDIR:$(SHAREDIR):g' \ + -e 's:TRAYFREQ_CONF:$(TRAYFREQ_CONF):g' \ + trayfreq.conf.src > trayfreq.conf +######################################################################## + + +######################################################################## # Remove generated files clean: - rm -f trayfreq trayfreq-set *.o lang/*.mo + rm -f trayfreq trayfreq-set *.o lc/*.mo trayfreq.conf ######################################################################## ######################################################################## # Install entire suite install: - mkdir -p $(DESTDIR)/usr/share/trayfreq/ - #mkdir -p $(DESTDIR)/$(LOCALE_DIR)/fr/LC_MESSAGES/ - #mkdir -p $(DESTDIR)/etc/xdg/autostart/ + install -Dm 755 data/themes $(DESTDIR)/usr/share/trayfreq/ - cp data/*.png $(DESTDIR)/usr/share/trayfreq/ install -Dm 644 lc/fr.mo $(DESTDIR)$(LOCALE_DIR)/fr/LC_MESSAGES/trayfreq.mo install -Dm 644 data/trayfreq.conf $(DESTDIR)/etc/trayfreq.conf -- cgit v1.1