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
; \
41 $(TARGET_CONFIGURE_OPTS
) \
42 ac_cv_func_setvbuf_reversed
=no \
45 --target
=$(GNU_TARGET_NAME
) \
46 --host
=$(GNU_TARGET_NAME
) \
47 --build
=$(GNU_HOST_NAME
) \
52 --libexecdir
=/usr
/lib \
54 --datadir=/usr
/share \
55 --localstatedir
=/var \
56 --mandir=/usr
/share
/man \
57 --infodir=/usr
/share
/info \
63 rm -rf config.cache
; \
64 $(TARGET_CONFIGURE_OPTS
) \
65 CFLAGS
="$(TARGET_CFLAGS)" \
67 --target
=$(GNU_TARGET_NAME
) \
68 --host
=$(GNU_TARGET_NAME
) \
69 --build
=$(GNU_HOST_NAME
) \
74 --libexecdir
=/usr
/lib \
75 --datadir=/usr
/share \
76 --localstatedir
=/var \
77 --mandir=/usr
/share
/man \
78 --infodir=/usr
/share
/info \
82 touch
$(PPP_DIR
)/.stamp-configured
85 $(PPP_DIR
)/.stamp-built
: $(PPP_DIR
)/.stamp-configured
89 COPTS
="$(TARGET_CFLAGS)" \
92 touch
$(PPP_DIR
)/.stamp-built
95 $(PPP_BUILD_DIR
)/CONTROL
/control
: $(PPP_DIR
)/.stamp-built
96 rm -rf
$(PPP_BUILD_DIR
)
97 mkdir
-p
$(PPP_BUILD_DIR
)/usr
/sbin
98 cp
-a
$(PPP_DIR
)/pppd
/pppd
$(PPP_BUILD_DIR
)/usr
/sbin
/
99 $(STRIP
) $(PPP_BUILD_DIR
)/usr
/sbin
/*
100 cp
-a
$(PPP_IPK_DIR
)/root
/* $(PPP_BUILD_DIR
)/
101 chmod
0755 $(PPP_BUILD_DIR
)/etc
102 chmod
0755 $(PPP_BUILD_DIR
)/etc
/ppp
103 chmod
0600 $(PPP_BUILD_DIR
)/etc
/ppp
/chap-secrets
104 chmod
0644 $(PPP_BUILD_DIR
)/etc
/ppp
/options
105 chmod
0755 $(PPP_BUILD_DIR
)/etc
/ppp
/peers
106 chmod
0755 $(PPP_BUILD_DIR
)/usr
107 chmod
0755 $(PPP_BUILD_DIR
)/usr
/sbin
108 chmod
0755 $(PPP_BUILD_DIR
)/usr
/sbin
/*
109 cp
-a
$(PPP_IPK_DIR
)/CONTROL
$(PPP_BUILD_DIR
)/
110 perl
-pi
-e
"s/^Vers.*:.*$$/Version: $(PPP_VERSION)-$(PPP_RELEASE)/" $(PPP_BUILD_DIR
)/CONTROL
/control
111 perl
-pi
-e
"s/^Arch.*:.*$$/Architecture: $(ARCH)/" $(PPP_BUILD_DIR
)/CONTROL
/control
113 touch
$(PPP_BUILD_DIR
)/CONTROL
/control
116 $(PPP_IPK
): $(PPP_BUILD_DIR
)/CONTROL
/control
117 cd
$(BUILD_DIR
); $(IPKG_BUILD
) $(PPP_BUILD_DIR
)
120 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/CONTROL
/control
: $(PPP_DIR
)/.stamp-built
121 rm -rf
$(PPP_RADIUS_PLUGIN_BUILD_DIR
)
122 mkdir
-p
$(PPP_RADIUS_PLUGIN_BUILD_DIR
)/usr
/lib
/pppd
/$(PPP_VERSION
)
123 cp
-a
$(PPP_DIR
)/pppd
/plugins
/radius
/radius.so
$(PPP_RADIUS_PLUGIN_BUILD_DIR
)/usr
/lib
/pppd
/$(PPP_VERSION
)/
124 $(STRIP
) $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/usr
/lib
/pppd
/$(PPP_VERSION
)/*
125 cp
-a
$(PPP_RADIUS_PLUGIN_IPK_DIR
)/root
/* $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/
126 chmod
0755 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/etc
127 chmod
0755 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/etc
/ppp
128 chmod
0644 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/etc
/ppp
/radius.conf
129 chmod
0755 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/etc
/ppp
/radius
130 chmod
0644 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/etc
/ppp
/radius
/dict
*
131 chmod
0600 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/etc
/ppp
/radius
/servers
132 chmod
0755 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/usr
133 chmod
0755 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/usr
/lib
134 chmod
0755 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/usr
/lib
/pppd
135 chmod
0755 $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/usr
/lib
/pppd
/$(PPP_VERSION
)
136 cp
-a
$(PPP_RADIUS_PLUGIN_IPK_DIR
)/CONTROL
$(PPP_RADIUS_PLUGIN_BUILD_DIR
)/
137 perl
-pi
-e
"s/^Vers.*:.*$$/Version: $(PPP_VERSION)-$(PPP_RELEASE)/" $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/CONTROL
/control
138 perl
-pi
-e
"s/^Arch.*:.*$$/Architecture: $(ARCH)/" $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/CONTROL
/control
140 touch
$(PPP_RADIUS_PLUGIN_BUILD_DIR
)/CONTROL
/control
143 $(PPP_RADIUS_PLUGIN_IPK
): $(PPP_RADIUS_PLUGIN_BUILD_DIR
)/CONTROL
/control
144 cd
$(BUILD_DIR
); $(IPKG_BUILD
) $(PPP_RADIUS_PLUGIN_BUILD_DIR
)
147 ppp-ipk
: ipkg-utils
$(PPP_IPK
) $(PPP_RADIUS_PLUGIN_IPK
)
150 rm -rf
$(PPP_IPK
) $(PPP_RADIUS_PLUGIN_IPK
)
151 rm -rf
$(PPP_BUILD_DIR
) $(PPP_RADIUS_PLUGIN_BUILD_DIR
)