summaryrefslogtreecommitdiff
path: root/security/zebedee/patches/patch-aa
blob: 046f7bcafbdb105631e4edabd4cdaf1a1c2d258a (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
$NetBSD: patch-aa,v 1.5 2005/02/22 16:26:58 adam Exp $

--- Makefile.orig	2003-09-23 12:37:56.000000000 +0000
+++ Makefile
@@ -20,6 +20,7 @@ CC_win32 = gcc -mno-cygwin
 CC_linux = gcc -pthread
 CC_solaris = gcc
 CC_freebsd = gcc -pthread
+CC_netbsd = cc
 CC_tru64 = cc
 CC_irix = cc -n32 -woff 1110
 CC_hpux = cc -Ae +DAportable
@@ -30,7 +31,7 @@ CC = $(CC_$(OS))
 # Optimise/debug compilation
 
 #OPTIM = -Wall -g
-OPTIM = -Wall -O3
+OPTIM = -Wall
 
 # Location of gmp include and library
 #
@@ -45,19 +46,19 @@ OPTIM = -Wall -O3
 # BFINC = /usr/include/openssl
 # BFLIB = -lcrypto
 
-BFINC = -I../blowfish-0.9.5a
-BFLIB = ../blowfish-0.9.5a/libblowfish.a
+BFINC =
+BFLIB =
 
 # Location of zlib include and library
 
-ZINC = -I../zlib-1.1.4
-ZLIB = ../zlib-1.1.4/libz.a
+ZINC =
+ZLIB =
 
 # Location of bzlib include and library
 # Set these empty if you don't want bzib2 support
 
-BZINC = -I../bzip2-1.0.1
-BZLIB = ../bzip2-1.0.1/libbz2.a
+BZINC =
+BZLIB =
 
 #
 # Tools needed for Perl "POD"-format documentation conversion.
@@ -73,9 +74,9 @@ POD2MAN = $(PERL) -S pod2man$(BAT_$(OS))
 
 # Installation directories for the Linux/Solaris/*NIX World
 
-ROOTDIR = /usr
+ROOTDIR =$(LOCALBASE)
 BINDIR = $(ROOTDIR)/bin
-ZBDDIR = $(ROOTDIR)/lib/zebedee
+ZBDDIR = $(ROOTDIR)/share/doc/zebedee
 MANDIR = $(ROOTDIR)/man/man1
 
 # This is a BSD-style install
@@ -85,6 +86,7 @@ INSTALL_$(OS) = install -c
 INSTALL_linux = install -c
 INSTALL_solaris = /usr/ucb/install -c
 INSTALL_freebsd = install -c
+INSTALL_netbsd = install -c
 INSTALL_tru64 = installbsd -c
 INSTALL_irix = install -c
 INSTALL_hpux = install -c
@@ -145,6 +147,7 @@ DEFINES_win32 = -DFD_SETSIZE=512
 DEFINES_linux = -DHAVE_PTHREADS
 DEFINES_solaris = -D_REENTRANT -DHAVE_PTHREADS
 DEFINES_freebsd = -DHAVE_PTHREADS -DBUGGY_FORK_WITH_THREADS
+DEFINES_netbsd =
 DEFINES_tru64 = -D_REENTRANT -DHAVE_PTHREADS
 DEFINES_irix = -D_REENTRANT -DHAVE_PTHREADS -Dinline=
 DEFINES_hpux = -D_REENTRANT -DHAVE_PTHREADS -DDONT_HAVE_SELECT_H -Dinline=
@@ -163,6 +166,7 @@ OSLIBS_win32 = -lwsock32 -lwinmm
 OSLIBS_linux = -lpthread
 OSLIBS_solaris = -lsocket -lnsl -lthread
 OSLIBS_freebsd =
+OSLIBS_netbsd = -lcrypto -lbz2 -lz
 OSLIBS_tru64 = -lpthread
 OSLIBS_irix = -lpthread
 OSLIBS_hpux = -lpthread -lnsl
@@ -182,7 +186,7 @@ SERVICEOBJ = $(SERVICEOBJ_$(OS))
 #### You REALLY shouldn't have to modify anything beyond here ...
 ####
 
-CFLAGS = $(OPTIM) $(DEFINES) -I. $(GMPINC) $(BFINC) $(ZINC) $(BZINC)
+CFLAGS += $(OPTIM) $(DEFINES) -I. $(GMPINC) $(BFINC) $(ZINC) $(BZINC)
 
 LIBS = $(GMPLIB) $(BFLIB) $(ZLIB) $(BZLIB) $(OSLIBS)
 
@@ -192,17 +196,17 @@ ZBDFILES = server.zbd vncviewer.zbd vncs
 	client1.key client2.key clients.id
 
 TXTFILES = README.txt LICENCE.txt GPL2.txt CHANGES.txt NOTICE.txt \
-	zebedee.html ftpgw.tcl.html zebedee.ja_JP.html zebedee.iss
+	zebedee.html ftpgw.tcl.html zebedee.ja_JP.html
 
 EXTRAFILES = $(ZBDFILES) $(TXTFILES)
 
 all : precheck zebedee$(EXE) zebedee.1 zebedee.html ftpgw.tcl.1 ftpgw.tcl.html zebedee.ja_JP.html
 
 precheck :
-	@ if test -z "$(OS)"; then echo "Use '$(MAKE) OS=xxx' where xxx is win32, linux, solaris, freebsd, tru64, irix, hpux, macosx or bsdi"; exit 1; fi
+	@ if test -z "$(OS)"; then echo "Use '$(MAKE) OS=xxx' where xxx is win32, linux, solaris, freebsd, netbsd, openbsd, tru64, irix, hpux, macosx or bsdi"; exit 1; fi
 
 zebedee$(EXE) : $(OBJS)
-	$(CC) $(CFLAGS) -o zebedee$(EXE) $(OBJS) $(LIBS)
+	$(CC) $(LDFLAGS) -o zebedee$(EXE) $(OBJS) $(LIBS)
 
 huge.o : huge.h
 
@@ -232,12 +236,12 @@ ftpgw.tcl.html : ftpgw.tcl.pod
 
 install : precheck zebedee$(EXE) zebedee.1 ftpgw.tcl.1 $(ZBDFILES) $(TXTFILES)
 	-mkdir -p $(BINDIR) $(MANDIR) $(ZBDDIR)
-	$(INSTALL) zebedee$(EXE) $(BINDIR)
+	$(INSTALL) -s -m 755 zebedee$(EXE) $(BINDIR)
 	$(INSTALL) -m 0755 ftpgw.tcl $(BINDIR)
-	$(INSTALL) zebedee.1 $(MANDIR)
-	$(INSTALL) ftpgw.tcl.1 $(MANDIR)
-	$(INSTALL) $(ZBDFILES) $(ZBDDIR)
-	$(INSTALL) $(TXTFILES) $(ZBDDIR)
+	$(INSTALL) -m 0444 zebedee.1 $(MANDIR)
+	$(INSTALL) -m 0444 ftpgw.tcl.1 $(MANDIR)
+	$(INSTALL) -m 0444 $(ZBDFILES) $(ZBDDIR)
+	$(INSTALL) -m 0444 $(TXTFILES) $(ZBDDIR)
 
 clean :
 	rm -f zebedee zebedee.exe *.o core *.1 *.html *.tmp *.bak