diff options
Diffstat (limited to 'net-analyzer/snips/files/snips-1.2-destdir-awareness.patch')
-rw-r--r-- | net-analyzer/snips/files/snips-1.2-destdir-awareness.patch | 402 |
1 files changed, 402 insertions, 0 deletions
diff --git a/net-analyzer/snips/files/snips-1.2-destdir-awareness.patch b/net-analyzer/snips/files/snips-1.2-destdir-awareness.patch new file mode 100644 index 000000000000..c842f27c52b2 --- /dev/null +++ b/net-analyzer/snips/files/snips-1.2-destdir-awareness.patch @@ -0,0 +1,402 @@ +diff -uNr snips-1.2.ORIG/etherload/Makefile.mid snips-1.2/etherload/Makefile.mid +--- snips-1.2.ORIG/etherload/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/etherload/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -25,10 +25,10 @@ + make CFLAGS="$(CFLAGS) -DSTANDALONE" $(TARG) + + install: $(TARG) +- $(INSTALL) -c -m 4750 $(TARG) $(BINDIR) ++ $(INSTALL) -c -m 4750 $(TARG) $(DESTDIR)$(BINDIR) + @if [ `whoami` = "root" ]; then \ +- chown root $(BINDIR)/$(TARG) ;\ +- ls -lg $(BINDIR)/$(TARG) ;\ ++ chown root $(DESTDIR)$(BINDIR)/$(TARG) ;\ ++ ls -lg $(DESTDIR)$(BINDIR)/$(TARG) ;\ + else \ + echo "";echo "___Installed $(TARG) needs to be root suid___" ;\ + echo "Do as root manually" ;\ +diff -uNr snips-1.2.ORIG/Makefile.mid snips-1.2/Makefile.mid +--- snips-1.2.ORIG/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -66,8 +66,8 @@ + + ## Ultrix make balked at the tests for directories, hence the second test + install: installdir lib +- @[ -d $(ROOTDIR) ] && [ -d $(DATADIR) ] && [ -d $(ETCDIR) ] \ +- && [ -d $(BINDIR) ] ++ @[ -d $(DESTDIR)$(ROOTDIR) ] && [ -d $(DESTDIR)$(DATADIR) ] && \ ++ [ -d $(DESTDIR)$(ETCDIR) ] && [ -d $(DESTDIR)$(BINDIR) ] + @-(touch SniPpet ; $(INSTALL) -c -m 750 SniPpet /tmp/;) >/dev/null 2>&1 ; + @(if [ -f /tmp/SniPpet ]; then rm -f SniPpet /tmp/SniPpet; else \ + echo "YOU HAVE AN INCOMPATIBLE install, use 'myinstall' instead" ;\ +@@ -82,10 +82,10 @@ + @echo "" + @echo "Installing sample config files under $(EXAMPLESDIR)/..." + @-for i in */*-confg */*.conf *.conf ; do \ +- $(INSTALL) -m 444 -c $$i $(EXAMPLESDIR)/ ;\ ++ $(INSTALL) -m 444 -c $$i $(DESTDIR)$(EXAMPLESDIR)/ ;\ + done + @if [ ! -f $(ETCDIR)/snips.conf ]; then \ +- $(INSTALL) -c -m 755 snips.conf $(ETCDIR)/snips.conf ;\ ++ $(INSTALL) -c -m 755 snips.conf $(DESTDIR)$(ETCDIR)/snips.conf ;\ + fi + @echo "" ; echo " NOW su AND DO A make root " + +@@ -95,9 +95,9 @@ + @if [ "`$(WHOAMI)`" = "root" ]; then \ + echo "Installing the following programs SUID under $(BINDIR)";\ + echo " multiping etherload trapmon" ;\ +- $(INSTALL) -m 4711 -c pingmon/multiping/multiping $(BINDIR) ;\ +- $(INSTALL) -m 4710 -c etherload/etherload $(BINDIR) ;\ +- $(INSTALL) -m 4710 -c trapmon/trapmon $(BINDIR) ;\ ++ $(INSTALL) -m 4711 -c pingmon/multiping/multiping $(DESTDIR)$(BINDIR) ;\ ++ $(INSTALL) -m 4710 -c etherload/etherload $(DESTDIR)$(BINDIR) ;\ ++ $(INSTALL) -m 4710 -c trapmon/trapmon $(DESTDIR)$(BINDIR) ;\ + else \ + echo "PLEASE RUN make root AS root (currently `whoami`)" ;\ + fi +diff -uNr snips-1.2.ORIG/Makefile.tail snips-1.2/Makefile.tail +--- snips-1.2.ORIG/Makefile.tail 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/Makefile.tail 2008-06-30 12:35:38.000000000 +0100 +@@ -9,32 +9,32 @@ + + ## these dirs are listed in Makefile.head + installdir: +- @[ -d $(ROOTDIR) ] || mkdir $(ROOTDIR) +- @[ -d $(BINDIR) ] || mkdir $(BINDIR) +- @[ -d $(DATADIR) ] || mkdir $(DATADIR) +- @[ -d $(ETCDIR) ] || mkdir $(ETCDIR) +- @[ -d $(PIDDIR) ] || mkdir $(PIDDIR) +- @[ -d $(INITDIR) ] || mkdir $(INITDIR) +- @[ -d $(MSGSDIR) ] || mkdir $(MSGSDIR) +- @[ -d $(RRD_DBDIR) ] || mkdir $(RRD_DBDIR) +- @[ -d $(EXAMPLESDIR) ] || mkdir $(EXAMPLESDIR) +- @[ -d $(DEVICEHELPDIR) ] || mkdir $(DEVICEHELPDIR) +- @[ -d $(CGIDIR) ] || mkdir -p $(CGIDIR) +- @[ -d $(HTMLDIR) ] || mkdir -p $(HTMLDIR) +- @[ -d $(ROOTDIR)/logs ] || mkdir $(ROOTDIR)/logs ++ @[ -d $(DESTDIR)$(ROOTDIR) ] || mkdir -p $(DESTDIR)$(ROOTDIR) ++ @[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR) ++ @[ -d $(DESTDIR)$(DATADIR) ] || mkdir -p $(DESTDIR)$(DATADIR) ++ @[ -d $(DESTDIR)$(ETCDIR) ] || mkdir -p $(DESTDIR)$(ETCDIR) ++ @[ -d $(DESTDIR)$(PIDDIR) ] || mkdir -p $(DESTDIR)$(PIDDIR) ++ @[ -d $(DESTDIR)$(INITDIR) ] || mkdir -p $(DESTDIR)$(INITDIR) ++ @[ -d $(DESTDIR)$(MSGSDIR) ] || mkdir -p $(DESTDIR)$(MSGSDIR) ++ @[ -d $(DESTDIR)$(RRD_DBDIR) ] || mkdir -p $(DESTDIR)$(RRD_DBDIR) ++ @[ -d $(DESTDIR)$(EXAMPLESDIR) ] || mkdir -p $(DESTDIR)$(EXAMPLESDIR) ++ @[ -d $(DESTDIR)$(DEVICEHELPDIR) ] || mkdir -p $(DESTDIR)$(DEVICEHELPDIR) ++ @[ -d $(DESTDIR)$(CGIDIR) ] || mkdir -p $(DESTDIR)$(CGIDIR) ++ @[ -d $(DESTDIR)$(HTMLDIR) ] || mkdir -p $(DESTDIR)$(HTMLDIR) ++ @[ -d $(DESTDIR)$(ROOTDIR)/logs ] || mkdir -p $(DESTDIR)$(ROOTDIR)/logs + + init: +- @if [ ! -z "$(INITFILES)" ] && [ -d "$(INITDIR)" ]; then \ ++ @if [ ! -z "$(INITFILES)" ] && [ -d "$(DESTDIR)$(INITDIR)" ]; then \ + for i in $(INITFILES) x ; \ + do \ + if [ "$$i" = "x" ]; then \ + : ;\ + else \ +- if [ -f "$(INITDIR)/$$i.init" ]; then \ ++ if [ -f "$(DESTDIR)$(INITDIR)/$$i.init" ]; then \ + echo "Not overwriting existing $(INITDIR)/$$i.init";\ + else \ + echo "Installing $$i.init under $(INITDIR)/" ;\ +- ln -s $(BINDIR)/snipsprog.init $(INITDIR)/$$i.init ;\ ++ ln -s $(DESTDIR)$(BINDIR)/snipsprog.init $(DESTDIR)$(INITDIR)/$$i.init ;\ + fi \ + fi \ + done \ +diff -uNr snips-1.2.ORIG/man/Makefile.mid snips-1.2/man/Makefile.mid +--- snips-1.2.ORIG/man/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/man/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -26,18 +26,18 @@ + + install: installdir + @echo "Installing in 'man'" +- @- [ -d $(MANDIR) ] || mkdir $(MANDIR) ++ @- [ -d $(DESTDIR)$(MANDIR) ] || mkdir $(DESTDIR)$(MANDIR) + # @-for d in $(MANDIR)/man1 $(MANDIR)/man3 $(MANDIR)/man8; do \ + # [! -d $$d ] && mkdir $$d ;\ + # done + @- for m in $(MANPAGES1); do \ +- $(INSTALL) -c -m 644 $$m.sed $(MANDIR)/`basename $$m 1`$(MANEXT) ;\ ++ $(INSTALL) -c -m 644 $$m.sed $(DESTDIR)$(MANDIR)/`basename $$m 1`$(MANEXT) ;\ + done + @- for m in $(MANPAGES3); do \ +- $(INSTALL) -c -m 644 $$m.sed $(MANDIR)/`basename $$m 3`$(MANEXT) ;\ ++ $(INSTALL) -c -m 644 $$m.sed $(DESTDIR)$(MANDIR)/`basename $$m 3`$(MANEXT) ;\ + done + @- for m in $(MANPAGES8); do \ +- $(INSTALL) -c -m 644 $$m.sed $(MANDIR)/`basename $$m 8`$(MANEXT) ;\ ++ $(INSTALL) -c -m 644 $$m.sed $(DESTDIR)$(MANDIR)/`basename $$m 8`$(MANEXT) ;\ + done + + clean: +diff -uNr snips-1.2.ORIG/nsmon/Makefile.mid snips-1.2/nsmon/Makefile.mid +--- snips-1.2.ORIG/nsmon/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/nsmon/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -17,7 +17,7 @@ + $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@ + + install: installdir $(TARG) +- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/ ++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/ + + ## for standalone, need to link with -lresolv or -lbind + nstest: nsmon.c +diff -uNr snips-1.2.ORIG/ntpmon/Makefile.mid snips-1.2/ntpmon/Makefile.mid +--- snips-1.2.ORIG/ntpmon/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/ntpmon/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -17,7 +17,7 @@ + + + install: installdir $(TARG) +- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/ ++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/ + + clean: + rm -f $(DIRT) +diff -uNr snips-1.2.ORIG/perl-monitors/Makefile.mid snips-1.2/perl-monitors/Makefile.mid +--- snips-1.2.ORIG/perl-monitors/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/perl-monitors/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -62,32 +62,32 @@ + # ideally hostmon-osclients/ need not go into the BINDIR, but we are + # putting it all there for now. + install: +- -@[ -d $(BINDIR)/hostmon-osclients ] || mkdir $(BINDIR)/hostmon-osclients ++ -@[ -d $(DESTDIR)$(BINDIR)/hostmon-osclients ] || mkdir $(DESTDIR)$(BINDIR)/hostmon-osclients + -@echo "Installing files in $(BINDIR)/hostmon-osclients" ;\ + for f in hostmon-osclients/* ; do \ + if [ -f $$f ]; then \ +- $(INSTALL) -c -m 755 $$f $(BINDIR)/hostmon-osclients/ ;\ ++ $(INSTALL) -c -m 755 $$f $(DESTDIR)$(BINDIR)/hostmon-osclients/ ;\ + fi \ + done +- -@cd $(BINDIR)/hostmon-osclients ; \ ++ -@cd $(DESTDIR)$(BINDIR)/hostmon-osclients ; \ + if [ -f hostmon-client.seds ]; then \ + $(INSTALL) -c -m 755 hostmon-client.seds hostmon-client ;\ + rm -f hostmon-client.seds ;\ + fi + -@echo "Installing perl monitors under $(BINDIR)" ;\ + for f in $(PROGS) ; do \ +- $(INSTALL) -c -m 755 $$f.seds $(BINDIR)/$$f ;\ ++ $(INSTALL) -c -m 755 $$f.seds $(DESTDIR)$(BINDIR)/$$f ;\ + done + -@for f in $(CONF) ; do \ +- if [ ! -f $(ETCDIR)/$$f ]; then \ +- $(INSTALL) -c -m 644 $$f.seds $(ETCDIR)/$$f ;\ ++ if [ ! -f $(DESTDIR)$(ETCDIR)/$$f ]; then \ ++ $(INSTALL) -c -m 644 $$f.seds $(DESTDIR)$(ETCDIR)/$$f ;\ + fi \ + done +- $(INSTALL) -c -m 755 $(CMUSNMP)/snmpapps/snmpwalk $(BINDIR)/ +- $(INSTALL) -c -m 755 $(CMUSNMP)/snmpapps/snmpget $(BINDIR)/ +- $(INSTALL) -c -m 444 $(CMUSNMP)/mib-v2.txt $(ETCDIR)/ +- @if [ -f $(ETCDIR)/mibII.txt ]; then \ +- mv $(ETCDIR)/mibII.txt $(ETCDIR)/mibII.txt.old ;\ ++ $(INSTALL) -c -m 755 $(CMUSNMP)/snmpapps/snmpwalk $(DESTDIR)$(BINDIR)/ ++ $(INSTALL) -c -m 755 $(CMUSNMP)/snmpapps/snmpget $(DESTDIR)$(BINDIR)/ ++ $(INSTALL) -c -m 444 $(CMUSNMP)/mib-v2.txt $(DESTDIR)$(ETCDIR)/ ++ @if [ -f $(DESTDIR)$(ETCDIR)/mibII.txt ]; then \ ++ mv $(DESTDIR)$(ETCDIR)/mibII.txt $(DESTDIR)$(ETCDIR)/mibII.txt.old ;\ + fi + @echo "See $(SRCDIR)/perl-monotors/README for further customizations" + +diff -uNr snips-1.2.ORIG/pingmon/Makefile.mid snips-1.2/pingmon/Makefile.mid +--- snips-1.2.ORIG/pingmon/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/pingmon/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -26,11 +26,11 @@ + $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@ + + install: installdir $(TARG) +- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/ ; +- @[ -f $(BINDIR)/ippingmon ] && rm -f $(BINDIR)/ippingmon ; \ +- ln -s $(BINDIR)/$(TARG) $(BINDIR)/ippingmon ;\ +- [ -f $(BINDIR)/rpcpingmon ] && rm -f $(BINDIR)/rpcpingmon ; \ +- ln -s $(BINDIR)/$(TARG) $(BINDIR)/rpcpingmon ++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/ ; ++ @[ -f $(DESTDIR)$(BINDIR)/ippingmon ] && rm -f $(DESTDIR)$(BINDIR)/ippingmon ; \ ++ ln -s $(DESTDIR)$(BINDIR)/$(TARG) $(DESTDIR)$(BINDIR)/ippingmon ;\ ++ [ -f $(DESTDIR)$(BINDIR)/rpcpingmon ] && rm -f $(DESTDIR)$(BINDIR)/rpcpingmon ; \ ++ ln -s $(DESTDIR)$(BINDIR)/$(TARG) $(DESTDIR)$(BINDIR)/rpcpingmon + + clean: + rm -f $(DIRT) +diff -uNr snips-1.2.ORIG/pingmon/multiping/Makefile.mid snips-1.2/pingmon/multiping/Makefile.mid +--- snips-1.2.ORIG/pingmon/multiping/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/pingmon/multiping/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -14,10 +14,10 @@ + $(CC) $(CFLAGS) $(OBJS) $(PROGLIBS) -o $(TARG) + + install: installdir $(TARG) +- $(INSTALL) -c -m 4711 $(TARG) $(BINDIR)/ ++ $(INSTALL) -c -m 4711 $(TARG) $(DESTDIR)$(BINDIR)/ + @if [ `whoami` = "root" ]; then \ +- chown root $(BINDIR)/$(TARG) ;\ +- ls -lg $(BINDIR)/$(TARG) ;\ ++ chown root $(DESTDIR)$(BINDIR)/$(TARG) ;\ ++ ls -lg $(DESTDIR)$(BINDIR)/$(TARG) ;\ + else \ + echo "";echo "___Installed $(TARG) needs to be root suid___" ;\ + echo "Do as root manually" ;\ +diff -uNr snips-1.2.ORIG/pingmon/rpcping/Makefile.mid snips-1.2/pingmon/rpcping/Makefile.mid +--- snips-1.2.ORIG/pingmon/rpcping/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/pingmon/rpcping/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -16,7 +16,7 @@ + $(CC) $(CFLAGS) $(OBJS) $(PROGLIBS) -o $(TARG) + + install: installdir $(TARG) +- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/ ++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/ + + clean: + rm -f $(DIRT) $(TARG) +diff -uNr snips-1.2.ORIG/portmon/Makefile.mid snips-1.2/portmon/Makefile.mid +--- snips-1.2.ORIG/portmon/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/portmon/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -15,7 +15,7 @@ + + # + install: installdir $(TARG) +- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/ ++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/ + + clean: + rm -f $(DIRT) +diff -uNr snips-1.2.ORIG/radiusmon/Makefile.mid snips-1.2/radiusmon/Makefile.mid +--- snips-1.2.ORIG/radiusmon/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/radiusmon/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -17,7 +17,7 @@ + + + install: installdir $(TARG) +- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/ ++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/ + + test: radiusmon.c md5.c + $(CC) -c $(CFLAGS) -DDEBUG -DTEST radiusmon.c +diff -uNr snips-1.2.ORIG/snipslog/Makefile.mid snips-1.2/snipslog/Makefile.mid +--- snips-1.2.ORIG/snipslog/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/snipslog/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -21,7 +21,7 @@ + $(CC) $(CFLAGS) -DTEST -o snipslogtest snipslogtest.c $(LIBS) + + install: installdir $(TARG) +- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/ ++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/ + @echo "___Update config file for logging daemon in $(ETCDIR) ___" + + clean: +diff -uNr snips-1.2.ORIG/snipstv/Makefile.mid snips-1.2/snipstv/Makefile.mid +--- snips-1.2.ORIG/snipstv/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/snipstv/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -20,9 +20,9 @@ + $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@ + + install: installdir $(TARG) +- $(INSTALL) -c -m 751 $(TARG) $(BINDIR) +- [ -r $(BINDIR)/netconsole ] || ln -s $(BINDIR)/$(TARG) $(BINDIR)/netconsole +- $(INSTALL) -c -m 0444 snipstv-help $(ETCDIR) ++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR) ++ [ -r $(DESTDIR)$(BINDIR)/netconsole ] || ln -s $(DESTDIR)$(BINDIR)/$(TARG) $(DESTDIR)$(BINDIR)/netconsole ++ $(INSTALL) -c -m 0444 snipstv-help $(DESTDIR)$(ETCDIR) + + clean: + rm -f $(DIRT) filter +diff -uNr snips-1.2.ORIG/snipsweb/Makefile.mid snips-1.2/snipsweb/Makefile.mid +--- snips-1.2.ORIG/snipsweb/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/snipsweb/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -32,24 +32,24 @@ + + install: installdir + @for f in $(CGI) ; do \ +- $(INSTALL) -c -m 755 $$f.seds $(CGIDIR)/$$f ; \ ++ $(INSTALL) -c -m 755 $$f.seds $(DESTDIR)$(CGIDIR)/$$f ; \ + done + @for f in $(CONFIG) ; do \ +- if [ -f $(ETCDIR)/$$f ]; then \ ++ if [ -f $(DESTDIR)$(ETCDIR)/$$f ]; then \ + echo "Not overwriting existing $(ETCDIR)/$$f" ;\ + else \ +- $(INSTALL) -c -m 755 $$f.seds $(ETCDIR)/$$f ; \ ++ $(INSTALL) -c -m 755 $$f.seds $(DESTDIR)$(ETCDIR)/$$f ; \ + fi ;\ + done +- @[ -f $(DEVICEHELPDIR)/default ] || $(INSTALL) -c -m 644 default $(DEVICEHELPDIR)/ ++ @[ -f $(DESTDIR)$(DEVICEHELPDIR)/default ] || $(INSTALL) -c -m 644 default $(DESTDIR)$(DEVICEHELPDIR)/ + @for f in $(HTMLFILES) ; do \ +- if [ -f $(HTMLDIR)/$$f ]; then \ ++ if [ -f $(DESTDIR)$(HTMLDIR)/$$f ]; then \ + echo "Not overwriting existing $(HTMLDIR)/$$f" ;\ + else \ +- $(INSTALL) -c -m 644 $$f $(HTMLDIR)/$$f ; \ ++ $(INSTALL) -c -m 644 $$f $(DESTDIR)$(HTMLDIR)/$$f ; \ + fi ;\ + done ;\ +- cp -r gifs $(HTMLDIR)/gifs ++ cp -r gifs $(DESTDIR)$(HTMLDIR)/gifs + @echo "Installed basic web files under " ; \ + echo " $(HTMLDIR) and $(CGIDIR)" ; \ + echo "Move into desired web location."; \ +diff -uNr snips-1.2.ORIG/tksnips/Makefile.mid snips-1.2/tksnips/Makefile.mid +--- snips-1.2.ORIG/tksnips/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/tksnips/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -23,7 +23,7 @@ + cat tkSnips.tix > tkSnips ; + + install: installdir $(TARG) +- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/ ++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/ + + clean: + rm -f $(DIRT) test +diff -uNr snips-1.2.ORIG/tpmon/Makefile.mid snips-1.2/tpmon/Makefile.mid +--- snips-1.2.ORIG/tpmon/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/tpmon/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -20,7 +20,7 @@ + $(CC) $(CFLAGS) -o tptest tpmon.o tptest.o + + install: installdir $(TARG) +- $(INSTALL) -c -m 751 $(TARG) $(BINDIR)/ ++ $(INSTALL) -c -m 751 $(TARG) $(DESTDIR)$(BINDIR)/ + + clean: + rm -f $(DIRT) tptest +diff -uNr snips-1.2.ORIG/trapmon/Makefile.mid snips-1.2/trapmon/Makefile.mid +--- snips-1.2.ORIG/trapmon/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/trapmon/Makefile.mid 2008-06-30 12:35:38.000000000 +0100 +@@ -20,10 +20,10 @@ + $(CC) $(CFLAGS) $(OBJS) $(LIBS) $(PROGLIBS) -o $@ + + install: $(TARG) +- $(INSTALL) -c -m 4750 $(TARG) $(BINDIR)/ ++ $(INSTALL) -c -m 4750 $(TARG) $(DESTDIR)$(BINDIR)/ + @if [ `whoami` = "root" ]; then \ +- chown root $(BINDIR)/$(TARG) ;\ +- ls -lg $(BINDIR)/$(TARG) ;\ ++ chown root $(DESTDIR)$(BINDIR)/$(TARG) ;\ ++ ls -lg $(DESTDIR)$(BINDIR)/$(TARG) ;\ + else \ + echo "";echo "___Installed $(TARG) needs to be root suid___" ;\ + echo "Do as root manually" ;\ +diff -uNr snips-1.2.ORIG/utility/Makefile.mid snips-1.2/utility/Makefile.mid +--- snips-1.2.ORIG/utility/Makefile.mid 2008-06-30 12:42:43.000000000 +0100 ++++ snips-1.2/utility/Makefile.mid 2008-06-30 12:42:59.000000000 +0100 +@@ -59,12 +59,12 @@ + echo "" + + install: all +- $(INSTALL) -c -m 751 $(CPROGS) $(BINDIR)/ ++ $(INSTALL) -c -m 751 $(CPROGS) $(DESTDIR)$(BINDIR)/ + -@ for f in $(SCRIPTS) ; do \ +- if [ -f $(BINDIR)/$$f ]; then \ ++ if [ -f $(DESTDIR)$(BINDIR)/$$f ]; then \ + echo "Not overwriting existing $(BINDIR)/$$f" ;\ + else \ +- $(INSTALL) -c -m 751 $$f.seds $(BINDIR)/$$f ;\ ++ $(INSTALL) -c -m 751 $$f.seds $(DESTDIR)$(BINDIR)/$$f ;\ + fi ;\ + done + |