Root/package/ppp/Makefile

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:=2
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
22
23PKG_INSTALL:=1
24
25include $(INCLUDE_DIR)/package.mk
26
27define Package/ppp/Default
28  SECTION:=net
29  CATEGORY:=Network
30  MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
31  URL:=http://ppp.samba.org/
32endef
33
34define Package/ppp
35$(call Package/ppp/Default)
36  DEPENDS:=+kmod-ppp
37  TITLE:=PPP daemon
38  VARIANT:=default
39endef
40
41define Package/ppp-multilink
42$(call Package/ppp/Default)
43  DEPENDS:=+kmod-ppp
44  TITLE:=PPP daemon (with multilink support)
45  VARIANT:=multilink
46endef
47
48define Package/ppp/description
49This package contains the PPP (Point-to-Point Protocol) daemon.
50endef
51
52define Package/ppp/conffiles
53/etc/ppp/chap-secrets
54/etc/ppp/filter
55/etc/ppp/ip-down
56/etc/ppp/ip-up
57/etc/ppp/ipv6-down
58/etc/ppp/ipv6-up
59/etc/ppp/options
60endef
61
62define Package/ppp-mod-pppoa
63$(call Package/ppp/Default)
64  DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +linux-atm +kmod-pppoa
65  TITLE:=PPPoA plugin
66endef
67
68define Package/ppp-mod-pppoa/description
69This package contains a PPPoA (PPP over ATM) plugin for ppp.
70endef
71
72define Package/ppp-mod-pppoe
73$(call Package/ppp/Default)
74  DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pppoe
75  TITLE:=PPPoE plugin
76endef
77
78define Package/ppp-mod-pppoe/description
79This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
80endef
81
82define Package/ppp-mod-radius
83$(call Package/ppp/Default)
84  DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
85  TITLE:=RADIUS plugin
86endef
87
88define Package/ppp-mod-radius/description
89This package contains a RADIUS (Remote Authentication Dial-In User Service)
90plugin for ppp.
91endef
92
93define Package/ppp-mod-radius/conffiles
94/etc/ppp/radius.conf
95/etc/ppp/radius/
96endef
97
98define Package/chat
99$(call Package/ppp/Default)
100  DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
101  TITLE:=Establish conversation with a modem
102endef
103
104define Package/chat/description
105This package contains an utility to establish conversation with other PPP servers
106(via a modem).
107endef
108
109define Package/pppdump
110$(call Package/ppp/Default)
111  DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
112  TITLE:=Read PPP record file
113endef
114
115define Package/pppdump/description
116This package contains an utility to read PPP record file.
117endef
118
119define Package/pppstats
120$(call Package/ppp/Default)
121  DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
122  TITLE:=Report PPP statistics
123endef
124
125define Package/pppstats/description
126This package contains an utility to report PPP statistics.
127endef
128
129
130define Build/Configure
131$(call Build/Configure/Default,, \
132    UNAME_S="Linux" \
133    UNAME_R="$(LINUX_VERSION)" \
134    UNAME_M="$(ARCH)" \
135)
136    mkdir -p $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux
137    cp \
138        $(LINUX_DIR)/include/linux/compiler.h \
139        $(LINUX_DIR)/include/linux/atm*.h \
140        $(PKG_BUILD_DIR)/pppd/plugins/pppoatm/linux/
141endef
142
143MAKE_FLAGS += COPTS="$(TARGET_CFLAGS)" \
144        PRECOMPILED_FILTER=1 \
145        STAGING_DIR="$(STAGING_DIR)"
146
147ifeq ($(BUILD_VARIANT),multilink)
148  MAKE_FLAGS += HAVE_MULTILINK=y
149else
150  MAKE_FLAGS += HAVE_MULTILINK=
151endif
152
153
154define Build/InstallDev
155    $(INSTALL_DIR) $(1)/usr/include
156    $(CP) $(PKG_INSTALL_DIR)/include/pppd $(1)/usr/include/
157endef
158
159define Package/ppp/install
160    $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
161    $(INSTALL_DIR) $(1)/usr/sbin
162    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppd $(1)/usr/sbin/
163    $(INSTALL_DIR) $(1)/lib/network
164    $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/network/
165    $(INSTALL_DIR) $(1)/etc/ppp
166    $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
167    $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
168    $(INSTALL_BIN) ./files/etc/ppp/ip-up $(1)/etc/ppp/
169    $(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
170    $(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/
171    $(INSTALL_DIR) $(1)/etc/ppp/ip-down.d
172    $(INSTALL_BIN) ./files/etc/ppp/ipv6-up $(1)/etc/ppp/
173    $(INSTALL_BIN) ./files/etc/ppp/ipv6-down $(1)/etc/ppp/
174    $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
175    ln -sf /tmp/resolv.conf.ppp $(1)/etc/ppp/resolv.conf
176endef
177Package/ppp-multilink/install=$(Package/ppp/install)
178
179define Package/ppp-mod-pppoa/install
180    $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
181    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/pppoatm.so \
182        $(1)/usr/lib/pppd/$(PKG_VERSION)/
183    $(INSTALL_DIR) $(1)/lib/network
184    $(INSTALL_BIN) ./files/pppoa.sh $(1)/lib/network/
185    $(INSTALL_DIR) $(1)/etc/hotplug.d/atm
186    $(INSTALL_DATA) ./files/etc/hotplug.d/atm/20-atm-modem $(1)/etc/hotplug.d/atm/
187endef
188
189define Package/ppp-mod-pppoe/install
190    $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
191    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
192        $(1)/usr/lib/pppd/$(PKG_VERSION)/
193    $(INSTALL_DIR) $(1)/lib/network
194    $(INSTALL_BIN) ./files/pppoe.sh $(1)/lib/network/
195endef
196
197define Package/ppp-mod-radius/install
198    $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
199    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/radius.so \
200        $(1)/usr/lib/pppd/$(PKG_VERSION)/
201    $(INSTALL_DIR) $(1)/etc/ppp
202    $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
203    $(INSTALL_DIR) $(1)/etc/ppp/radius
204    $(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
205        $(1)/etc/ppp/radius/
206    $(INSTALL_CONF) ./files/etc/ppp/radius/servers \
207        $(1)/etc/ppp/radius/
208endef
209
210define Package/chat/install
211    $(INSTALL_DIR) $(1)/usr/sbin
212    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/chat $(1)/usr/sbin/
213endef
214
215define Package/pppdump/install
216    $(INSTALL_DIR) $(1)/usr/sbin
217    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppdump $(1)/usr/sbin/
218endef
219
220define Package/pppstats/install
221    $(INSTALL_DIR) $(1)/usr/sbin
222    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppstats $(1)/usr/sbin/
223endef
224
225$(eval $(call BuildPackage,ppp))
226$(eval $(call BuildPackage,ppp-multilink))
227$(eval $(call BuildPackage,ppp-mod-pppoa))
228$(eval $(call BuildPackage,ppp-mod-pppoe))
229$(eval $(call BuildPackage,ppp-mod-radius))
230$(eval $(call BuildPackage,chat))
231$(eval $(call BuildPackage,pppdump))
232$(eval $(call BuildPackage,pppstats))
233

Archive Download this file



interactive