diff -r 8f15d7d90f08 -r d27b41424efb Makefile --- a/Makefile Wed Nov 11 11:50:26 2009 +0000 +++ b/Makefile Wed Nov 11 14:35:06 2009 +0000 @@ -1,10 +1,9 @@ #!/usr/bin/env make -f -TOPDIR= -PREFIX=$(TOPDIR)/usr/local/share +PREFIX=/usr/local/share LIBDIR=$(PREFIX)/mercurial-server DOCDIR=$(PREFIX)/doc/mercurial-server -ETCDIR=$(TOPDIR)/etc/mercurial-server +ETCDIR=/etc/mercurial-server NEWUSER=hg INSTALL=install @@ -17,17 +16,17 @@ setup-useradd: installfiles useradd inituser installetc: - $(INSTALL) -d $(ETCDIR) - $(INSTALL) -m 644 -t $(ETCDIR) \ + $(INSTALL) -d $(DESTDIR)$(ETCDIR) + $(INSTALL) -m 644 -t $(DESTDIR)$(ETCDIR) \ src/init/conf/remote-hgrc src/init/conf/access.conf - $(INSTALL) -d $(ETCDIR)/keys/root - $(INSTALL) -d $(ETCDIR)/keys/users + $(INSTALL) -d $(DESTDIR)$(ETCDIR)/keys/root + $(INSTALL) -d $(DESTDIR)$(ETCDIR)/keys/users installdoc: build/html/index.html - $(INSTALL) -d $(DOCDIR) - $(INSTALL) -m 644 -t $(DOCDIR) README - $(INSTALL) -d $(DOCDIR)/html - $(INSTALL) -m 644 -t $(DOCDIR)/html build/html/index.html + $(INSTALL) -d $(DESTDIR)$(DOCDIR) + $(INSTALL) -m 644 -t $(DESTDIR)$(DOCDIR) README + $(INSTALL) -d $(DESTDIR)$(DOCDIR)/html + $(INSTALL) -m 644 -t $(DESTDIR)$(DOCDIR)/html build/html/index.html build/html/index.html: doc/manual.docbook xsltproc --nonet -o $@ /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl $^ @@ -41,10 +40,10 @@ pythoninstall: python setup.py install \ - --install-purelib=$(LIBDIR) \ - --install-platlib=$(LIBDIR) \ - --install-scripts=$(LIBDIR) \ - --install-data=$(LIBDIR) + --install-purelib=$(DESTDIR)$(LIBDIR) \ + --install-platlib=$(DESTDIR)$(LIBDIR) \ + --install-scripts=$(DESTDIR)$(LIBDIR) \ + --install-data=$(DESTDIR)$(LIBDIR) installfiles: installetc installdoc pythoninstall @@ -60,5 +59,5 @@ --comment "Mercurial repositories" $(NEWUSER) inituser: - su -l -c "$(LIBDIR)/init/hginit $(LIBDIR)" $(NEWUSER) + su -l -c "$(DESTDIR)$(LIBDIR)/init/hginit $(DESTDIR)$(LIBDIR)" $(NEWUSER)