1 ## ppp & ppp-radius-plugin
6 PPP_SOURCE
:=ppp-
$(PPP_VERSION
).
tar.gz
7 PPP_SITE
:=ftp
://ftp.samba.org
/pub
/ppp
8 PPP_DIR
:=$(BUILD_DIR
)/ppp-
$(PPP_VERSION
)
11 PPP_PATCH_DIR
:= $(SOURCE_DIR
)/openwrt
/patches
/ppp
13 PPP_BUILD_DIR
:= $(BUILD_DIR
)/ppp_
$(PPP_VERSION
)-$(PPP_RELEASE
)
14 PPP_IPK_DIR
:= $(OPENWRT_IPK_DIR
)/ppp
15 PPP_IPK
:= $(PPP_BUILD_DIR
)_
$(ARCH
).ipk
17 PPP_RADIUS_PLUGIN_BUILD_DIR
:= $(BUILD_DIR
)/ppp-radius-plugin_
$(PPP_VERSION
)-$(PPP_RELEASE
)
18 PPP_RADIUS_PLUGIN_IPK_DIR
:= $(OPENWRT_IPK_DIR
)/ppp-radius-plugin
19 PPP_RADIUS_PLUGIN_IPK
:= $(PPP_RADIUS_PLUGIN_BUILD_DIR
)_
$(ARCH
).ipk
22 $(DL_DIR
)/$(PPP_SOURCE
):
23 $(WGET
) -P
$(DL_DIR
) $(PPP_SITE
)/$(PPP_SOURCE
)
26 $(PPP_DIR
)/.stamp-unpacked
: $(DL_DIR
)/$(PPP_SOURCE
)
27 $(PPP_CAT
) $(DL_DIR
)/$(PPP_SOURCE
) |
tar -C
$(BUILD_DIR
) -xvf
-
29 touch
$(PPP_DIR
)/.stamp-unpacked
32 $(PPP_DIR
)/.stamp-patched
: $(PPP_DIR
)/.stamp-unpacked
33 $(SOURCE_DIR
)/patch-kernel.sh
$(PPP_DIR
) $(PPP_PATCH_DIR
)
35 touch
$(PPP_DIR
)/.stamp-patched
38 $(PPP_DIR
)/.stamp-configured
: $(PPP_DIR
)/.stamp-patched
39 cd
$(PPP_DIR
)/pppd
/plugins
/radius
/radiusclient
; \
40 rm -rf config.cache
; \
42 $(TARGET_CONFIGURE_OPTS
) \
43 ac_cv_func_setvbuf_reversed
=no \
46 --target
=$(GNU_TARGET_NAME
) \
47 --host
=$(GNU_TARGET_NAME
) \
48 --build
=$(GNU_HOST_NAME
) \
53 --libexecdir
=/usr
/lib \
55 --datadir=/usr
/share \
56 --localstatedir
=/var \
57 --mandir=/usr
/share
/man \
58 --infodir=/usr
/share
/info \
64 rm -rf config.cache
; \
65 $(TARGET_CONFIGURE_OPTS
) \
66 CFLAGS
="$(TARGET_CFLAGS)" \
68 --target
=$(GNU_TARGET_NAME
) \
69 --host
=$(GNU_TARGET_NAME
) \
70 --build
=$(GNU_HOST_NAME
) \
75 --libexecdir
=/usr
/lib \
76 --datadir=/usr
/share \
77 --localstatedir
=/var \
78 --mandir=/usr
/share
/man \
79 --infodir=/usr
/share
/info \
83 touch
$(PPP_DIR
)/.stamp-configured
86 $(PPP_DIR
)/.stamp-built
: $(PPP_DIR
)/.stamp-configured
90 COPTS
="$(TARGET_CFLAGS)" \
93 touch
$(PPP_DIR
)/.stamp-built
96 $(PPP_BUILD_DIR
)/CONTROL
/control
: $(PPP_DIR
)/.stamp-built
97 rm -rf
$(PPP_BUILD_DIR
)
98 mkdir
-p
$(PPP_BUILD_DIR
)/usr
/sbin
99 cp
-a
$(PPP_DIR
)/pppd
/pppd
$(PPP_BUILD_DIR
)/usr
/sbin
/
100 $(STRIP
) $(PPP_BUILD_DIR
)/usr
/sbin
/*
101 cp
-a
$(PPP_IPK_DIR
)/root
/* $(PPP_BUILD_DIR
)/
102 chmod
0755 $(PPP_BUILD_DIR
)/etc
103 chmod
0755 $(PPP_BUILD_DIR
)/etc
/ppp
104 chmod
0600 $(PPP_BUILD_DIR
)/etc
/ppp
/chap-secrets
105 chmod
0644 $(PPP_BUILD_DIR
)/etc
/ppp
/options
106 chmod
0755 $(PPP_BUILD_DIR
)/etc
/ppp
/peers
107 chmod
0755 $(PPP_BUILD_DIR
)/usr
108 chmod
0755 $(PPP_BUILD_DIR
)/usr
/sbin
109 chmod
0755 $(PPP_BUILD_DIR
)/usr
/sbin
/*
110 cp
-a
$(PPP_IPK_DIR
)/CONTROL
$(PPP_BUILD_DIR
)/
111 perl
-pi
-e
"s/^Vers.*:.*$$/Version: $(PPP_VERSION)-$(PPP_RELEASE)/" $(PPP_BUILD_DIR
)/CONTROL
/control
112 perl
-pi
-e
"s/^Arch.*:.*$$/Architecture: $(ARCH)/" $(PPP_BUILD_DIR
)/CONTROL
/control
114 touch
$(PPP_BUILD_DIR
)/CONTROL
/control
117 $(PPP_IPK
): $(PPP_BUILD_DIR
)/CONTROL
/control
118 cd
$(BUILD_DIR
); $(IPKG_BUILD
) $(PPP_BUILD_DIR
)
121 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/CONTROL
/control
: $(PPP_DIR
)/.stamp-built
122 rm -rf
$(PPP_RADIUS_PLUGIN_BUILD_DIR
)
123 mkdir
-p
$(PPP_RADIUS_PLUGIN_BUILD_DIR
)/usr
/lib
/pppd
/$(PPP_VERSION
)
124 cp
-a
$(PPP_DIR
)/pppd
/plugins
/radius
/radius.so
$(PPP_RADIUS_PLUGIN_BUILD_DIR
)/usr
/lib
/pppd
/$(PPP_VERSION
)/
125 $(STRIP
) $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/usr
/lib
/pppd
/$(PPP_VERSION
)/*
126 cp
-a
$(PPP_RADIUS_PLUGIN_IPK_DIR
)/root
/* $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/
127 chmod
0755 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/etc
128 chmod
0755 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/etc
/ppp
129 chmod
0644 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/etc
/ppp
/radius.conf
130 chmod
0755 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/etc
/ppp
/radius
131 chmod
0644 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/etc
/ppp
/radius
/dict
*
132 chmod
0600 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/etc
/ppp
/radius
/servers
133 chmod
0755 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/usr
134 chmod
0755 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/usr
/lib
135 chmod
0755 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/usr
/lib
/pppd
136 chmod
0755 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/usr
/lib
/pppd
/$(PPP_VERSION
)
137 cp
-a
$(PPP_RADIUS_PLUGIN_IPK_DIR
)/CONTROL
$(PPP_RADIUS_PLUGIN_BUILD_DIR
)/
138 perl
-pi
-e
"s/^Vers.*:.*$$/Version: $(PPP_VERSION)-$(PPP_RELEASE)/" $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/CONTROL
/control
139 perl
-pi
-e
"s/^Arch.*:.*$$/Architecture: $(ARCH)/" $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/CONTROL
/control
141 touch
$(PPP_RADIUS_PLUGIN_BUILD_DIR
)/CONTROL
/control
144 $(PPP_RADIUS_PLUGIN_IPK
): $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/CONTROL
/control
145 cd
$(BUILD_DIR
); $(IPKG_BUILD
) $(PPP_RADIUS_PLUGIN_BUILD_DIR
)
148 ppp-ipk
: ipkg-utils
$(PPP_IPK
) $(PPP_RADIUS_PLUGIN_IPK
)
151 rm -rf
$(PPP_IPK
) $(PPP_RADIUS_PLUGIN_IPK
)
152 rm -rf
$(PPP_BUILD_DIR
) $(PPP_RADIUS_PLUGIN_BUILD_DIR
)