]> git.ipfire.org Git - thirdparty/openwrt.git/blob
6c8ce49
[thirdparty/openwrt.git] /
1 #
2 # Copyright (C) 2006-2015 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.5.3
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=https://download.samba.org/pub/ppp
17 PKG_HASH:=ddda28dec8aca99a403ab6070d94ffd2b17d63e9a4c5509158e99e148f572d4f
18
19 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
20 PKG_LICENSE:=BSD-4-Clause
21 PKG_CPE_ID:=cpe:/a:point-to-point_protocol_project:point-to-point_protocol
22
23 PKG_ASLR_PIE_REGULAR:=1
24 PKG_BUILD_DEPENDS:=libpcap
25 PKG_BUILD_FLAGS:=gc-sections lto
26 PKG_BUILD_PARALLEL:=1
27 PKG_FIXUP:=autoreconf
28 PKG_INSTALL:=1
29
30 include $(INCLUDE_DIR)/package.mk
31 CONFIGURE_ARGS += \
32 --disable-cbcp \
33 --disable-eaptls \
34 --disable-mslanman \
35 --disable-openssl-engine \
36 --disable-peap \
37 --disable-systemd \
38 --enable-ipv6cp \
39 --enable-microsoft-extensions \
40 --enable-plugins \
41 --with-atm \
42 --with-static-pcap \
43 --without-openssl \
44 --without-pam \
45 --without-pcap \
46 --without-srp
47
48 define Package/ppp/Default
49 SECTION:=net
50 CATEGORY:=Network
51 URL:=https://ppp.samba.org/
52 endef
53
54 define Package/ppp
55 $(call Package/ppp/Default)
56 DEPENDS:= +USE_GLIBC:libcrypt-compat +kmod-ppp +ucode +ucode-mod-fs +ucode-mod-resolv +ucode-mod-ubus
57 TITLE:=PPP daemon
58 VARIANT:=default
59 endef
60
61 define Package/ppp-multilink
62 $(call Package/ppp/Default)
63 DEPENDS:= +USE_GLIBC:libcrypt-compat +kmod-ppp +ucode +ucode-mod-fs +ucode-mod-resolv +ucode-mod-ubus
64 TITLE:=PPP daemon (with multilink support)
65 VARIANT:=multilink
66 endef
67
68 define Package/ppp/description
69 This package contains the PPP (Point-to-Point Protocol) daemon.
70 endef
71
72 define Package/ppp/conffiles
73 /etc/ppp/chap-secrets
74 /etc/ppp/filter
75 /etc/ppp/ip-down
76 /etc/ppp/ip-up
77 /etc/ppp/ipv6-down
78 /etc/ppp/ipv6-up
79 /etc/ppp/options
80 endef
81
82 define Package/ppp-mod-pppoa
83 $(call Package/ppp/Default)
84 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +linux-atm +kmod-pppoa
85 TITLE:=PPPoA plugin
86 endef
87
88 define Package/ppp-mod-pppoa/description
89 This package contains a PPPoA (PPP over ATM) plugin for ppp.
90 endef
91
92 define Package/ppp-mod-pppoe
93 $(call Package/ppp/Default)
94 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pppoe
95 TITLE:=PPPoE plugin
96 endef
97
98 define Package/ppp-mod-pppoe/description
99 This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
100 endef
101
102 define Package/ppp-mod-radius
103 $(call Package/ppp/Default)
104 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
105 TITLE:=RADIUS plugin
106 endef
107
108 define Package/ppp-mod-radius/description
109 This package contains a RADIUS (Remote Authentication Dial-In User Service)
110 plugin for ppp.
111 endef
112
113 define Package/ppp-mod-radius/conffiles
114 /etc/ppp/radius.conf
115 /etc/ppp/radius/
116 endef
117
118 define Package/ppp-mod-pppol2tp
119 $(call Package/ppp/Default)
120 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pppol2tp
121 TITLE:=PPPoL2TP plugin
122 endef
123
124 define Package/ppp-mod-pppol2tp/description
125 This package contains a PPPoL2TP (PPP over L2TP) plugin for ppp.
126 endef
127
128 define Package/ppp-mod-pptp
129 $(call Package/ppp/Default)
130 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pptp +kmod-mppe +resolveip
131 TITLE:=PPtP plugin
132 endef
133
134 define Package/ppp-mod-pptp/description
135 This package contains a PPtP plugin for ppp.
136 endef
137
138 define Package/ppp-mod-passwordfd
139 $(call Package/ppp/Default)
140 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
141 TITLE:=pap/chap secret from filedescriptor
142 endef
143
144 define Package/ppp-mod-passwordfd/description
145 This package allows to pass the PAP/CHAP secret from a filedescriptor.
146 Eliminates the need for a secrets file.
147 endef
148
149 define Package/chat
150 $(call Package/ppp/Default)
151 TITLE:=Establish conversation with a modem
152 endef
153
154 define Package/chat/description
155 This package contains an utility to establish conversation with other PPP servers
156 (via a modem).
157 endef
158
159 define Package/pppdump
160 $(call Package/ppp/Default)
161 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
162 TITLE:=Read PPP record file
163 endef
164
165 define Package/pppdump/description
166 This package contains an utility to read PPP record file.
167 endef
168
169 define Package/pppstats
170 $(call Package/ppp/Default)
171 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
172 TITLE:=Report PPP statistics
173 endef
174
175 define Package/pppstats/description
176 This package contains an utility to report PPP statistics.
177 endef
178
179 define Package/pppoe-discovery
180 $(call Package/ppp/Default)
181 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +ppp-mod-pppoe
182 TITLE:=Perform a PPPoE-discovery process
183 endef
184
185 define Package/pppoe-discovery/description
186 This tool performs the same discovery process as pppoe, but does
187 not initiate a session. Can be useful to debug pppoe.
188 endef
189
190 ifeq ($(BUILD_VARIANT),multilink)
191 CONFIGURE_ARGS += \
192 --enable-multilink
193 endif
194
195 define Build/InstallDev
196 $(INSTALL_DIR) $(1)/usr/include
197 $(CP) $(PKG_INSTALL_DIR)/usr/include/pppd $(1)/usr/include/
198 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
199 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
200 endef
201
202 define Package/ppp/script_install
203 endef
204
205 define Package/ppp/install
206 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
207 $(INSTALL_DIR) $(1)/usr/sbin
208 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/
209 $(INSTALL_DIR) $(1)/etc/ppp
210 $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
211 $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
212 $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
213 $(LN) /tmp/resolv.conf.ppp $(1)/etc/ppp/resolv.conf
214 $(INSTALL_DIR) $(1)/lib/netifd/proto
215 $(INSTALL_BIN) ./files/ppp.uc $(1)/lib/netifd/proto/
216 $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/netifd/proto/
217 $(INSTALL_BIN) ./files/lib/netifd/ppp-up $(1)/lib/netifd/
218 $(INSTALL_BIN) ./files/lib/netifd/ppp6-up $(1)/lib/netifd/
219 $(INSTALL_BIN) ./files/lib/netifd/ppp-down $(1)/lib/netifd/
220 endef
221 Package/ppp-multilink/install=$(Package/ppp/install)
222
223 define Package/ppp-mod-pppoa/install
224 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
225 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
226 $(1)/usr/lib/pppd/$(PKG_VERSION)/
227 endef
228
229 define Package/ppp-mod-pppoe/install
230 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
231 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoe.so \
232 $(1)/usr/lib/pppd/$(PKG_VERSION)/
233 endef
234
235 define Package/ppp-mod-radius/install
236 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
237 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \
238 $(1)/usr/lib/pppd/$(PKG_VERSION)/
239 $(INSTALL_DIR) $(1)/etc/ppp
240 $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
241 $(INSTALL_DIR) $(1)/etc/ppp/radius
242 $(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
243 $(1)/etc/ppp/radius/
244 $(INSTALL_CONF) ./files/etc/ppp/radius/servers \
245 $(1)/etc/ppp/radius/
246 endef
247
248 define Package/ppp-mod-pppol2tp/install
249 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
250 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppol2tp.so \
251 $(1)/usr/lib/pppd/$(PKG_VERSION)/
252 endef
253
254 define Package/ppp-mod-pptp/install
255 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
256 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pptp.so \
257 $(1)/usr/lib/pppd/$(PKG_VERSION)/
258 $(INSTALL_DIR) $(1)/etc/ppp
259 $(INSTALL_DATA) ./files/etc/ppp/options.pptp $(1)/etc/ppp/
260 endef
261
262 define Package/ppp-mod-passwordfd/install
263 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
264 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/passwordfd.so \
265 $(1)/usr/lib/pppd/$(PKG_VERSION)/
266 endef
267
268 define Package/chat/install
269 $(INSTALL_DIR) $(1)/usr/sbin
270 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/
271 endef
272
273 define Package/pppdump/install
274 $(INSTALL_DIR) $(1)/usr/sbin
275 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
276 endef
277
278 define Package/pppstats/install
279 $(INSTALL_DIR) $(1)/usr/sbin
280 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
281 endef
282
283 define Package/pppoe-discovery/install
284 $(INSTALL_DIR) $(1)/usr/sbin
285 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppoe-discovery $(1)/usr/sbin/
286 endef
287
288 $(eval $(call BuildPackage,ppp))
289 $(eval $(call BuildPackage,ppp-multilink))
290 $(eval $(call BuildPackage,ppp-mod-pppoa))
291 $(eval $(call BuildPackage,ppp-mod-pppoe))
292 $(eval $(call BuildPackage,ppp-mod-radius))
293 $(eval $(call BuildPackage,ppp-mod-pppol2tp))
294 $(eval $(call BuildPackage,ppp-mod-pptp))
295 $(eval $(call BuildPackage,ppp-mod-passwordfd))
296 $(eval $(call BuildPackage,chat))
297 $(eval $(call BuildPackage,pppdump))
298 $(eval $(call BuildPackage,pppstats))
299 $(eval $(call BuildPackage,pppoe-discovery))