Makefile 1019 Bytes
Newer Older
1
prefix=/usr/local
2 3 4
LIBDIR=$(prefix)/lib
BINDIR=$(prefix)/bin
DATADIR=$(prefix)/share
5 6 7 8
LOCALEDIR=$(DATADIR)/locale
MANDIR=$(DATADIR)/man
INSTALL=install

9
all: Makefile
10

11 12 13
clean:
	find ./ -name \*.pyc -delete
	find ./ -name \*~ -delete
14
	find ./ -name "#*#" -delete
15

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

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

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

26 27 28
	echo "#!/usr/bin/env sh" > $(DESTDIR)$(BINDIR)/poezio
	echo "cd $(DATADIR)/poezio/src/ && python poezio.py" >> $(DESTDIR)$(BINDIR)/poezio
	chmod 755 $(DESTDIR)$(BINDIR)/poezio
29 30

uninstall:
31 32
	rm -f $(DESTDIR)$(BINDIR)/poezio
	rm -rf $(DESTDIR)$(DATADIR)/poezio
33 34 35

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