fix ar7 flash map driver handling of jffs2 images
[openwrt.git] / obsolete-buildroot / make / ppp.mk
1 ## ppp & ppp-radius-plugin
2
3 PPP_VERSION := 2.4.2
4 PPP_RELEASE := 1
5
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)
9 PPP_CAT:=zcat
10
11 PPP_PATCH_DIR := $(SOURCE_DIR)/openwrt/patches/ppp
12
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
16
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
20
21
22 $(DL_DIR)/$(PPP_SOURCE):
23 $(WGET) -P $(DL_DIR) $(PPP_SITE)/$(PPP_SOURCE)
24
25
26 $(PPP_DIR)/.stamp-unpacked: $(DL_DIR)/$(PPP_SOURCE)
27 $(PPP_CAT) $(DL_DIR)/$(PPP_SOURCE) | tar -C $(BUILD_DIR) -xvf -
28
29 touch $(PPP_DIR)/.stamp-unpacked
30
31
32 $(PPP_DIR)/.stamp-patched: $(PPP_DIR)/.stamp-unpacked
33 $(SOURCE_DIR)/patch-kernel.sh $(PPP_DIR) $(PPP_PATCH_DIR)
34
35 touch $(PPP_DIR)/.stamp-patched
36
37
38 $(PPP_DIR)/.stamp-configured: $(PPP_DIR)/.stamp-patched
39 cd $(PPP_DIR)/pppd/plugins/radius/radiusclient ; \
40 rm -rf config.cache ; \
41 echo > aclocal.m4; \
42 $(TARGET_CONFIGURE_OPTS) \
43 ac_cv_func_setvbuf_reversed=no \
44 ac_cv_func_uname=no \
45 ./configure \
46 --target=$(GNU_TARGET_NAME) \
47 --host=$(GNU_TARGET_NAME) \
48 --build=$(GNU_HOST_NAME) \
49 --prefix=/usr \
50 --exec-prefix=/usr \
51 --bindir=/usr/bin \
52 --sbindir=/usr/sbin \
53 --libexecdir=/usr/lib \
54 --sysconfdir=/etc \
55 --datadir=/usr/share \
56 --localstatedir=/var \
57 --mandir=/usr/share/man \
58 --infodir=/usr/share/info \
59 $(DISABLE_NLS) \
60 --disable-shared \
61 --enable-static \
62
63 cd $(PPP_DIR) ; \
64 rm -rf config.cache ; \
65 $(TARGET_CONFIGURE_OPTS) \
66 CFLAGS="$(TARGET_CFLAGS)" \
67 ./configure \
68 --target=$(GNU_TARGET_NAME) \
69 --host=$(GNU_TARGET_NAME) \
70 --build=$(GNU_HOST_NAME) \
71 --prefix=/usr \
72 --exec-prefix=/usr \
73 --bindir=/usr/bin \
74 --sbindir=/usr/sbin \
75 --libexecdir=/usr/lib \
76 --datadir=/usr/share \
77 --localstatedir=/var \
78 --mandir=/usr/share/man \
79 --infodir=/usr/share/info \
80 --sysconfdir=/etc \
81 $(DISABLE_NLS) \
82
83 touch $(PPP_DIR)/.stamp-configured
84
85
86 $(PPP_DIR)/.stamp-built: $(PPP_DIR)/.stamp-configured
87 cd $(PPP_DIR) ; \
88 $(MAKE) \
89 CC=$(TARGET_CC) \
90 COPTS="$(TARGET_CFLAGS)" \
91 all
92
93 touch $(PPP_DIR)/.stamp-built
94
95
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
113
114 touch $(PPP_BUILD_DIR)/CONTROL/control
115
116
117 $(PPP_IPK): $(PPP_BUILD_DIR)/CONTROL/control
118 cd $(BUILD_DIR); $(IPKG_BUILD) $(PPP_BUILD_DIR)
119
120
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
140
141 touch $(PPP_RADIUS_PLUGIN_BUILD_DIR)/CONTROL/control
142
143
144 $(PPP_RADIUS_PLUGIN_IPK): $(PPP_RADIUS_PLUGIN_BUILD_DIR)/CONTROL/control
145 cd $(BUILD_DIR); $(IPKG_BUILD) $(PPP_RADIUS_PLUGIN_BUILD_DIR)
146
147
148 ppp-ipk: ipkg-utils $(PPP_IPK) $(PPP_RADIUS_PLUGIN_IPK)
149
150 ppp-ipk-clean:
151 rm -rf $(PPP_IPK) $(PPP_RADIUS_PLUGIN_IPK)
152 rm -rf $(PPP_BUILD_DIR) $(PPP_RADIUS_PLUGIN_BUILD_DIR)
153
154 ppp-clean:
155 cd $(PPP_DIR) ; \
156 $(MAKE) clean
157
158 ppp-dirclean:
159 rm -rf $(PPP_DIR)
160
161
This page took 0.07042 seconds and 5 git commands to generate.