source: trunk/package/ppp/Makefile @ 31730

Last change on this file since 31730 was 31730, checked in by nbd, 5 years ago

enable netifd by default and add its config variable to PKG_CONFIG_DEPENDS in a few relevant places

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