Small Patch

Martin Helas mhelas@helas.net
Wed Apr 14 01:07:45 UTC 2004


Hi Vernon,

as i am trying to package dcc for the debian project, i got some
problems installing dcc in a changeroot enviroment. To fix that problem
i use attached patch, initialy written by Bas Zoetekouw from the Debian
project. I modified the his patch to got it running with dcc version
1.2.39.

I would be happy if you could apply this patch to upstream as it only 
gives the posibility to install dcc in a changeroot. To use it man 
has to run the installation the following way:

$ DESTDIR=/path/to/changeroot make install


Greetings
Martin


-- 
  Regards,                | Debian GNU / /     _  _  _  _  _ __  __
  .                       |           / /__  / / / \// //_// \ \/ /
  Martin Helas            |          /____/ /_/ /_/\/ /___/  /_/\_\
  mailto:mhelas@helas.net | because reboots are for hardware upgrades.
  PGP-Fingerprint:  1474 4CAC EF5C ECFA E29E  2CB1 7929 AB90 F7AC 3AF
-------------- next part --------------
DESTDIR support for the Makefiles

Copyright (c) 2002 by Bas Zoetekouw <bas@debian.org>
Permission to use, copy, modify, and distribute this patch for any
purpose with or without fee is hereby granted, provided that the
copyright notice and this permission notice appear in all copies.

Modified by Martin Helas <mhelas@helas.net> 2004

diff -rNu dcc-1.2.39.orig/Makefile.inc2.in dcc-1.2.39/Makefile.inc2.in
--- dcc-1.2.39.orig/Makefile.inc2.in	2004-02-22 23:13:55.000000000 +0100
+++ dcc-1.2.39/Makefile.inc2.in	2004-04-08 23:51:33.000000000 +0200
@@ -28,8 +28,8 @@
 BININSTALL=$(INSTALL) $(SET_BINOWN) -m $(BINMODE) -c
 
 # create the DCC home directory before trying to install files
-beforeinstall:$(BINDIR) $(MANDIR)8 depend all
-$(BINDIR):
+beforeinstall:$(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)8 depend all
+$(DESTDIR)$(BINDIR):
 	$(INSTALL) -d $(SET_BINOWN) -m 755 $@
 
 @USE_DCCMANINSTALL@
@@ -37,15 +37,15 @@
 @MAKE_DOT@ifndef NOMAN
 @MAKE_DOT@ifdef MAN8
 	sh -c 'for NM in $(MAN8); do \
-	  $(INSTALL) -c $(SET_MANOWN) -m $(MANMODE) $$NM $(MANDIR)8@MAN8INST@;\
+	  $(INSTALL) -c $(SET_MANOWN) -m $(MANMODE) $$NM $(DESTDIR)$(MANDIR)8@MAN8INST@;\
 	  done'
 @MAKE_DOT@endif
 @MAKE_DOT@endif
 
-$(MANDIR)8:
+$(DESDIR)$(MANDIR)8:
 @MAKE_DOT@ifndef NOMAN
 @MAKE_DOT@ifdef MAN8
-	$(INSTALL) -d $(SET_MANOWN) -m 755 $(MANDIR)8
+	$(INSTALL) -d $(SET_MANOWN) -m 755 $(DESTDIR)$(MANDIR)8
 @MAKE_DOT@endif
 @MAKE_DOT@endif
 
diff -rNu dcc-1.2.39.orig/cgi-bin/Makefile.in dcc-1.2.39/cgi-bin/Makefile.in
--- dcc-1.2.39.orig/cgi-bin/Makefile.in	2004-02-22 23:18:49.000000000 +0100
+++ dcc-1.2.39/cgi-bin/Makefile.in	2004-04-08 23:37:23.000000000 +0200
@@ -34,8 +34,9 @@
 @MAKE_DOT@endif
 
 install:
-	$(INSTALL) -d $(SET_BINOWN) -m 755 $(DCC_CGIBINDIR)
+	$(INSTALL) -d $(SET_BINOWN) -m 755 \
+		$(DESTDIR)$(DCC_CGIBINDIR)
 	for NM in $(CSCRIPTS); do $(INSTALL) $(SET_BINOWN) \
-		-m $(BINMODE) -c $$NM $(DCC_CGIBINDIR)/$$NM; done
+		-m $(BINMODE) -c $$NM $(DESTDIR)$(DCC_CGIBINDIR)/$$NM; done
 	for NM in $(OFILES); do $(INSTALL) $(SET_BINOWN) \
-		-m 644 -c $$NM $(DCC_CGIBINDIR)/$$NM; done
+		-m 644 -c $$NM $(DESTDIR)$(DCC_CGIBINDIR)/$$NM; done
diff -rNu dcc-1.2.39.orig/gmake.inc.in dcc-1.2.39/gmake.inc.in
--- dcc-1.2.39.orig/gmake.inc.in	2004-02-22 23:14:07.000000000 +0100
+++ dcc-1.2.39/gmake.inc.in	2004-04-08 23:45:58.000000000 +0200
@@ -61,7 +61,7 @@
 
 proginstall:beforeinstall
 ifdef PROG
-	$(BININSTALL) $(PROG) $(BINDIR)
+	$(BININSTALL) $(PROG) $(DESTDIR)$(BINDIR)
 endif
 
 # gmake with gcc or IRIX compilers do not need the depend target
diff -rNu dcc-1.2.39.orig/homedir/Makefile.in dcc-1.2.39/homedir/Makefile.in
--- dcc-1.2.39.orig/homedir/Makefile.in	2004-02-22 23:18:19.000000000 +0100
+++ dcc-1.2.39/homedir/Makefile.in	2004-04-08 23:47:03.000000000 +0200
@@ -26,7 +26,7 @@
 
 # simplify building a prototype DCC home directory for an RPM or other package
 @MAKE_DOT@ifndef DCC_PROTO_HOMEDIR
-DCC_PROTO_HOMEDIR=$(DCC_HOMEDIR)
+DCC_PROTO_HOMEDIR=$(DESTDIR)$(DCC_HOMEDIR)
 @MAKE_DOT@endif
 
 install:
diff -rNu dcc-1.2.39.orig/misc/Makefile.in dcc-1.2.39/misc/Makefile.in
--- dcc-1.2.39.orig/misc/Makefile.in	2004-02-22 23:15:20.000000000 +0100
+++ dcc-1.2.39/misc/Makefile.in	2004-04-08 23:53:29.000000000 +0200
@@ -29,4 +29,5 @@
 @MAKE_INC2@
 
 install:
-	for NM in $(SSCRIPTS); do $(BININSTALL) $$NM $(DCC_BINDIR)/$$NM;done
+	for NM in $(SSCRIPTS); do $(BININSTALL) $$NM \
+		$(DESTDIR)$(DCC_BINDIR)/$$NM;done


More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.