summaryrefslogtreecommitdiff
path: root/sysutils/su2/patches/patch-aa
blob: 2877c1df30188f28dd13ea8c614bad9c35eb9d64 (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
$NetBSD: patch-aa,v 1.1.1.1 2002/06/04 09:56:38 cjep Exp $

--- Makefile.orig	Thu Sep  7 13:50:58 1995
+++ Makefile
@@ -8,16 +8,16 @@
 #        /etc/super-users and /usr/adm/sulog that are defined
 #        separately.
 # 
-DEST=/usr/local
+DEST=${PREFIX}
 BINDIR=$(DEST)/bin
-MANDIR=$(DEST)/man
+MANDIR=$(DEST)/man/man1
 
 # OPTIONS:
 # There are a number of DEFINES that can be used to configure su2.  Please
 # see the source to su2.c for a full listing of all of the available options.
 
 # Standard
-OPTIONS=-DFULLPATH 
+OPTIONS=-DSU2LOGFILE="\"/var/log/su2.log\"" -DSUPERUSERS="\"$(PREFIX)/etc/super-users\"" -DBROKENCUSERID
 
 # m88k
 # OPTIONS=-DFULLPATH -DNOVFORK
@@ -31,13 +31,19 @@
 # Shadow Passwords (Solaris)
 # OPTIONS=-DFULLPATH -DUSE_SHADOW
 
-CFLAGS=-O $(OPTIONS)
+CFLAGS+= $(OPTIONS)
+LDLIBS=-lcrypt -lcompat
 
 su2:	su2.c
 
-install: su2
-	install -c -m 4711 -o root su2 $(BINDIR)/su2
-	install -c su2.man $(MANDIR)/su2.1
+su2.1:
+	sed 's,/etc/super,${PREFIX}/etc/super,g' <su2.man >su2.1
+
+all:	su2 su2.1
+
+install: su2 su2.1
+	install -c -s -m 4711 -o root su2 $(BINDIR)/su2
+	install -c su2.1 $(MANDIR)/su2.1
 
 clean:
 	rm -f su2 *.o *.a