Root/package/ppp/Makefile

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

Archive Download this file



interactive