--- gnats/Makefile.in.orig	2005-02-24 20:35:55 UTC
+++ gnats/Makefile.in
@@ -93,7 +93,7 @@ M4 = @M4@
 
 INSTALL = $(srcdir)/../install-sh -c
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_DATA = @INSTALL_DATA@
 
 SUB_INSTALL = `echo $(INSTALL) | sed 's,^\([^/]\),../\1,'`
@@ -109,6 +109,7 @@ bindir = @bindir@
 libdir = @libdir@
 libexecdir = @libexecdir@
 statedir = @datadir@
+sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
 
 program_transform_name =
@@ -162,7 +163,7 @@ all-gnats: all-tools gnatsd queue-pr mai
 	check-db delete-pr dbconfig gnats-databases gnats-pwconv $(EXTRA_STUFF)
 
 all-tools: libgnats.a query-pr pr-age pr-edit edit-pr file-pr getclose \
-	config-send-pr mail-agent dbconfig diff-prs
+	mail-agent dbconfig diff-prs
 
 libgnats.a: $(LIBOBJS)
 	-rm -f tmplibgnats.a libgnats.a
@@ -368,15 +369,11 @@ install-tools: install-tools-arch-indep 
 install-tools-arch-dep: install-tools-bin
 
 install-tools-arch-indep: all-tools
-	$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(datadir)/gnats
+	$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(sharedstatedir)/gnats
 	$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(sysconfdir)/gnats/defaults
-	@if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \
-	  echo "chown $(GNATS_USER) $(DESTDIR)$(datadir)/gnats" ; \
-	  chown $(GNATS_USER) $(DESTDIR)$(datadir)/gnats ; \
-        else \
-	  echo "*** Warning: Must chown $(GNATS_USER) $(DESTDIR)$(datadir)/gnats" ; \
+	@if [ x"$(lispdir)" != x ]; then \
+	  $(INSTALL_DATA) $(srcdir)/gnats.el $(DESTDIR)$(lispdir)/gnats.el ; \
 	fi
-	$(INSTALL_DATA) $(srcdir)/gnats.el $(DESTDIR)$(lispdir)/gnats.el
 	for i in categories submitters responsible gnatsd.user_access addresses states classes dbconfig ; do \
 	    if [ -f "$$i" ] ; then \
 		$(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir)/gnats/defaults/$$i ; \
@@ -391,17 +388,9 @@ install-tools-bin: all-tools
 	$(INSTALL_SCRIPT) edit-pr $(DESTDIR)$(bindir)/edit-pr
 	$(INSTALL_SCRIPT) diff-prs $(DESTDIR)$(libexecdir)/gnats/diff-prs
 	$(INSTALL_SCRIPT) mail-agent $(DESTDIR)$(libexecdir)/gnats/mail-agent
-	$(INSTALL_PROGRAM) file-pr $(DESTDIR)$(libexecdir)/gnats/file-pr
+	$(INSTALL_SCRIPT) file-pr $(DESTDIR)$(libexecdir)/gnats/file-pr
 	$(INSTALL_PROGRAM) pr-age $(DESTDIR)$(libexecdir)/gnats/pr-age
 	$(INSTALL_PROGRAM) pr-edit $(DESTDIR)$(libexecdir)/gnats/pr-edit
-	@if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \
-	  echo "chown $(GNATS_USER) $(DESTDIR)$(libexecdir)/gnats/pr-edit" ; \
-	  echo "chmod 4555 $(DESTDIR)$(libexecdir)/gnats/pr-edit" ; \
-	  chown $(GNATS_USER) $(DESTDIR)$(libexecdir)/gnats/pr-edit ; \
-	  chmod 4555 $(DESTDIR)$(libexecdir)/gnats/pr-edit ; \
-        else \
-	  echo "*** Warning: Must make pr-edit suid $(DESTDIR)$(GNATS_USER)" ; \
-	fi
 
 EXTRA_INSTALL =
 
@@ -409,33 +398,9 @@ install-gnats: install-gnats-bin install
 install-gnats-arch-dep: install-gnats-bin $(EXTRA_INSTALL)
 
 install-gnats-arch-indep: all-gnats install-tools-arch-indep
-	@if [ -f $(DESTDIR)$(GLOBAL_DB_LIST_FILE) ]; then \
-	  echo "Not putting gnats-databases file in $(DESTDIR)$(GLOBAL_DB_LIST_FILE), it's already there." ; \
-	  true ; \
-	else \
-	  if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \
-	    $(INSTALL_DATA) -o $(GNATS_USER) gnats-databases \
-	                    $(DESTDIR)$(GLOBAL_DB_LIST_FILE) ; \
-	  else \
-	    $(INSTALL_DATA) gnats-databases $(DESTDIR)$(GLOBAL_DB_LIST_FILE) ; \
-	    echo "*** Warning: Must chown $(GNATS_USER) $(DESTDIR)$(GLOBAL_DB_LIST_FILE)" ; \
-	  fi \
-	fi
-	@if [ -f $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE) ]; then \
-	   echo "Not putting gnats.host_access file in $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE), it's already there." ; \
-	   true ; \
-	else \
-	  if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \
-	    $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/gnatsd.host_access \
-	                    $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE) ; \
-          else \
-	    $(INSTALL_DATA) $(srcdir)/gnatsd.host_access \
-	                    $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE) ; \
-	    echo "*** Warning: Must chown $(GNATS_USER) $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE)" ; \
-	  fi \
-	fi
-	@echo "*** If you're a first-time user, you'll want to create a new database";
-	@echo "*** with $(libexecdir)/gnats/mkdb."
+	$(INSTALL_DATA) gnats-databases $(DESTDIR)$(GLOBAL_DB_LIST_FILE).default
+	$(INSTALL_DATA) $(srcdir)/gnatsd.host_access \
+	                    $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE).default
 
 install-gnats-bin: all-gnats install-tools-bin
 	$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(libexecdir)/gnats
@@ -450,20 +415,6 @@ install-gnats-bin: all-gnats install-too
 	$(INSTALL_PROGRAM) gen-index $(DESTDIR)$(libexecdir)/gnats/gen-index
 	$(INSTALL_SCRIPT) mail-query $(DESTDIR)$(libexecdir)/gnats/mail-query
 	$(INSTALL_PROGRAM) gnats-pwconv $(DESTDIR)$(libexecdir)/gnats/gnats-pwconv
-	@if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \
-	  echo "chown $(GNATS_USER) $(DESTDIR)$(libexecdir)/gnats/queue-pr $(DESTDIR)$(libexecdir)/gnats/file-pr $(DESTDIR)$(libexecdir)/gnats/gen-index" ; \
-	  echo "chmod 4555 $(DESTDIR)$(libexecdir)/gnats/queue-pr $(DESTDIR)$(libexecdir)/gnats/file-pr $(DESTDIR)$(libexecdir)/gnats/gen-index" ; \
-	  echo "chown $(GNATS_USER) $(DESTDIR)$(libexecdir)/gnats/gnatsd" ; \
-	  echo "chmod 555 $(DESTDIR)$(libexecdir)/gnats/gnatsd" ; \
-	  chown $(GNATS_USER) $(DESTDIR)$(libexecdir)/gnats/queue-pr ; \
-	  chown $(GNATS_USER) $(DESTDIR)$(libexecdir)/gnats/gen-index ; \
-	  chmod 4555 $(DESTDIR)$(libexecdir)/gnats/queue-pr ; \
-	  chmod 4555 $(DESTDIR)$(libexecdir)/gnats/gen-index ; \
-	  chown $(GNATS_USER) $(DESTDIR)$(libexecdir)/gnats/gnatsd ; \
-	  chmod 555 $(DESTDIR)$(libexecdir)/gnats/gnatsd ; \
-	else \
-	  echo "*** Warning: must make queue-pr and gen-index suid $(GNATS_USER)." ; \
-	fi
 
 # regex.c is pretty badly broken, and I don't feel like fixing it.
 regex.o: $(srcdir)/regex.c
