summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 14 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index af88282d..9705bce8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
prefix=/usr/local
-LIBDIR=$(DESTDIR)$(prefix)/lib
-BINDIR=$(DESTDIR)$(prefix)/bin
-DATADIR=$(DESTDIR)$(prefix)/share
+LIBDIR=$(prefix)/lib
+BINDIR=$(prefix)/bin
+DATADIR=$(prefix)/share
LOCALEDIR=$(DATADIR)/locale
MANDIR=$(DATADIR)/man
INSTALL=install
@@ -12,22 +12,23 @@ all:
clean: Makefile
install:
- $(INSTALL) -d $(LOCALEDIR) $(BINDIR) $(DATADIR)/poezio $(DATADIR)/poezio/data $(DATADIR)/poezio/src $(DATADIR)/poezio/src/
+ mkdir -p $(DESTDIR)
+ $(INSTALL) -d $(DESTDIR)$(LOCALEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(DATADIR)/poezio $(DESTDIR)$(DATADIR)/poezio/data $(DESTDIR)$(DATADIR)/poezio/src $(DESTDIR)$(DATADIR)/poezio/src/ $(DESTDIR)$(DATADIR)/poezio/src/xmpp
- $(INSTALL) -m644 data/* $(DATADIR)/poezio/data/
+ $(INSTALL) -m644 data/* $(DESTDIR)$(DATADIR)/poezio/data/
- for sourcefile in `find src/ -maxdepth 1 -type f -name \*.py'` ; do \
- $(INSTALL) -m644 $$sourcefile $(DATADIR)/poezio/src; \
+ for sourcefile in `find src/ -maxdepth 1 -type f -name \*.py` ; do \
+ $(INSTALL) -m644 $$sourcefile $(DESTDIR)$(DATADIR)/poezio/src; \
done
- $(INSTALL) -m644 src/xmpp/* $(DATADIR)/poezio/src/xmpp/
+ $(INSTALL) -m644 src/xmpp/* $(DESTDIR)$(DATADIR)/poezio/src/xmpp/
- echo "#!/usr/bin/env sh" > $(BINDIR)/poezio
- echo "cd $(DATADIR)/poezio/src/ && python poezio.py" >> $(BINDIR)/poezio
- chmod 755 $(BINDIR)/poezio
+ echo "#!/usr/bin/env sh" > $(DESTDIR)$(BINDIR)/poezio
+ echo "cd $(DATADIR)/poezio/src/ && python poezio.py" >> $(DESTDIR)$(BINDIR)/poezio
+ chmod 755 $(DESTDIR)$(BINDIR)/poezio
uninstall:
- rm -f $(BINDIR)/poezio
- rm -rf $(DATADIR)/poezio
+ rm -f $(DESTDIR)$(BINDIR)/poezio
+ rm -rf $(DESTDIR)$(DATADIR)/poezio
pot:
xgettext src/*.py --from-code=utf-8 --keyword=_ -o locale/poezio.pot