$NetBSD: patch-ba,v 1.2 2008/08/07 16:00:14 joerg Exp $ --- python/Makefile.orig 2007-05-18 16:45:21.000000000 +0200 +++ python/Makefile 2007-05-27 14:33:00.000000000 +0200 @@ -12,7 +12,7 @@ POTFILE := $(PODIR)/xen-xm.pot I18NSRCFILES = $(shell find xen/xm/ -name '*.py') CATALOGS = $(patsubst %,xen/xm/messages/%.mo,$(LINGUAS)) -NLSDIR = /usr/share/locale +NLSDIR = $(PREFIX)/share/locale .PHONY: build buildpy buildpy: @@ -57,24 +57,24 @@ ifndef XEN_PYTHON_NATIVE_INSTALL install: LIBPATH=$(shell PYTHONPATH=xen/util python -c "import auxbin; print auxbin.libpath()") install: install-messages install-dtd - CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force --install-lib="$(DESTDIR)$(LIBPATH)/python" + python setup.py install --root=${DESTDIR} else install: install-messages install-dtd - CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force + python setup.py install --root=${DESTDIR} endif install-dtd: all - $(INSTALL_DIR) $(DESTDIR)/usr/share/xen - $(INSTALL_DATA) xen/xm/create.dtd $(DESTDIR)/usr/share/xen + $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(PREFIX)/share/xen + $(BSD_INSTALL_DATA) xen/xm/create.dtd ${DESTDIR}$(PREFIX)/share/xen install-messages: all if which $(MSGFMT) >/dev/null ; then \ - mkdir -p $(DESTDIR)$(NLSDIR); \ + $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(NLSDIR); \ for l in $(LINGUAS); do \ - $(INSTALL_DIR) $(DESTDIR)$(NLSDIR)/$$l; \ - $(INSTALL_DIR) $(DESTDIR)$(NLSDIR)/$$l/LC_MESSAGES; \ - $(INSTALL_DATA) $(PODIR)/$$l.mo \ - $(DESTDIR)$(NLSDIR)/$$l/LC_MESSAGES/$(POPACKAGE).mo; \ + $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(NLSDIR)/$$l; \ + $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(NLSDIR)/$$l/LC_MESSAGES; \ + $(BSD_INSTALL_DATA) ${DESTDIR}$(PODIR)/$$l.mo \ + ${DESTDIR}$(NLSDIR)/$$l/LC_MESSAGES/$(POPACKAGE).mo; \ done ; \ fi