summaryrefslogtreecommitdiff
path: root/databases/gnats/patches/patch-aa
blob: fb05095b345de75ff9d1b2e5c86efe3bb0938c4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
$NetBSD: patch-aa,v 1.3 2005/08/27 22:24:02 recht Exp $

--- gnats/Makefile.in.orig	2005-02-24 21:35:55.000000000 +0100
+++ 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,'`
@@ -250,7 +250,7 @@ diff-prs: diff-prs.sh Makefile
 
 mkcat: mkcat.sh Makefile
 	@echo Creating mkcat...
-	@cat $(srcdir)/mkcat.sh > $@-t
+	@sed -e 's,xBINDIRx,$(bindir),g' $(srcdir)/mkcat.sh > $@-t
 	@mv $@-t $@
 	@chmod a+x $@
 
@@ -265,7 +265,7 @@ mkdb: mkdb.sh Makefile
 
 rmcat: rmcat.sh Makefile
 	@echo Creating rmcat...
-	@cat $(srcdir)/rmcat.sh > $@-t
+	@sed -e 's,xBINDIRx,$(bindir),g' $(srcdir)/rmcat.sh > $@-t
 	@mv $@-t $@
 	@chmod a+x $@
 
@@ -369,7 +369,7 @@ install-tools-arch-dep: install-tools-bi
 
 install-tools-arch-indep: all-tools
 	$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(datadir)/gnats
-	$(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(sysconfdir)/gnats/defaults
+	$(SHELL) $(srcdir)/../mkinstalldirs %%GNATS_DEFAULTS%%
 	@if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \
 	  echo "chown $(GNATS_USER) $(DESTDIR)$(datadir)/gnats" ; \
 	  chown $(GNATS_USER) $(DESTDIR)$(datadir)/gnats ; \
@@ -379,9 +379,9 @@ install-tools-arch-indep: all-tools
 	$(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 ; \
+		$(INSTALL_DATA) $$i %%GNATS_DEFAULTS%%/$$i ; \
 	    else \
-		$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(sysconfdir)/gnats/defaults/$$i ; \
+		$(INSTALL_DATA) $(srcdir)/$$i %%GNATS_DEFAULTS%%/$$i ; \
 	    fi ; \
 	done
 
@@ -391,7 +391,7 @@ 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 \
@@ -409,29 +409,42 @@ 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." ; \
+	@if [ -f %%EGDIR%%/databases ]; then \
+	  echo "Not putting gnats-databases file in %%EGDIR%%/databases, 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) ; \
+	                    %%EGDIR%%/databases ; \
 	  else \
-	    $(INSTALL_DATA) gnats-databases $(DESTDIR)$(GLOBAL_DB_LIST_FILE) ; \
-	    echo "*** Warning: Must chown $(GNATS_USER) $(DESTDIR)$(GLOBAL_DB_LIST_FILE)" ; \
+	    $(INSTALL_DATA) gnats-databases %%EGDIR%%/databases ; \
+	    echo "*** Warning: Must chown $(GNATS_USER) %%EGDIR%%/databases" ; \
 	  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." ; \
+	@if [ -f %%EGDIR%%/gnatsd.host_access ]; then \
+	   echo "Not putting gnats.host_access file in %%EGDIR%%/gnatsd.host_access, 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) ; \
+	                    %%EGDIR%%/gnatsd.host_access ; \
           else \
 	    $(INSTALL_DATA) $(srcdir)/gnatsd.host_access \
-	                    $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE) ; \
-	    echo "*** Warning: Must chown $(GNATS_USER) $(DESTDIR)$(GNATSD_HOST_ACCESS_FILE)" ; \
+	                    %%EGDIR%%/gnatsd.host_access ; \
+	    echo "*** Warning: Must chown $(GNATS_USER) %%EGDIR%%/gnatsd.host_access" ; \
+	  fi \
+	fi
+	@if [ -f %%EGDIR%%/gnatsd.user_access ]; then \
+	   echo "Not putting gnats.user_access file in %%EGDIR%%/gnatsd.user_access, it's already there." ; \
+	   true ; \
+	else \
+	  if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \
+	    $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/gnatsd.user_access \
+	                    %%EGDIR%%/gnatsd.user_access ; \
+          else \
+	    $(INSTALL_DATA) $(srcdir)/gnatsd.user_access \
+	                    %%EGDIR%%/gnatsd.user_access ; \
+	    echo "*** Warning: Must chown $(GNATS_USER) %%EGDIR%%/gnatsd.user_access" ; \
 	  fi \
 	fi
 	@echo "*** If you're a first-time user, you'll want to create a new database";