fix md5sum of radvd
[openwrt/svn-archive/archive.git] / net / rp-pppoe / patches / rp-pppoe-3.5-Makefile.patch
1 diff -ruN rp-pppoe-3.5-orig/src/Makefile.in rp-pppoe-3.5-4/src/Makefile.in
2 --- rp-pppoe-3.5-orig/src/Makefile.in 2002-07-08 16:38:24.000000000 +0200
3 +++ rp-pppoe-3.5-4/src/Makefile.in 2005-03-09 16:37:38.000000000 +0100
4 @@ -62,21 +62,23 @@
5 TARGETS=@TARGETS@
6 PPPOE_SERVER_LIBS=$(LIC_LIBDIR) $(LIC_LIB)
7
8 +LIBS="-lc"
9 +
10 all: $(TARGETS)
11 @echo ""
12 @echo "Type 'make install' as root to install the software."
13
14 pppoe-sniff: pppoe-sniff.o if.o common.o debug.o
15 - @CC@ -o pppoe-sniff pppoe-sniff.o if.o common.o debug.o
16 + @CC@ $(CFLAGS) -o pppoe-sniff pppoe-sniff.o if.o common.o debug.o $(LIBS)
17
18 pppoe-server: pppoe-server.o if.o debug.o common.o md5.o libevent/libevent.a @PPPOE_SERVER_DEPS@
19 - @CC@ -o pppoe-server @RDYNAMIC@ pppoe-server.o if.o debug.o common.o md5.o $(PPPOE_SERVER_LIBS) -Llibevent -levent
20 + @CC@ $(CFLAGS) -o pppoe-server @RDYNAMIC@ pppoe-server.o if.o debug.o common.o md5.o $(PPPOE_SERVER_LIBS) -Llibevent -levent $(LIBS)
21
22 pppoe: pppoe.o if.o debug.o common.o ppp.o discovery.o
23 - @CC@ -o pppoe pppoe.o if.o debug.o common.o ppp.o discovery.o
24 + @CC@ $(CFLAGS) -o pppoe pppoe.o if.o debug.o common.o ppp.o discovery.o $(LIBS)
25
26 pppoe-relay: relay.o if.o debug.o common.o
27 - @CC@ -o pppoe-relay relay.o if.o debug.o common.o
28 + @CC@ $(CFLAGS) -o pppoe-relay relay.o if.o debug.o common.o $(LIBS)
29
30 pppoe.o: pppoe.c pppoe.h
31 @CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o pppoe.o pppoe.c
32 @@ -119,7 +121,7 @@
33 @CC@ '-DRP_VERSION="$(VERSION)"' $(CFLAGS) -I$(PPPD_INCDIR) -c -o plugin/plugin.o -fPIC plugin.c
34
35 plugin/libplugin.a: plugin/discovery.o plugin/if.o plugin/common.o plugin/debug.o
36 - ar -rc $@ $^
37 + $(AR) -rc $@ $^
38
39 plugin/discovery.o: discovery.c
40 @CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o plugin/discovery.o -fPIC discovery.c
41 @@ -134,78 +136,78 @@
42 @CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o plugin/common.o -fPIC common.c
43
44 install: all
45 - -mkdir -p $(RPM_INSTALL_ROOT)$(sbindir)
46 - $(install) -m 755 -s pppoe $(RPM_INSTALL_ROOT)$(sbindir)
47 - $(install) -m 755 -s pppoe-server $(RPM_INSTALL_ROOT)$(sbindir)
48 - if test -x licensed-only/pppoe-server-control ; then $(install) -m 755 -s licensed-only/pppoe-server-control $(RPM_INSTALL_ROOT)$(sbindir); fi
49 - if test -x pppoe-relay ; then $(install) -m 755 -s pppoe-relay $(RPM_INSTALL_ROOT)$(sbindir); fi
50 - if test -x pppoe-sniff; then $(install) -m 755 -s pppoe-sniff $(RPM_INSTALL_ROOT)$(sbindir); fi
51 - $(install) -m 755 ../scripts/adsl-connect $(RPM_INSTALL_ROOT)$(sbindir)
52 - $(install) -m 755 ../scripts/adsl-start $(RPM_INSTALL_ROOT)$(sbindir)
53 - $(install) -m 755 ../scripts/adsl-status $(RPM_INSTALL_ROOT)$(sbindir)
54 - $(install) -m 755 ../scripts/adsl-stop $(RPM_INSTALL_ROOT)$(sbindir)
55 - $(install) -m 755 ../scripts/adsl-setup $(RPM_INSTALL_ROOT)$(sbindir)
56 - -mkdir -p $(RPM_INSTALL_ROOT)$(docdir)
57 - $(install) -m 644 ../doc/CHANGES $(RPM_INSTALL_ROOT)$(docdir)
58 - $(install) -m 644 ../doc/KERNEL-MODE-PPPOE $(RPM_INSTALL_ROOT)$(docdir)
59 - $(install) -m 644 ../doc/HOW-TO-CONNECT $(RPM_INSTALL_ROOT)$(docdir)
60 - $(install) -m 644 ../doc/LICENSE $(RPM_INSTALL_ROOT)$(docdir)
61 - $(install) -m 644 ../README $(RPM_INSTALL_ROOT)$(docdir)
62 - $(install) -m 644 ../SERVPOET $(RPM_INSTALL_ROOT)$(docdir)
63 - $(install) -m 644 ../configs/pap-secrets $(RPM_INSTALL_ROOT)$(docdir)
64 - -mkdir -p $(RPM_INSTALL_ROOT)$(mandir)/man8
65 + -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
66 + $(install) -m 755 pppoe $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
67 + $(install) -m 755 pppoe-server $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
68 + if test -x licensed-only/pppoe-server-control ; then $(install) -m 755 licensed-only/pppoe-server-control $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir); fi
69 + if test -x pppoe-relay ; then $(install) -m 755 pppoe-relay $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir); fi
70 + if test -x pppoe-sniff; then $(install) -m 755 pppoe-sniff $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir); fi
71 + $(install) -m 755 ../scripts/adsl-connect $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
72 + $(install) -m 755 ../scripts/adsl-start $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
73 + $(install) -m 755 ../scripts/adsl-status $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
74 + $(install) -m 755 ../scripts/adsl-stop $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
75 + $(install) -m 755 ../scripts/adsl-setup $(RPM_INSTALL_ROOT)$(DESTDIR)$(sbindir)
76 + -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir)
77 + $(install) -m 644 ../doc/CHANGES $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir)
78 + $(install) -m 644 ../doc/KERNEL-MODE-PPPOE $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir)
79 + $(install) -m 644 ../doc/HOW-TO-CONNECT $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir)
80 + $(install) -m 644 ../doc/LICENSE $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir)
81 + $(install) -m 644 ../README $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir)
82 + $(install) -m 644 ../SERVPOET $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir)
83 + $(install) -m 644 ../configs/pap-secrets $(RPM_INSTALL_ROOT)$(DESTDIR)$(docdir)
84 + -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8
85 for i in $(TARGETS) ; do \
86 if test -f ../man/$$i.8 ; then \
87 - $(install) -m 644 ../man/$$i.8 $(RPM_INSTALL_ROOT)$(mandir)/man8 || exit 1; \
88 + $(install) -m 644 ../man/$$i.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8 || exit 1; \
89 fi; \
90 done
91 - $(install) -m 644 ../man/adsl-start.8 $(RPM_INSTALL_ROOT)$(mandir)/man8
92 - $(install) -m 644 ../man/adsl-stop.8 $(RPM_INSTALL_ROOT)$(mandir)/man8
93 - $(install) -m 644 ../man/adsl-status.8 $(RPM_INSTALL_ROOT)$(mandir)/man8
94 - $(install) -m 644 ../man/adsl-connect.8 $(RPM_INSTALL_ROOT)$(mandir)/man8
95 - $(install) -m 644 ../man/adsl-setup.8 $(RPM_INSTALL_ROOT)$(mandir)/man8
96 - -mkdir -p $(RPM_INSTALL_ROOT)$(mandir)/man5
97 - $(install) -m 644 ../man/pppoe.conf.5 $(RPM_INSTALL_ROOT)$(mandir)/man5
98 - -mkdir -p $(RPM_INSTALL_ROOT)/etc/ppp
99 - -mkdir -p $(RPM_INSTALL_ROOT)$(PLUGIN_DIR)
100 - -echo "# Directory created by rp-pppoe for kernel-mode plugin" > $(RPM_INSTALL_ROOT)$(PLUGIN_DIR)/README
101 - @if test -r rp-pppoe.so; then $(install) -m 755 rp-pppoe.so $(RPM_INSTALL_ROOT)$(PLUGIN_DIR); fi
102 - @for i in pppoe.conf firewall-standalone firewall-masq ; do \
103 - if [ ! -f $(RPM_INSTALL_ROOT)/etc/ppp/$$i ] ; then \
104 - $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)/etc/ppp ; \
105 + $(install) -m 644 ../man/adsl-start.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8
106 + $(install) -m 644 ../man/adsl-stop.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8
107 + $(install) -m 644 ../man/adsl-status.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8
108 + $(install) -m 644 ../man/adsl-connect.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8
109 + $(install) -m 644 ../man/adsl-setup.8 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man8
110 + -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man5
111 + $(install) -m 644 ../man/pppoe.conf.5 $(RPM_INSTALL_ROOT)$(DESTDIR)$(mandir)/man5
112 + -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/ppp
113 + -mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)$(PLUGIN_DIR)
114 + -echo "# Directory created by rp-pppoe for kernel-mode plugin" > $(RPM_INSTALL_ROOT)$(DESTDIR)$(PLUGIN_DIR)/README
115 + @if test -r rp-pppoe.so; then $(install) -m 755 rp-pppoe.so $(RPM_INSTALL_ROOT)$(DESTDIR)$(PLUGIN_DIR); fi
116 + @for i in pppoe.conf; do \
117 + if [ ! -f $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/$$i ] ; then \
118 + $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)$(DESTDIR)/etc ; \
119 else \
120 - echo "NOT overwriting existing $(RPM_INSTALL_ROOT)/etc/ppp/$$i" ;\
121 - $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)/etc/ppp/$$i-$(VERSION) ;\
122 + echo "NOT overwriting existing $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/$$i" ;\
123 + $(install) -m 644 ../configs/$$i $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/$$i-$(VERSION) ;\
124 fi ;\
125 done
126 - @if [ ! -f $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS) ] ; then \
127 - $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS) ; \
128 + @if [ ! -f $(RPM_INSTALL_ROOT)$(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS) ] ; then \
129 + $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS) ; \
130 else \
131 - echo "NOT overwriting existing $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS)"; \
132 - $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(PPPOESERVER_PPPD_OPTIONS)-example ; \
133 + echo "NOT overwriting existing $(RPM_INSTALL_ROOT)$(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS)"; \
134 + $(install) -m 644 ../configs/pppoe-server-options $(RPM_INSTALL_ROOT)$(DESTDIR)$(PPPOESERVER_PPPD_OPTIONS)-example ; \
135 fi
136 @if [ -f /etc/redhat-release ] ; then \
137 - echo "Looks like a Red Hat system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \
138 - mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\
139 - $(install) -m 755 ../scripts/adsl-init $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \
140 + echo "Looks like a Red Hat system; installing $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl" ; \
141 + mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d ;\
142 + $(install) -m 755 ../scripts/adsl-init $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl ; \
143 fi
144 @if [ -f /etc/turbolinux-release ] ; then \
145 - echo "Looks like a TurboLinux system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \
146 - mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\
147 - $(install) -m 755 ../scripts/adsl-init-turbolinux $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \
148 + echo "Looks like a TurboLinux system; installing $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl" ; \
149 + mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d ;\
150 + $(install) -m 755 ../scripts/adsl-init-turbolinux $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl ; \
151 fi
152 @if [ -f /etc/SuSE-release ] ; then \
153 - echo "Looks like a SuSE Linux system; installing $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl" ; \
154 - mkdir -p $(RPM_INSTALL_ROOT)/etc/rc.d/init.d ;\
155 - $(install) -m 755 ../scripts/adsl-init-suse $(RPM_INSTALL_ROOT)/etc/rc.d/init.d/adsl ; \
156 + echo "Looks like a SuSE Linux system; installing $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl" ; \
157 + mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d ;\
158 + $(install) -m 755 ../scripts/adsl-init-suse $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/rc.d/init.d/adsl ; \
159 fi
160
161 # L2TP
162 @if [ -f l2tp/handlers/sync-pppd.so ] ; then \
163 - mkdir -p $(RPM_INSTALL_ROOT)/usr/lib/l2tp/plugins ; \
164 - $(install) -m 755 l2tp/handlers/sync-pppd.so $(RPM_INSTALL_ROOT)/usr/lib/l2tp/plugins ; \
165 - mkdir -p $(RPM_INSTALL_ROOT)/etc/l2tp ; \
166 - $(install) -m 600 l2tp/l2tp.conf $(RPM_INSTALL_ROOT)/etc/l2tp/l2tp.conf.example ; \
167 + mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/usr/lib/l2tp/plugins ; \
168 + $(install) -m 755 l2tp/handlers/sync-pppd.so $(RPM_INSTALL_ROOT)$(DESTDIR)/usr/lib/l2tp/plugins ; \
169 + mkdir -p $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp ; \
170 + $(install) -m 600 l2tp/l2tp.conf $(RPM_INSTALL_ROOT)$(DESTDIR)/etc/l2tp/l2tp.conf.example ; \
171 fi
172 @echo ""
173 @echo "Type 'adsl-setup' to configure the software."
174 @@ -288,7 +290,7 @@
175 cd .. && rpm -ba servpoet.spec
176
177 clean:
178 - rm -f *.o pppoe pppoe-sniff pppoe-server core rp-pppoe.so plugin/*.o plugin/libplugin.a *~
179 + rm -f *.o pppoe pppoe-relay pppoe-sniff pppoe-server core rp-pppoe.so plugin/*.o plugin/libplugin.a *~
180 test -f licensed-only/Makefile && $(MAKE) -C licensed-only clean || true
181 test -f libevent/Makefile && $(MAKE) -C libevent clean || true
182 test -f l2tp/Makefile && $(MAKE) -C l2tp clean || true
183 diff -ruN rp-pppoe-3.5-orig/src/libevent/Makefile.in rp-pppoe-3.5-4/src/libevent/Makefile.in
184 --- rp-pppoe-3.5-orig/src/libevent/Makefile.in 2002-07-08 16:38:24.000000000 +0200
185 +++ rp-pppoe-3.5-4/src/libevent/Makefile.in 2005-03-09 16:37:38.000000000 +0100
186 @@ -18,24 +18,24 @@
187
188 libevent.a: $(OBJS)
189 rm -f libevent.a
190 - ar -cq libevent.a $(OBJS)
191 + $(AR) r libevent.a $(OBJS)
192 @RANLIB@ libevent.a
193
194 event.o: event.c $(HDRS)
195 - gcc $(CFLAGS) -c -o event.o event.c
196 + @CC@ $(CFLAGS) -c -o event.o event.c
197
198 hash.o: hash.c $(HDRS)
199 - gcc $(CFLAGS) -c -o hash.o hash.c
200 + @CC@ $(CFLAGS) -c -o hash.o hash.c
201
202 event_sig.o: event_sig.c $(HDRS)
203 - gcc $(CFLAGS) -c -o event_sig.o event_sig.c
204 + @CC@ $(CFLAGS) -c -o event_sig.o event_sig.c
205
206 event_tcp.o: event_tcp.c $(HDRS)
207 - gcc $(CFLAGS) -c -o event_tcp.o event_tcp.c
208 + @CC@ $(CFLAGS) -c -o event_tcp.o event_tcp.c
209
210 clean: FORCE
211 rm -f *.a *.o *~
212
213 FORCE:
214
215 -.phony: FORCE
216 \ No newline at end of file
217 +.phony: FORCE