summaryrefslogtreecommitdiff
path: root/Makefile
blob: 91142ede30d575e651b59b47a52cd7eeb1436f96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
prefix=/usr/local
LIBDIR=$(prefix)/lib
BINDIR=$(prefix)/bin
DATADIR=$(prefix)/share
LOCALEDIR=$(DATADIR)/locale
MANDIR=$(DATADIR)/man
INSTALL=install

all: Makefile

clean:
	find ./ -name \*.pyc -delete
	find ./ -name \*~ -delete
	find ./ -name "#*#" -delete

install:
	mkdir -p $(DESTDIR)
	$(INSTALL) -d $(DESTDIR)$(LOCALEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(DATADIR)/poezio $(DESTDIR)$(DATADIR)/poezio/data $(DESTDIR)$(DATADIR)/poezio/src/ $(DESTDIR)$(DATADIR)/poezio/src/xmpp

	$(INSTALL) -m644 data/* $(DESTDIR)$(DATADIR)/poezio/data/

	for sourcefile in `find src/ -maxdepth 1 -type f -name \*.py` ; do \
		$(INSTALL) -m644 $$sourcefile $(DESTDIR)$(DATADIR)/poezio/src; \
	done

	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 $(DESTDIR)$(BINDIR)/poezio
	rm -rf $(DESTDIR)$(DATADIR)/poezio

pot:
	xgettext src/*.py --from-code=utf-8 --keyword=_ -o locale/poezio.pot