argus-clients-3.0.0.rc.4 destdir patch

Gabriel L. Somlo somlo at cmu.edu
Tue Jun 13 14:10:10 EDT 2006


Carter,

Here's the patch that would add DESDIR capability to the argus-clients
makefiles.

In addition, this patch also causes radium to get installed in sbin
(instead of bin, since it seems to be more of a daemon than a proper
client :)

Thanks much,
Gabriel



diff -NarU5 argus-clients-3.0.0.rc.4.orig/clients/Makefile.in argus-clients-3.0.0.rc.4/clients/Makefile.in
--- argus-clients-3.0.0.rc.4.orig/clients/Makefile.in	2006-06-08 14:20:12.000000000 -0400
+++ argus-clients-3.0.0.rc.4/clients/Makefile.in	2006-06-13 13:59:55.000000000 -0400
@@ -22,12 +22,10 @@
 #
 
 # Top level hierarchy
 prefix = @prefix@
 exec_prefix = @exec_prefix@
-# Pathname of install directory
-DESTDIR = @prefix@
 # Pathname of directory to install the system binaries
 SBINDIR = @sbindir@
 # Pathname of directory to install the system binaries
 BINDIR = @bindir@
 # Pathname of directory to install the include files
@@ -112,17 +110,14 @@
 OBJ =	$(SRC:.c=.o)
 
 CLEANFILES = $(OBJ) $(PROGS)
 
 install: force all
-	[ -d $(DESTDIR) ] || \
-		(mkdir -p $(DESTDIR); chmod 755 $(DESTDIR))
+	[ -d $(DESTDIR)$(BINDIR) ] || \
+		(mkdir -p $(DESTDIR)$(BINDIR); chmod 755 $(DESTDIR)$(BINDIR))
 
-	[ -d $(BINDIR) ] || \
-		(mkdir -p $(BINDIR); chmod 755 $(BINDIR))
-
-	$(INSTALL) $(srcdir)/../bin/ra* $(BINDIR)
+	$(INSTALL) $(srcdir)/../bin/ra* $(DESTDIR)$(BINDIR)
 
 clean:
 	rm -f $(CLEANFILES)
 
 distclean:
diff -NarU5 argus-clients-3.0.0.rc.4.orig/Makefile.in argus-clients-3.0.0.rc.4/Makefile.in
--- argus-clients-3.0.0.rc.4.orig/Makefile.in	2006-06-08 14:20:12.000000000 -0400
+++ argus-clients-3.0.0.rc.4/Makefile.in	2006-06-13 13:59:55.000000000 -0400
@@ -64,81 +64,81 @@
 
 .PHONY: all
 
 install:  force
 	make installdirs
-	[ -d @prefix@ ] || \
-		(mkdir -p @prefix@; chmod 755 @prefix@)
+	[ -d $(DESTDIR)@prefix@ ] || \
+		(mkdir -p $(DESTDIR)@prefix@; chmod 755 $(DESTDIR)@prefix@)
 
-	[ -d @sbindir@ ] || \
-		(mkdir -p @sbindir@; chmod 755 @sbindir@)
+	[ -d $(DESTDIR)@sbindir@ ] || \
+		(mkdir -p $(DESTDIR)@sbindir@; chmod 755 $(DESTDIR)@sbindir@)
 
-	[ -d @bindir@ ] || \
-		(mkdir -p @bindir@; chmod 755 @bindir@)
+	[ -d $(DESTDIR)@bindir@ ] || \
+		(mkdir -p $(DESTDIR)@bindir@; chmod 755 $(DESTDIR)@bindir@)
 
-	[ -d $(exec_prefix)/argus ] || \
-		(mkdir -p $(exec_prefix)/argus; chmod 755 $(exec_prefix)/argus)
+	[ -d $(DESTDIR)$(exec_prefix)/argus ] || \
+		(mkdir -p $(DESTDIR)$(exec_prefix)/argus; chmod 755 $(DESTDIR)$(exec_prefix)/argus)
 
-	[ -d $(exec_prefix)/argus/lib ] || \
-		(mkdir -p $(exec_prefix)/argus/lib; chmod 755 $(exec_prefix)/argus/lib)
+	[ -d $(DESTDIR)$(exec_prefix)/argus/lib ] || \
+		(mkdir -p $(DESTDIR)$(exec_prefix)/argus/lib; chmod 755 $(DESTDIR)$(exec_prefix)/argus/lib)
 
-	[ -d $(exec_prefix)/argus/archive ] || \
-		(mkdir -p $(exec_prefix)/argus/archive; chmod 755 $(exec_prefix)/argus/archive)
+	[ -d $(DESTDIR)$(exec_prefix)/argus/archive ] || \
+		(mkdir -p $(DESTDIR)$(exec_prefix)/argus/archive; chmod 755 $(DESTDIR)$(exec_prefix)/argus/archive)
 
-	[ -d $(docdir) ] || \
-		(mkdir -p $(docdir); chmod 755 $(docdir))
+	[ -d $(DESTDIR)$(docdir) ] || \
+		(mkdir -p $(DESTDIR)$(docdir); chmod 755 $(DESTDIR)$(docdir))
 
-	[ -d $(docdir)/html ] || \
-		(mkdir -p $(docdir)/html; chmod 755 $(docdir)/html)
+	[ -d $(DESTDIR)$(docdir)/html ] || \
+		(mkdir -p $(DESTDIR)$(docdir)/html; chmod 755 $(DESTDIR)$(docdir)/html)
 
-	[ -d $(docdir)/html/man ] || \
-		(mkdir -p $(docdir)/html/man; chmod 755 $(docdir)/html/man)
+	[ -d $(DESTDIR)$(docdir)/html/man ] || \
+		(mkdir -p $(DESTDIR)$(docdir)/html/man; chmod 755 $(DESTDIR)$(docdir)/html/man)
 
 	@for i in  $(DIRS) ; do \
 		if [ -d $$i ] ; then \
 		echo "making in $$i"; \
 		cd $$i; \
 		make install; \
 		cd ..; \
 		fi; \
 	done
 
-	$(INSTALL) -m 0644 $(srcdir)/doc/FAQ $(docdir)
-	$(INSTALL) -m 0644 $(srcdir)/doc/HOW-TO $(docdir)
-	$(INSTALL) -m 0644 $(srcdir)/doc/html/man/*.html $(docdir)/html/man
+	$(INSTALL) -m 0644 $(srcdir)/doc/FAQ $(DESTDIR)$(docdir)
+	$(INSTALL) -m 0644 $(srcdir)/doc/HOW-TO $(DESTDIR)$(docdir)
+	$(INSTALL) -m 0644 $(srcdir)/doc/html/man/*.html $(DESTDIR)$(docdir)/html/man
 
-	$(INSTALL) -m 0644 $(srcdir)/README $(prefix)/argus
-	$(INSTALL) -m 0644 $(srcdir)/README $(docdir)
-	$(INSTALL) -m 0644 $(srcdir)/COPYING $(prefix)/argus
-	$(INSTALL) -m 0644 $(srcdir)/COPYING $(docdir)
+	$(INSTALL) -m 0644 $(srcdir)/README $(DESTDIR)$(prefix)/argus
+	$(INSTALL) -m 0644 $(srcdir)/README $(DESTDIR)$(docdir)
+	$(INSTALL) -m 0644 $(srcdir)/COPYING $(DESTDIR)$(prefix)/argus
+	$(INSTALL) -m 0644 $(srcdir)/COPYING $(DESTDIR)$(docdir)
 
-	$(INSTALL) -m 0644 $(srcdir)/support/Config/rarc            $(prefix)/argus
+	$(INSTALL) -m 0644 $(srcdir)/support/Config/rarc $(DESTDIR)$(prefix)/argus
 
-	$(INSTALL) -m 0755 $(srcdir)/bin/ntasbug @bindir@/ntasbug
+#	$(INSTALL) -m 0755 $(srcdir)/bin/ntasbug $(DESTDIR)@bindir@/ntasbug
 
-	[ -d @mandir@ ] || \
-		(mkdir -p @mandir@; chmod 755 @mandir@)
+	[ -d $(DESTDIR)@mandir@ ] || \
+		(mkdir -p $(DESTDIR)@mandir@; chmod 755 $(DESTDIR)@mandir@)
 	[ -d @mandir@/man1 ] || \
-		(mkdir -p @mandir@/man1; chmod 755 @mandir@/man1)
+		(mkdir -p $(DESTDIR)@mandir@/man1; chmod 755 $(DESTDIR)@mandir@/man1)
 	$(INSTALL) -m 0644 $(srcdir)/man/man1/ra.1 \
-		@mandir@/man1/ra.1
+		$(DESTDIR)@mandir@/man1/ra.1
 	$(INSTALL) -m 0644 $(srcdir)/man/man1/racount.1 \
-		@mandir@/man1/racount.1
+		$(DESTDIR)@mandir@/man1/racount.1
 	$(INSTALL) -m 0644 $(srcdir)/man/man1/ragraph.1 \
-		@mandir@/man1/ragraph.1
+		$(DESTDIR)@mandir@/man1/ragraph.1
 	$(INSTALL) -m 0644 $(srcdir)/man/man1/rasort.1 \
-		@mandir@/man1/rasort.1
+		$(DESTDIR)@mandir@/man1/rasort.1
 	$(INSTALL) -m 0644 $(srcdir)/man/man1/rasplit.1 \
-		@mandir@/man1/rasplit.1
+		$(DESTDIR)@mandir@/man1/rasplit.1
 	$(INSTALL) -m 0644 $(srcdir)/man/man1/rabins.1 \
-		@mandir@/man1/rabins.1
+		$(DESTDIR)@mandir@/man1/rabins.1
 	$(INSTALL) -m 0644 $(srcdir)/man/man1/racluster.1 \
-		@mandir@/man1/racluster.1
-	[ -d @mandir@/man5 ] || \
-		(mkdir -p @mandir@/man5; chmod 755 @mandir@/man5)
+		$(DESTDIR)@mandir@/man1/racluster.1
+	[ -d $(DESTDIR)@mandir@/man5 ] || \
+		(mkdir -p $(DESTDIR)@mandir@/man5; chmod 755 $(DESTDIR)@mandir@/man5)
 	$(INSTALL) -m 0644 $(srcdir)/man/man5/rarc.5 \
-		@mandir@/man5/rarc.5
+		$(DESTDIR)@mandir@/man5/rarc.5
 uninstall:
 	rm -f @bindir@/ra
 	rm -f @bindir@/rabins
 	rm -f @bindir@/racount
 	rm -f @bindir@/rasort
diff -NarU5 argus-clients-3.0.0.rc.4.orig/radium/Makefile.in argus-clients-3.0.0.rc.4/radium/Makefile.in
--- argus-clients-3.0.0.rc.4.orig/radium/Makefile.in	2006-06-08 14:20:12.000000000 -0400
+++ argus-clients-3.0.0.rc.4/radium/Makefile.in	2006-06-13 14:01:42.000000000 -0400
@@ -21,12 +21,10 @@
 #
 
 # Top level hierarchy
 prefix = @prefix@
 exec_prefix = @exec_prefix@
-# Pathname of install directory
-DESTDIR = @prefix@
 # Pathname of directory to install the system binaries
 SBINDIR = @sbindir@
 # Pathname of directory to install the system binaries
 BINDIR = @bindir@
 # Pathname of directory to install the include files
@@ -73,32 +71,29 @@
 
 LIB = @INSTALL_LIB@/argus_parse.a @INSTALL_LIB@/argus_common.a @INSTALL_LIB@/argus_client.a @LIBS@
 
 SRC = radium.c
 
-PROGS = @INSTALL_BIN@/radium
+PROGS = radium
 
 all: $(PROGS)
 
- at INSTALL_BIN@/radium: radium.o $(LIB)
+radium: radium.o $(LIB)
 	$(CC) $(CCOPT) -o $@ radium.o $(LIB) $(COMPATLIB)
 
 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
 # hack the extra indirection
 
 OBJ =	$(SRC:.c=.o)
 
 CLEANFILES = $(OBJ) $(PROGS)
 
 install: force all
-	[ -d $(DESTDIR) ] || \
-		(mkdir -p $(DESTDIR); chmod 755 $(DESTDIR))
+	[ -d $(DESTDIR)$(SBINDIR) ] || \
+		(mkdir -p $(DESTDIR)$(SBINDIR); chmod 755 $(DESTDIR)$(SBINDIR))
 
-	[ -d $(BINDIR) ] || \
-		(mkdir -p $(BINDIR); chmod 755 $(BINDIR))
-
-	$(INSTALL) $(srcdir)/../bin/ra* $(BINDIR)
+	$(INSTALL) $(srcdir)/radium $(DESTDIR)$(SBINDIR)
 
 clean:
 	rm -f $(CLEANFILES)
 
 distclean:
diff -NarU5 argus-clients-3.0.0.rc.4.orig/ragraph/Makefile.in argus-clients-3.0.0.rc.4/ragraph/Makefile.in
--- argus-clients-3.0.0.rc.4.orig/ragraph/Makefile.in	2006-06-08 14:20:12.000000000 -0400
+++ argus-clients-3.0.0.rc.4/ragraph/Makefile.in	2006-06-13 13:59:55.000000000 -0400
@@ -25,12 +25,10 @@
 #
 
 # Top level hierarchy
 prefix = @prefix@
 exec_prefix = @exec_prefix@
-# Pathname of install directory
-DESTDIR = @prefix@
 # Pathname of directory to install the system binaries
 SBINDIR = @sbindir@
 # Pathname of directory to install the system binaries
 BINDIR = @bindir@
 # Pathname of directory to install the include files
@@ -81,17 +79,14 @@
 
 
 CLEANFILES = $(PROGS)
 
 install: force all
-	[ -d $(DESTDIR) ] || \
-		(mkdir -p $(DESTDIR); chmod 755 $(DESTDIR))
+	[ -d $(DESTDIR)$(BINDIR) ] || \
+		(mkdir -p $(DESTDIR)$(BINDIR); chmod 755 $(DESTDIR)$(BINDIR))
 
-	[ -d $(BINDIR) ] || \
-		(mkdir -p $(BINDIR); chmod 755 $(BINDIR))
-
-	$(INSTALL) @INSTALL_BIN@/ragraph $(BINDIR)
+	$(INSTALL) @INSTALL_BIN@/ragraph $(DESTDIR)$(BINDIR)
 
 clean:
 	rm -f $(CLEANFILES)
 
 distclean:
diff -NarU5 argus-clients-3.0.0.rc.4.orig/ragrep/Makefile.in argus-clients-3.0.0.rc.4/ragrep/Makefile.in
--- argus-clients-3.0.0.rc.4.orig/ragrep/Makefile.in	2006-06-08 14:20:12.000000000 -0400
+++ argus-clients-3.0.0.rc.4/ragrep/Makefile.in	2006-06-13 13:59:55.000000000 -0400
@@ -15,12 +15,10 @@
 SHELL = /bin/sh
 
 # Top level hierarchy
 prefix = @prefix@
 exec_prefix = @exec_prefix@
-# Pathname of install directory
-DESTDIR = @prefix@
 # Pathname of directory to install the system binaries
 SBINDIR = @sbindir@
 # Pathname of directory to install the system binaries
 BINDIR = @bindir@
 # Pathname of directory to install the include files
@@ -48,11 +46,10 @@
 # Standard CFLAGS
 CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
 
 INSTALL = @INSTALL@
 RANLIB  = @V_RANLIB@
-DESTDIR =
 ACLOCAL = aclocal
 AUTOCONF = autoconf
 AUTOMAKE = automake
 AUTOHEADER = autoheader
 
@@ -165,15 +162,15 @@
 
 maintainer-clean-binPROGRAMS:
 
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(BINDIR)
+	$(mkinstalldirs) $(DESTDIR)$(BINDIR)
 	@list='$(bin_PROGRAMS)'; for p in $$list; do \
 	  if test -f $$p; then \
 	    echo "  $(INSTALL_PROGRAM) $$p $(BINDIR)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
-	     $(INSTALL_PROGRAM) $$p $(BINDIR)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+	     $(INSTALL_PROGRAM) $$p $(DESTDIR)$(BINDIR)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
 	  else :; fi; \
 	done
 
 uninstall-binPROGRAMS:
 	@$(NORMAL_UNINSTALL)
@@ -369,11 +366,11 @@
 all-redirect: all-recursive
 install-strip:
 	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
 installdirs: installdirs-recursive
 installdirs-am:
-	$(mkinstalldirs)  $(DESTDIR)$(bindir)
+	$(mkinstalldirs) $(bindir)
 
 
 mostlyclean-generic:
 
 clean-generic:
diff -NarU5 argus-clients-3.0.0.rc.4.orig/ratop/Makefile.in argus-clients-3.0.0.rc.4/ratop/Makefile.in
--- argus-clients-3.0.0.rc.4.orig/ratop/Makefile.in	2006-06-08 14:20:12.000000000 -0400
+++ argus-clients-3.0.0.rc.4/ratop/Makefile.in	2006-06-13 13:59:55.000000000 -0400
@@ -22,12 +22,10 @@
 #
 
 # Top level hierarchy
 prefix = @prefix@
 exec_prefix = @exec_prefix@
-# Pathname of install directory
-DESTDIR = @prefix@
 # Pathname of directory to install the system binaries
 SBINDIR = @sbindir@
 # Pathname of directory to install the system binaries
 BINDIR = @bindir@
 # Pathname of directory to install the include files
@@ -89,17 +87,14 @@
 OBJ =	$(SRC:.c=.o)
 
 CLEANFILES = $(OBJ) $(PROGS)
 
 install: force all
-	[ -d $(DESTDIR) ] || \
-		(mkdir -p $(DESTDIR); chmod 755 $(DESTDIR))
+	[ -d $(DESTDIR)$(BINDIR) ] || \
+		(mkdir -p $(DESTDIR)$(BINDIR); chmod 755 $(DESTDIR)$(BINDIR))
 
-	[ -d $(BINDIR) ] || \
-		(mkdir -p $(BINDIR); chmod 755 $(BINDIR))
-
-	$(INSTALL) @INSTALL_BIN@/ratop $(BINDIR)
+	$(INSTALL) @INSTALL_BIN@/ratop $(DESTDIR)$(BINDIR)
 
 clean:
 	rm -f $(CLEANFILES)
 
 distclean:
diff -NarU5 argus-clients-3.0.0.rc.4.orig/support/Startup/radium argus-clients-3.0.0.rc.4/support/Startup/radium
--- argus-clients-3.0.0.rc.4.orig/support/Startup/radium	2006-06-08 14:20:12.000000000 -0400
+++ argus-clients-3.0.0.rc.4/support/Startup/radium	2006-06-13 13:59:55.000000000 -0400
@@ -49,11 +49,11 @@
 
 # Set radium path by defining $RADIUMHOME for this script.
 # If radium was installed in another way, modify PATH to
 # include the directory where the radium binary was installed.
 
-RADIUMDIR=/usr/local/bin
+RADIUMDIR=/usr/local/sbin
 RADIUMHOME=$RADIUMDIR
 export PATH=$RADIUMHOME:$PATH
 
 [ -f $RADIUMHOME/radium ] || exit 1
 



More information about the argus mailing list