summaryrefslogtreecommitdiff
path: root/comms/mgetty+sendfax/patches/patch-ab
blob: 7bec0cacaa17a985fbe8fe34f30f49d132c3354b (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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
--- Makefile.orig	2004-07-24 14:53:47.000000000 -0400
+++ Makefile	2005-02-23 11:07:40.000000000 -0500
@@ -4,8 +4,8 @@
 #
 # this is the C compiler to use (on SunOS, the standard "cc" does not
 # grok my code, so please use gcc there. On ISC 4.0, use "icc".).
-CC=gcc
-#CC=cc
+#CC=gcc
+CC=cc
 #
 #### C Compiler Flags ####
 #
@@ -102,7 +102,7 @@
 #	    USTAT	  - ustat(), no statfs etc.
 #
 #CFLAGS=-Wall -O2 -pipe -DSECUREWARE -DUSE_POLL
-CFLAGS=-O2 -Wall -pipe
+CFLAGS=-O2 -Wall -pipe -DAUTO_PPP -DPREFIX=\"${PREFIX}\"
 #CFLAGS=-O -DSVR4
 #CFLAGS=-O -DSVR4 -DSVR42
 #CFLAGS=-O -DUSE_POLL
@@ -144,7 +144,7 @@
 # For Linux, add "-lutil" if the linker complains about "updwtmp".
 #
 LDFLAGS=
-LIBS=
+LIBS=-lutil
 #LIBS=-lprot -lsocket				# SCO Unix
 #LIBS=-lsocket
 #LIBS=-lbsd					# OSF/1
@@ -164,15 +164,15 @@
 #
 # if your systems doesn't have one, use the shell script that I provide
 # in "inst.sh" (taken from X11R5). Needed on IRIX5.2
-INSTALL=install -c -o bin -g bin
-#INSTALL=install -c -o root -g wheel		# NeXT/BSD
+#INSTALL=install -c -o bin -g bin
+INSTALL=install -c -o root -g wheel		# NeXT/BSD
 #INSTALL=/usr/ucb/install -c -o bin -g bin	# AIX, Solaris 2.x
 #INSTALL=installbsd -c -o bin -g bin		# OSF/1, AIX 4.1, 4.2
 #INSTALL=/usr/bin/X11/bsdinst -c -o bin 	# IRIX
 #
 # prefix, where most (all?) of the stuff lives, usually /usr/local or /usr
 #
-prefix=/usr/local
+prefix=${PREFIX}
 #
 # prefix for all the spool directories (usually /usr/spool or /var/spool)
 #
@@ -180,20 +180,20 @@
 #
 # where the mgetty + sendfax binaries live (used for "make install")
 #
-SBINDIR=$(prefix)/sbin
+SBINDIR=${PREFIX}/sbin
 #
 # where the user executable binaries live
 #
-BINDIR=$(prefix)/bin
+BINDIR=${PREFIX}/bin
 #
 # where the font+coverpage files go
 #
-LIBDIR=$(prefix)/lib/mgetty+sendfax
+LIBDIR=${PREFIX}/lib/mgetty+sendfax
 #
 # where the configuration files (*.config, aliases, fax.allow/deny) go to
 #
-CONFDIR=$(prefix)/etc/mgetty+sendfax
-#CONFDIR=/etc/default/
+CONFDIR=${MGETTY_CONFDIR}
+CONF_EXAMPLES_DIR=${PREFIX}/share/examples/mgetty+sendfax
 #
 #
 # where mgetty PID files (mgetty.pid) go to
@@ -220,20 +220,20 @@
 #
 #
 # Where section 1 manual pages should be placed
-MAN1DIR=$(prefix)/man/man1
+MAN1DIR=${PREFIX}/man/man1
 #
 # Where section 4 manual pages (mgettydefs.4) should be placed
-MAN4DIR=$(prefix)/man/man4
+MAN4DIR=${PREFIX}/man/man4
 #
 # Section 5 man pages (faxqueue.5)
-MAN5DIR=$(prefix)/man/man5
+MAN5DIR=${PREFIX}/man/man5
 #
 # Section 8 man pages (sendfax.8)
-MAN8DIR=$(prefix)/man/man8
+MAN8DIR=${PREFIX}/man/man8
 #
 # Where the GNU Info-Files are located
 #
-INFODIR=$(prefix)/info
+INFODIR=${PREFIX}/info
 #
 #
 # A shell that understands bourne-shell syntax
@@ -258,7 +258,7 @@
 # If you have Perl with TK extentions, define it here. This may be the
 # same as PERL=... above, or different, if you have TkPerl statically
 # linked.
-TKPERL=/usr/bin/tkperl
+#TKPERL=/usr/bin/tkperl
 #
 #
 # An echo program that understands escapes like "\n" for newline or
@@ -270,9 +270,9 @@
 # please use the "mg.echo" program provided in the compat/ subdirectory.
 # Set ECHO="mg.echo" and INSTALL_MECHO to mg.echo
 #
-ECHO="echo"
+ECHO="mg.echo"
 #
-# INSTALL_MECHO=mg.echo
+INSTALL_MECHO=mg.echo
 
 #
 # for mgetty, that's it. If you want to use the voice
@@ -280,7 +280,7 @@
 
 # To maintain security, I recommend creating a new group for
 # users who are allowed to manipulate the recorded voice messages.
-PHONE_GROUP=phone
+PHONE_GROUP=uucp
 PHONE_PERMS=770
 
 # Add -DNO_STRSTR to CFLAGS if you don't have strstr().
@@ -312,7 +312,7 @@
 
 all:	bin-all doc-all
 
-bin-all: mgetty sendfax newslock subdirs call-back 
+bin-all: mgetty sendfax newslock subdirs call-back vgetty
 
 # a few C files need extra compiler arguments
 
@@ -564,8 +564,8 @@
 # internal: use this to create a "clean" mgetty+sendfax tree
 bindist: all doc-all sedscript
 	-rm -rf bindist
-	./mkidirs bindist$(prefix) bindist$(spool)
-	bd=`pwd`/bindist; PATH=`pwd`:"$$PATH" $(MAKE) prefix=$$bd$(prefix) \
+	./mkidirs bindist${PREFIX}/ bindist$(spool)
+	bd=`pwd`/bindist; PATH=`pwd`:"$$PATH" $(MAKE) prefix=$$bd${PREFIX}/ \
 		BINDIR=$$bd$(BINDIR) SBINDIR=$$bd$(SBINDIR) \
 		LIBDIR=$$bd$(LIBDIR) CONFDIR=$$bd$(CONFDIR) \
 		spool=$$bd$(spool) FAX_SPOOL=$$bd$(FAX_SPOOL) \
@@ -577,7 +577,7 @@
 	cd bindist; gtar cvvfz mgetty$(MR).$(SR)-bin.tgz *
 
 
-install: install.bin install.doc
+install: install.bin install.doc install-vgetty
 
 install.bin: mgetty sendfax newslock \
 		login.config mgetty.config sendfax.config 
@@ -585,7 +585,7 @@
 # binaries
 #
 	-test -d $(BINDIR)  || ( ./mkidirs $(BINDIR)  ; chmod 755 $(BINDIR)  )
-	$(INSTALL) -m 755 newslock $(BINDIR)
+	$(INSTALL) -s -m 755 newslock $(BINDIR)
 
 	-test -d $(SBINDIR) || ( ./mkidirs $(SBINDIR) ; chmod 755 $(SBINDIR) )
 	-mv -f $(SBINDIR)/mgetty $(SBINDIR)/mgetty.old
@@ -597,18 +597,14 @@
 #
 	test -d $(LIBDIR)  || \
 		( ./mkidirs $(LIBDIR) &&  chmod 755 $(LIBDIR) )
-	test -d $(CONFDIR) || \
-		( ./mkidirs $(CONFDIR) && chmod 755 $(CONFDIR))
-	test -f $(CONFDIR)/login.config || \
-		$(INSTALL) -o root -m 600 login.config $(CONFDIR)/
-	test -f $(CONFDIR)/mgetty.config || \
-		$(INSTALL) -o root -m 600 mgetty.config $(CONFDIR)/
-	test -f $(CONFDIR)/sendfax.config || \
-		$(INSTALL) -o root -m 644 sendfax.config $(CONFDIR)/
-	test -f $(CONFDIR)/dialin.config || \
-		$(INSTALL) -o root -m 600 dialin.config $(CONFDIR)/
-	test -f $(CONFDIR)/faxrunq.config || \
-		$(INSTALL) -o root -m 644 faxrunq.config $(CONFDIR)/
+	test -d $(CONF_EXAMPLES_DIR) || \
+		( ./mkidirs $(CONF_EXAMPLES_DIR); chmod 755 $(CONF_EXAMPLES_DIR))
+	$(INSTALL) -o root -m 600 login.config $(CONF_EXAMPLES_DIR)/
+	$(INSTALL) -o root -m 600 mgetty.config $(CONF_EXAMPLES_DIR)/
+	$(INSTALL) -o root -m 644 sendfax.config $(CONF_EXAMPLES_DIR)/
+	$(INSTALL) -o root -m 600 dialin.config $(CONF_EXAMPLES_DIR)/
+	$(INSTALL) -o root -m 644 faxrunq.config $(CONF_EXAMPLES_DIR)/
+
 #
 # test for outdated stuff
 #