ppp: bump to 2.4.6
[openwrt/svn-archive/archive.git] / package / network / services / ppp / Makefile
1 #
2 # Copyright (C) 2006-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=ppp
12 PKG_VERSION:=2.4.6
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
17 PKG_MD5SUM:=3434d2cc9327167a0723aaaa8670083b
18 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
21
22 PKG_BUILD_DEPENDS:=libpcap
23
24 PKG_BUILD_PARALLEL:=1
25 PKG_INSTALL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/ppp/Default
30 SECTION:=net
31 CATEGORY:=Network
32 MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
33 URL:=http://ppp.samba.org/
34 endef
35
36 define Package/ppp
37 $(call Package/ppp/Default)
38 DEPENDS:=+kmod-ppp
39 TITLE:=PPP daemon
40 VARIANT:=default
41 endef
42
43 define Package/ppp-multilink
44 $(call Package/ppp/Default)
45 DEPENDS:=+kmod-ppp
46 TITLE:=PPP daemon (with multilink support)
47 VARIANT:=multilink
48 endef
49
50 define Package/ppp/description
51 This package contains the PPP (Point-to-Point Protocol) daemon.
52 endef
53
54 define Package/ppp/conffiles
55 /etc/ppp/chap-secrets
56 /etc/ppp/filter
57 /etc/ppp/ip-down
58 /etc/ppp/ip-up
59 /etc/ppp/ipv6-down
60 /etc/ppp/ipv6-up
61 /etc/ppp/options
62 endef
63
64 define Package/ppp-mod-pppoa
65 $(call Package/ppp/Default)
66 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +linux-atm +kmod-pppoa
67 TITLE:=PPPoA plugin
68 endef
69
70 define Package/ppp-mod-pppoa/description
71 This package contains a PPPoA (PPP over ATM) plugin for ppp.
72 endef
73
74 define Package/ppp-mod-pppoe
75 $(call Package/ppp/Default)
76 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pppoe
77 TITLE:=PPPoE plugin
78 endef
79
80 define Package/ppp-mod-pppoe/description
81 This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
82 endef
83
84 define Package/ppp-mod-radius
85 $(call Package/ppp/Default)
86 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
87 TITLE:=RADIUS plugin
88 endef
89
90 define Package/ppp-mod-radius/description
91 This package contains a RADIUS (Remote Authentication Dial-In User Service)
92 plugin for ppp.
93 endef
94
95 define Package/ppp-mod-radius/conffiles
96 /etc/ppp/radius.conf
97 /etc/ppp/radius/
98 endef
99
100 define Package/ppp-mod-pppol2tp
101 $(call Package/ppp/Default)
102 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pppol2tp
103 TITLE:=PPPoL2TP plugin
104 endef
105
106 define Package/ppp-mod-pppol2tp/description
107 This package contains a PPPoL2TP (PPP over L2TP) plugin for ppp.
108 endef
109
110 define Package/ppp-mod-pptp
111 $(call Package/ppp/Default)
112 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pptp +kmod-mppe +resolveip
113 TITLE:=PPtP plugin
114 endef
115
116 define Package/ppp-mod-pptp/description
117 This package contains a PPtP plugin for ppp.
118 endef
119
120 define Package/chat
121 $(call Package/ppp/Default)
122 TITLE:=Establish conversation with a modem
123 endef
124
125 define Package/chat/description
126 This package contains an utility to establish conversation with other PPP servers
127 (via a modem).
128 endef
129
130 define Package/pppdump
131 $(call Package/ppp/Default)
132 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
133 TITLE:=Read PPP record file
134 endef
135
136 define Package/pppdump/description
137 This package contains an utility to read PPP record file.
138 endef
139
140 define Package/pppstats
141 $(call Package/ppp/Default)
142 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
143 TITLE:=Report PPP statistics
144 endef
145
146 define Package/pppstats/description
147 This package contains an utility to report PPP statistics.
148 endef
149
150
151 define Build/Configure
152 $(call Build/Configure/Default,, \
153 UNAME_S="Linux" \
154 UNAME_R="$(LINUX_VERSION)" \
155 UNAME_M="$(ARCH)" \
156 )
157 mkdir -p $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux
158 cp \
159 $(LINUX_DIR)/include/linux/compiler.h \
160 $(LINUX_DIR)/include/$(LINUX_UAPI_DIR)linux/atm*.h \
161 $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/
162 endef
163
164 MAKE_FLAGS += COPTS="$(TARGET_CFLAGS)" \
165 PRECOMPILED_FILTER=1 \
166 STAGING_DIR="$(STAGING_DIR)"
167
168 ifeq ($(BUILD_VARIANT),multilink)
169 MAKE_FLAGS += HAVE_MULTILINK=y
170 else
171 MAKE_FLAGS += HAVE_MULTILINK=
172 endif
173
174
175 define Build/InstallDev
176 $(INSTALL_DIR) $(1)/usr/include
177 $(CP) $(PKG_INSTALL_DIR)/include/pppd $(1)/usr/include/
178 endef
179
180 define Package/ppp/script_install
181 endef
182
183 define Package/ppp/install
184 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
185 $(INSTALL_DIR) $(1)/usr/sbin
186 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppd $(1)/usr/sbin/
187 $(INSTALL_DIR) $(1)/etc/ppp
188 $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
189 $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
190 $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
191 ln -sf /tmp/resolv.conf.ppp $(1)/etc/ppp/resolv.conf
192 $(INSTALL_DIR) $(1)/lib/netifd/proto
193 $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/netifd/proto/
194 $(INSTALL_BIN) ./files/lib/netifd/ppp-up $(1)/lib/netifd/
195 $(INSTALL_BIN) ./files/lib/netifd/ppp-down $(1)/lib/netifd/
196 endef
197 Package/ppp-multilink/install=$(Package/ppp/install)
198
199 define Package/ppp-mod-pppoa/install
200 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
201 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/pppoatm.so \
202 $(1)/usr/lib/pppd/$(PKG_VERSION)/
203 endef
204
205 define Package/ppp-mod-pppoe/install
206 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
207 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
208 $(1)/usr/lib/pppd/$(PKG_VERSION)/
209 endef
210
211 define Package/ppp-mod-radius/install
212 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
213 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/radius.so \
214 $(1)/usr/lib/pppd/$(PKG_VERSION)/
215 $(INSTALL_DIR) $(1)/etc/ppp
216 $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
217 $(INSTALL_DIR) $(1)/etc/ppp/radius
218 $(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
219 $(1)/etc/ppp/radius/
220 $(INSTALL_CONF) ./files/etc/ppp/radius/servers \
221 $(1)/etc/ppp/radius/
222 endef
223
224 define Package/ppp-mod-pppol2tp/install
225 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
226 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/pppol2tp.so \
227 $(1)/usr/lib/pppd/$(PKG_VERSION)/
228 endef
229
230 define Package/ppp-mod-pptp/install
231 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
232 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/pptp.so \
233 $(1)/usr/lib/pppd/$(PKG_VERSION)/
234 $(INSTALL_DIR) $(1)/etc/ppp
235 $(INSTALL_DATA) ./files/etc/ppp/options.pptp $(1)/etc/ppp/
236 endef
237
238 define Package/chat/install
239 $(INSTALL_DIR) $(1)/usr/sbin
240 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/chat $(1)/usr/sbin/
241 endef
242
243 define Package/pppdump/install
244 $(INSTALL_DIR) $(1)/usr/sbin
245 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppdump $(1)/usr/sbin/
246 endef
247
248 define Package/pppstats/install
249 $(INSTALL_DIR) $(1)/usr/sbin
250 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppstats $(1)/usr/sbin/
251 endef
252
253 $(eval $(call BuildPackage,ppp))
254 $(eval $(call BuildPackage,ppp-multilink))
255 $(eval $(call BuildPackage,ppp-mod-pppoa))
256 $(eval $(call BuildPackage,ppp-mod-pppoe))
257 $(eval $(call BuildPackage,ppp-mod-radius))
258 $(eval $(call BuildPackage,ppp-mod-pppol2tp))
259 $(eval $(call BuildPackage,ppp-mod-pptp))
260 $(eval $(call BuildPackage,chat))
261 $(eval $(call BuildPackage,pppdump))
262 $(eval $(call BuildPackage,pppstats))