summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-31 05:33:54 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-01-31 05:33:54 +0000
commit9faeb0674c012383a2d01a9c17d97f94cc5a5897 (patch)
treee771a9985aca4a461f01f2af684ff8c44b1a3223 /Makefile
parent6f34406477714668898e7a711e96268e2549d6c0 (diff)
downloadpoezio-9faeb0674c012383a2d01a9c17d97f94cc5a5897.tar.gz
poezio-9faeb0674c012383a2d01a9c17d97f94cc5a5897.tar.bz2
poezio-9faeb0674c012383a2d01a9c17d97f94cc5a5897.tar.xz
poezio-9faeb0674c012383a2d01a9c17d97f94cc5a5897.zip
cleanup, launch.sh, makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile42
1 files changed, 42 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000..16087c0d
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,42 @@
+prefix=/usr/local
+LIBDIR=$(DESTDIR)$(prefix)/lib
+BINDIR=$(DESTDIR)$(prefix)/bin
+DATADIR=$(DESTDIR)$(prefix)/share
+LOCALEDIR=$(DATADIR)/locale
+MANDIR=$(DATADIR)/man
+INSTALL=install
+
+all: Makefile
+clean: Makefile
+
+install:
+ $(INSTALL) -d $(LOCALEDIR) $(BINDIR) $(DATADIR)/poezio $(DATADIR)/poezio/data $(DATADIR)/poezio/src
+
+ $(INSTALL) -m644 data/* $(DATADIR)/poezio/data/
+
+ for sourcefile in `find src/ -maxdepth 1 -type f | grep -v '.svn' | grep -v '.pyc'` ; do \
+ $(INSTALL) -m644 $$sourcefile $(DATADIR)/poezio/src; \
+ done
+
+ echo "#!/usr/bin/env python" > $(BINDIR)/poezio
+ echo "cd $(DATADIR)/poezio/src/ && python client.py" >> $(BINDIR)/poezio
+
+ for localename in `find locale/ -maxdepth 1 -type d | grep -v '.svn' | sed 's:locale/::g'` ; do \
+ if [ -d locale/$$localename ]; then \
+ $(INSTALL) -d $(LOCALEDIR)/$$localename; \
+ $(INSTALL) -d $(LOCALEDIR)/$$localename/LC_MESSAGES; \
+ msgfmt locale/$$localename/LC_MESSAGES/poezio.po -o locale/$$localename/LC_MESSAGES/poezio.mo -v; \
+ $(INSTALL) -m644 locale/$$localename/LC_MESSAGES/poezio.mo $(LOCALEDIR)/$$localename/LC_MESSAGES; \
+ fi \
+ done
+
+uninstall:
+ rm -f $(BINDIR)/poezio
+ rm -rf $(DATADIR)/poezio
+
+ for gettextfile in `find $(LOCALEDIR) -name 'poezio.mo'` ; do \
+ rm -f $$gettextfile; \
+ done
+
+pot:
+ xgettext src/*.py --from-code=utf-8 --keyword=_ -o locale/poezio.pot