36481bb75bc9eb590be81bf6493f42d6cfabbce6
[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 $(TARGET_CONFIGURE_OPTS) \
42 ac_cv_func_setvbuf_reversed=no \
43 ac_cv_func_uname=no \
44 ./configure \
45 --target=$(GNU_TARGET_NAME) \
46 --host=$(GNU_TARGET_NAME) \
47 --build=$(GNU_HOST_NAME) \
48 --prefix=/usr \
49 --exec-prefix=/usr \
50 --bindir=/usr/bin \
51 --sbindir=/usr/sbin \
52 --libexecdir=/usr/lib \
53 --sysconfdir=/etc \
54 --datadir=/usr/share \
55 --localstatedir=/var \
56 --mandir=/usr/share/man \
57 --infodir=/usr/share/info \
58 $(DISABLE_NLS) \
59 --disable-shared \
60 --enable-static \
61
62 cd $(PPP_DIR) ; \
63 rm -rf config.cache ; \
64 $(TARGET_CONFIGURE_OPTS) \
65 CFLAGS="$(TARGET_CFLAGS)" \
66 ./configure \
67 --target=$(GNU_TARGET_NAME) \
68 --host=$(GNU_TARGET_NAME) \
69 --build=$(GNU_HOST_NAME) \
70 --prefix=/usr \
71 --exec-prefix=/usr \
72 --bindir=/usr/bin \
73 --sbindir=/usr/sbin \
74 --libexecdir=/usr/lib \
75 --datadir=/usr/share \
76 --localstatedir=/var \
77 --mandir=/usr/share/man \
78 --infodir=/usr/share/info \
79 --sysconfdir=/etc \
80 $(DISABLE_NLS) \
81
82 touch $(PPP_DIR)/.stamp-configured
83
84
85 $(PPP_DIR)/.stamp-built: $(PPP_DIR)/.stamp-configured
86 cd $(PPP_DIR) ; \
87 $(MAKE) \
88 CC=$(TARGET_CC) \
89 COPTS="$(TARGET_CFLAGS)" \
90 all
91
92 touch $(PPP_DIR)/.stamp-built
93
94
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
112
113 touch $(PPP_BUILD_DIR)/CONTROL/control
114
115
116 $(PPP_IPK): $(PPP_BUILD_DIR)/CONTROL/control
117 cd $(BUILD_DIR); $(IPKG_BUILD) $(PPP_BUILD_DIR)
118
119
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
139
140 touch $(PPP_RADIUS_PLUGIN_BUILD_DIR)/CONTROL/control
141
142
143 $(PPP_RADIUS_PLUGIN_IPK): $(PPP_RADIUS_PLUGIN_BUILD_DIR)/CONTROL/control
144 cd $(BUILD_DIR); $(IPKG_BUILD) $(PPP_RADIUS_PLUGIN_BUILD_DIR)
145
146
147 ppp-ipk: ipkg-utils $(PPP_IPK) $(PPP_RADIUS_PLUGIN_IPK)
148
149 ppp-ipk-clean:
150 rm -rf $(PPP_IPK) $(PPP_RADIUS_PLUGIN_IPK)
151 rm -rf $(PPP_BUILD_DIR) $(PPP_RADIUS_PLUGIN_BUILD_DIR)
152
153 ppp-clean:
154 cd $(PPP_DIR) ; \
155 $(MAKE) clean
156
157 ppp-dirclean:
158 rm -rf $(PPP_DIR)
159
160
This page took 0.059488 seconds and 3 git commands to generate.