Makefile
branchdebian
changeset 204 d46ef29ab17a
parent 203 d27b41424efb
child 218 ddd0f0d12e12
child 221 c4c3facf5d6b
--- a/Makefile	Wed Nov 11 08:36:24 2009 +0000
+++ b/Makefile	Wed Nov 11 14:41:30 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,20 +16,20 @@
 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 -o $@ /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl $^
+	xsltproc --nonet -o $@ /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl $^
 
 build/pdf/manual.pdf: doc/manual.docbook
 	mkdir -p build/pdf
@@ -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)