summaryrefslogtreecommitdiff
path: root/net/xisp/files/patch-Makefile
blob: 66e8289ded6ed61683d8cdac6f5d72ada0fac1f0 (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
--- Makefile.orig	Sun Nov  6 22:38:22 2005
+++ Makefile	Mon Feb 27 08:22:22 2006
@@ -12,12 +12,12 @@
 #  Compilation/installation vars (global for all following sections) |
 #=====================================================================
 #
-CC         = gcc
-PREFIX     = /usr/local
-X11PREFIX  = /usr/X11R6
+CC         ?= gcc
+PREFIX     = %%PREFIX%%
+X11PREFIX  = ${LOCALBASE}
 INCX11     = $(X11PREFIX)/include
 LIBX11     = $(X11PREFIX)/lib
-INCFORMS   = $(X11PREFIX)/include
+INCFORMS   = $(X11PREFIX)/include/X11
 LIBFORMS   = $(X11PREFIX)/lib
 MODEM_DEV  = modem
 MODEM_PATH = /dev/$(MODEM_DEV)
@@ -29,26 +29,26 @@
 # Normal (i.e. SuSE-[6789].x) vars; for SuSE-5.x use the lines which
 # DO NOT include -lcrypt for EXTRALIBS and -DGLIBC2 for EXTRADEFS.
 #-------------------------------------------------------------------
-BINX11     = $(X11PREFIX)/bin
-USRLOCAL   = $(PREFIX)/bin
-SBINDIR    = /usr/sbin
-VARRUN     = /var/run
-USRLIBPPP  = /etc/ppp
-OPTSDIR    = /etc/ppp
-MANDIR     = $(X11PREFIX)/man/man1
-ETCPPP     = /etc/ppp
-INSTPPPDIR = $(ETCPPP)
-PPPDLCKDIR = /var/lock
-DESTDIR    = 
-GROUP      = uucp
-CCFLAGS    = -Wall -O
-EXTRADEFS  = -DMODEM_DEVICE=\"$(MODEM_PATH)\" -DGLIBC2 -DHAVE_STRERROR
+#BINX11     = $(X11PREFIX)/bin
+#USRLOCAL   = $(PREFIX)/bin
+#SBINDIR    = /usr/sbin
+#VARRUN     = /var/run
+#USRLIBPPP  = /etc/ppp
+#OPTSDIR    = /etc/ppp
+#MANDIR     = $(X11PREFIX)/man/man1
+#ETCPPP     = /etc/ppp
+#INSTPPPDIR = $(ETCPPP)
+#PPPDLCKDIR = /var/lock
+#DESTDIR    = 
+#GROUP      = uucp
+#CCFLAGS    = -Wall -O
+#EXTRADEFS  = -DMODEM_DEVICE=\"$(MODEM_PATH)\" -DGLIBC2 -DHAVE_STRERROR
 #EXTRADEFS  = -DMODEM_DEVICE=\"$(MODEM_PATH)\"
-EXTRALIBS  = -lcrypt
+#EXTRALIBS  = -lcrypt
 #EXTRALIBS  = 
-LINKX11    = 
-LINKFORMS  = -L$(LIBFORMS) -lforms
-INSTALL    = install
+#LINKX11    = 
+#LINKFORMS  = -L$(LIBFORMS) -lforms
+#INSTALL    = install
 #
 # Debian vars (if your Debian distribution is relatively
 # old and does not use glibc2, use the lines which DO NOT
@@ -208,29 +208,29 @@
 #
 # FreeBSD vars
 #-------------
-#BINX11     = $(X11PREFIX)/bin
-#USRLOCAL   = $(BINX11)
-#SBINDIR    = /usr/sbin
-#VARRUN     = /var/run
-#USRLIBPPP  = $(PREFIX)/libexec
-#MANDIR     = $(PREFIX)/man/man1
-#ETCPPP     = /etc/ppp
-#OPTSDIR    = $(ETCPPP)
-#INSTPPPDIR = $(ETCPPP)
-#PPPDLCKDIR = /var/spool/lock
-#DESTDIR    = 
-#NAMEFORMS  = xforms
-#GROUP      = dialer
-#CHAT_PATH  = /usr/bin
-#PPPD_PATH  = /usr/sbin
-#CCFLAGS    = -Wall -O
-#EXTRALIBS  = -lcipher
-#LINKX11    = -Wl,-R$(LIBX11)
-#LINKFORMS  = -L$(LIBFORMS) -lxforms
-#INSTALL    = /usr/bin/install
-##MODEM_DEV  = cuaa0
-#EXTRADEFS  = -DMODEM_DEVICE=\"$(MODEM_PATH)\" -DHAVE_STRERROR \
-#	     -DCHAT_PATH=\"$(CHAT_PATH)\" -DPPPD_PATH=\"$(PPPD_PATH)\"
+BINX11     = $(X11PREFIX)/bin
+USRLOCAL   = $(BINX11)
+SBINDIR    = /usr/sbin
+VARRUN     = /var/run
+USRLIBPPP  = $(PREFIX)/libexec
+MANDIR     = $(PREFIX)/man/man1
+ETCPPP     = ${PREFIX}/etc/ppp
+OPTSDIR    = $(ETCPPP)
+INSTPPPDIR = $(ETCPPP)
+PPPDLCKDIR = /var/spool/lock
+DESTDIR    = 
+GROUP      = dialer
+CHAT_PATH  = /usr/bin
+PPPD_PATH  = /usr/sbin
+CCFLAGS    ?= -Wall -O -DUSE_OPENSSL
+EXTRALIBS  = -lcrypto
+LINKX11    = -Wl,-R$(LIBX11)
+LINKFORMS  = -L$(LIBFORMS) -lforms
+INSTALL    = /usr/bin/install
+MODEM_DEV  = cuaa0
+MODEM_DEVS = cuaa0 cuaa1 cuaa2 cuaa3 umodem
+EXTRADEFS  = -DMODEM_DEVICE=\"$(MODEM_PATH)\" -DHAVE_STRERROR \
+	     -DCHAT_PATH=\"$(CHAT_PATH)\" -DPPPD_PATH=\"$(PPPD_PATH)\"
 #
 #=====================================================================
 #                    Program configuration options                   |
@@ -399,30 +399,39 @@
 	  mv -f $(DESTDIR)$(INSTPPPDIR)/ip-up \
 	  $(DESTDIR)$(INSTPPPDIR)/ip-up.bak; fi
 	$(INSTALL) -g $(GROUP) -m 750 -o root \
-	  ip-up.install $(DESTDIR)$(INSTPPPDIR)/ip-up
+	  ip-up.install $(DESTDIR)$(INSTPPPDIR)/ip-up.xisp
 	if [ -f $(DESTDIR)$(INSTPPPDIR)/ip-down ]; then \
 	  mv -f $(DESTDIR)$(INSTPPPDIR)/ip-down \
 	  $(DESTDIR)$(INSTPPPDIR)/ip-down.bak; fi
 	$(INSTALL) -g $(GROUP) -m 750 -o root \
-	  ip-down.install $(DESTDIR)$(INSTPPPDIR)/ip-down
+	  ip-down.install $(DESTDIR)$(INSTPPPDIR)/ip-down.xisp
 	rm -f ip-up.install ip-down.install
-	sed -e sM__DEVICEM$(MODEM_PATH)M \
-	  < xisp.peers.device > xisp_$(MODEM_DEV)
+	for i in $(MODEM_DEVS); do \
+	sed -e sM__DEVICEM/dev/$${i}M \
+	  < xisp.peers.device > xisp_$${i}; \
+	done
 	sed -e sM__DIALER_PATHM$(DESTDIR)$(USRLIBPPP)M \
 	  < xisp.peers.dialer > xisp_dialer
 	if [ ! -d $(DESTDIR)$(INSTPPPDIR)/peers ]; then \
 	  $(INSTALL) -d $(DESTDIR)$(INSTPPPDIR)/peers; fi
-	if [ -f $(DESTDIR)$(INSTPPPDIR)/peers/xisp_$(MODEM_DEV) ]; then \
-	  mv -f $(DESTDIR)$(INSTPPPDIR)/peers/xisp_$(MODEM_DEV) \
-	  $(DESTDIR)$(INSTPPPDIR)/peers/xisp_$(MODEM_DEV).bak; fi
+	for i in $(MODEM_DEVS); do \
+	if [ -f $(DESTDIR)$(INSTPPPDIR)/peers/xisp_$${i} ]; then \
+	  mv -f $(DESTDIR)$(INSTPPPDIR)/peers/xisp_$${i} \
+	  $(DESTDIR)$(INSTPPPDIR)/peers/xisp_$${i}.bak; fi; \
+	done
+	for i in $(MODEM_DEVS); do \
 	$(INSTALL) -g $(GROUP) -m 640 -o root \
-	  xisp_$(MODEM_DEV) $(DESTDIR)$(INSTPPPDIR)/peers/xisp_$(MODEM_DEV)
+	  xisp_$$i $(DESTDIR)$(INSTPPPDIR)/peers/xisp_$${i}; \
+	done
 	if [ -f $(DESTDIR)$(INSTPPPDIR)/peers/xisp_dialer ]; then \
 	  mv -f $(DESTDIR)$(INSTPPPDIR)/peers/xisp_dialer \
 	  $(DESTDIR)$(INSTPPPDIR)/peers/xisp_dialer.bak; fi
 	$(INSTALL) -g $(GROUP) -m 640 -o root \
 	  xisp_dialer $(DESTDIR)$(INSTPPPDIR)/peers/xisp_dialer
-	rm -f xisp_$(MODEM_DEV) xisp_dialer
+	for i in $(MODEM_DEVS); do \
+	rm -f xisp_$${i}; \
+	done
+	rm -f xisp_dialer
 
 clean:
 	rm -f *.o xisp xispdial xisprccv xispterm xispid xisp.xpm xisp.1
@@ -434,10 +443,12 @@
 	  $(DESTDIR)$(USRLOCAL)/xisprccv \
 	  $(DESTDIR)$(USRLOCAL)/xispid \
 	  $(DESTDIR)$(MANDIR)/xisp.1 \
-	  $(DESTDIR)$(INSTPPPDIR)/peers/xisp_$(MODEM_DEV) \
-	  $(DESTDIR)$(INSTPPPDIR)/peers/xisp_$(MODEM_DEV).bak \
 	  $(DESTDIR)$(INSTPPPDIR)/peers/xisp_dialer \
 	  $(DESTDIR)$(INSTPPPDIR)/peers/xisp_dialer.bak
+	for i in $(MODEM_DEVS); do \
+	rm -f $(DESTDIR)$(INSTPPPDIR)/peers/xisp_$${i} \
+	  $(DESTDIR)$(INSTPPPDIR)/peers/xisp_$${i}.bak; \
+	done
 	mv -f $(DESTDIR)$(INSTPPPDIR)/ip-up \
 	  $(DESTDIR)$(INSTPPPDIR)/ip-up.xisp
 	if [ -f $(DESTDIR)$(INSTPPPDIR)/ip-up.bak ]; then \