DESTDIR problem fixed in Makefile. Thanks gapan. fixed #1579

This commit is contained in:
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 2010-07-06 06:56:32 +00:00
parent 23391a8d93
commit 6de03f3961

View file

@ -1,7 +1,7 @@
prefix=/usr/local
LIBDIR=$(DESTDIR)$(prefix)/lib
BINDIR=$(DESTDIR)$(prefix)/bin
DATADIR=$(DESTDIR)$(prefix)/share
LIBDIR=$(prefix)/lib
BINDIR=$(prefix)/bin
DATADIR=$(prefix)/share
LOCALEDIR=$(DATADIR)/locale
MANDIR=$(DATADIR)/man
INSTALL=install
@ -12,22 +12,23 @@ all:
clean: Makefile
install:
$(INSTALL) -d $(LOCALEDIR) $(BINDIR) $(DATADIR)/poezio $(DATADIR)/poezio/data $(DATADIR)/poezio/src $(DATADIR)/poezio/src/
mkdir -p $(DESTDIR)
$(INSTALL) -d $(DESTDIR)$(LOCALEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(DATADIR)/poezio $(DESTDIR)$(DATADIR)/poezio/data $(DESTDIR)$(DATADIR)/poezio/src $(DESTDIR)$(DATADIR)/poezio/src/ $(DESTDIR)$(DATADIR)/poezio/src/xmpp
$(INSTALL) -m644 data/* $(DATADIR)/poezio/data/
$(INSTALL) -m644 data/* $(DESTDIR)$(DATADIR)/poezio/data/
for sourcefile in `find src/ -maxdepth 1 -type f -name \*.py'` ; do \
$(INSTALL) -m644 $$sourcefile $(DATADIR)/poezio/src; \
for sourcefile in `find src/ -maxdepth 1 -type f -name \*.py` ; do \
$(INSTALL) -m644 $$sourcefile $(DESTDIR)$(DATADIR)/poezio/src; \
done
$(INSTALL) -m644 src/xmpp/* $(DATADIR)/poezio/src/xmpp/
$(INSTALL) -m644 src/xmpp/* $(DESTDIR)$(DATADIR)/poezio/src/xmpp/
echo "#!/usr/bin/env sh" > $(BINDIR)/poezio
echo "cd $(DATADIR)/poezio/src/ && python poezio.py" >> $(BINDIR)/poezio
chmod 755 $(BINDIR)/poezio
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 $(BINDIR)/poezio
rm -rf $(DATADIR)/poezio
rm -f $(DESTDIR)$(BINDIR)/poezio
rm -rf $(DESTDIR)$(DATADIR)/poezio
pot:
xgettext src/*.py --from-code=utf-8 --keyword=_ -o locale/poezio.pot