2010-07-20 21:50:41 +00:00
|
|
|
prefix=/usr/local
|
2010-07-06 06:56:32 +00:00
|
|
|
LIBDIR=$(prefix)/lib
|
|
|
|
BINDIR=$(prefix)/bin
|
|
|
|
DATADIR=$(prefix)/share
|
2011-11-28 16:15:06 +00:00
|
|
|
DOCDIR=$(DATADIR)/doc
|
2010-01-31 05:33:54 +00:00
|
|
|
LOCALEDIR=$(DATADIR)/locale
|
|
|
|
MANDIR=$(DATADIR)/man
|
|
|
|
|
2010-07-20 10:07:28 +00:00
|
|
|
all: Makefile
|
2011-09-11 18:10:37 +00:00
|
|
|
cd src/ && python3 ../setup.py build_ext --inplace
|
2010-01-31 15:09:58 +00:00
|
|
|
|
2010-07-20 10:07:28 +00:00
|
|
|
clean:
|
|
|
|
find ./ -name \*.pyc -delete
|
|
|
|
find ./ -name \*~ -delete
|
2010-07-20 10:21:37 +00:00
|
|
|
find ./ -name "#*#" -delete
|
2011-11-08 10:26:27 +00:00
|
|
|
find ./ -name "*.html" -delete
|
2010-01-31 05:33:54 +00:00
|
|
|
|
2011-11-08 22:04:37 +00:00
|
|
|
install: all
|
2010-10-16 23:46:45 +00:00
|
|
|
mkdir -p $(DESTDIR)$(prefix)
|
2011-11-28 16:15:06 +00:00
|
|
|
install -d $(DESTDIR)$(LOCALEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(DATADIR)/poezio $(DESTDIR)$(DATADIR)/poezio/data $(DESTDIR)$(DATADIR)/poezio/src/ $(DESTDIR)$(DATADIR)/poezio/src $(DESTDIR)$(DATADIR)/poezio/data/themes $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(DOCDIR)/poezio
|
2010-01-31 05:33:54 +00:00
|
|
|
|
2010-10-16 23:46:45 +00:00
|
|
|
cp -R data/* $(DESTDIR)$(DATADIR)/poezio/data/
|
2010-09-27 16:16:58 +00:00
|
|
|
rm $(DESTDIR)$(DATADIR)/poezio/data/poezio.1
|
2010-01-31 05:33:54 +00:00
|
|
|
|
2011-11-28 16:15:06 +00:00
|
|
|
cp -R doc/* $(DESTDIR)$(DOCDIR)/poezio/
|
|
|
|
cp README CHANGELOG COPYING $(DESTDIR)$(DOCDIR)/poezio/
|
|
|
|
|
2010-10-16 22:36:52 +00:00
|
|
|
install -m644 data/poezio.1 $(DESTDIR)$(MANDIR)/man1/
|
2011-09-11 18:28:35 +00:00
|
|
|
for sourcefile in `ls -1 src/*.py src/*.so` ; do \
|
2010-10-16 22:36:52 +00:00
|
|
|
install -m644 $$sourcefile $(DESTDIR)$(DATADIR)/poezio/src; \
|
2010-01-31 05:33:54 +00:00
|
|
|
done
|
|
|
|
|
2010-07-06 06:56:32 +00:00
|
|
|
echo "#!/usr/bin/env sh" > $(DESTDIR)$(BINDIR)/poezio
|
2010-12-17 13:26:56 +00:00
|
|
|
echo "python3 $(DATADIR)/poezio/src/poezio.py \$$@" >> $(DESTDIR)$(BINDIR)/poezio
|
2010-07-06 06:56:32 +00:00
|
|
|
chmod 755 $(DESTDIR)$(BINDIR)/poezio
|
2010-01-31 05:33:54 +00:00
|
|
|
|
|
|
|
uninstall:
|
2010-07-06 06:56:32 +00:00
|
|
|
rm -f $(DESTDIR)$(BINDIR)/poezio
|
|
|
|
rm -rf $(DESTDIR)$(DATADIR)/poezio
|
2010-09-07 23:36:57 +00:00
|
|
|
rm -rf $(DESTDIR)$(MANDIR)/man1/poezio.1
|
2010-01-31 05:33:54 +00:00
|
|
|
|
2011-11-01 22:25:52 +00:00
|
|
|
doc:
|
2011-11-11 15:56:40 +00:00
|
|
|
find doc -name \*.txt -exec asciidoc -a toc {} \;
|
2010-01-31 05:33:54 +00:00
|
|
|
pot:
|
|
|
|
xgettext src/*.py --from-code=utf-8 --keyword=_ -o locale/poezio.pot
|
2011-11-01 22:25:52 +00:00
|
|
|
|
2011-11-08 10:26:27 +00:00
|
|
|
.PHONY : doc
|