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 36
|
DESTDIR =
TGZFILE = /tmp/microhope.tgz
all:
$(MAKE) -C po all
install: all
# install the main command to launch microhope
install -d $(DESTDIR)/usr/bin
install -m 755 microhope.py $(DESTDIR)/usr/bin
mv $(DESTDIR)/usr/bin/microhope.py $(DESTDIR)/usr/bin/microhope
# install the localization
$(MAKE) -C po install DESTDIR=$(DESTDIR)
# install the pixmaps
install -d $(DESTDIR)/usr/share/microhope/pixmaps
install -m 644 pixmaps/* $(DESTDIR)/usr/share/microhope/pixmaps
# install the python3 uhope library
install -d $(DESTDIR)/usr/lib/python3/dist-packages/uhope
install -m 644 uhope/*.py $(DESTDIR)/usr/lib/python3/dist-packages/uhope
python3 -m py_compile $(DESTDIR)/usr/lib/python3/dist-packages/uhope/*.py
uninstall:
rm -f $(DESTDIR)/usr/bin/microhope
rm -f $(DESTDIR)/usr/share/locale/*/LC_MESSAGES/uhope.mo
rm -rf $(DESTDIR)/usr/share/microhope
rm -rf $(DESTDIR)/usr/lib/python3/dist-packages/uhope
clean:
rm -f *.o *~ *.pyc uhope/*~
rm -f po/*.mo
find . -name "__pycache__" | xargs rm -rf
archive:
tar czf $(TGZFILE) -C .. --exclude .gitignore --exclude __pycache__ --exclude "*~" microhope/Makefile microhope/microhope.py microhope/pixmaps microhope/uhope
.PHONY: all install uninstall clean archive
|