pppd: split files into netifd and non-netifd files, move the netifd ppp.sh file to...
[openwrt.git] / 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
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=ppp
12 PKG_VERSION:=2.4.5
13 PKG_RELEASE:=4
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
17 PKG_MD5SUM:=4621bc56167b6953ec4071043fe0ec57
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
20
21 PKG_BUILD_DEPENDS:=libpcap
22
23 PKG_INSTALL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/ppp/Default
28 SECTION:=net
29 CATEGORY:=Network
30 MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org>
31 URL:=http://ppp.samba.org/
32 endef
33
34 define Package/ppp
35 $(call Package/ppp/Default)
36 DEPENDS:=+kmod-ppp
37 TITLE:=PPP daemon
38 VARIANT:=default
39 endef
40
41 define Package/ppp-multilink
42 $(call Package/ppp/Default)
43 DEPENDS:=+kmod-ppp
44 TITLE:=PPP daemon (with multilink support)
45 VARIANT:=multilink
46 endef
47
48 define Package/ppp/description
49 This package contains the PPP (Point-to-Point Protocol) daemon.
50 endef
51
52 define 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
60 endef
61
62 define Package/ppp-mod-pppoa
63 $(call Package/ppp/Default)
64 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +linux-atm +kmod-pppoa
65 TITLE:=PPPoA plugin
66 endef
67
68 define Package/ppp-mod-pppoa/description
69 This package contains a PPPoA (PPP over ATM) plugin for ppp.
70 endef
71
72 define Package/ppp-mod-pppoe
73 $(call Package/ppp/Default)
74 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink) +kmod-pppoe
75 TITLE:=PPPoE plugin
76 endef
77
78 define Package/ppp-mod-pppoe/description
79 This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
80 endef
81
82 define Package/ppp-mod-radius
83 $(call Package/ppp/Default)
84 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
85 TITLE:=RADIUS plugin
86 endef
87
88 define Package/ppp-mod-radius/description
89 This package contains a RADIUS (Remote Authentication Dial-In User Service)
90 plugin for ppp.
91 endef
92
93 define Package/ppp-mod-radius/conffiles
94 /etc/ppp/radius.conf
95 /etc/ppp/radius/
96 endef
97
98 define Package/chat
99 $(call Package/ppp/Default)
100 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
101 TITLE:=Establish conversation with a modem
102 endef
103
104 define Package/chat/description
105 This package contains an utility to establish conversation with other PPP servers
106 (via a modem).
107 endef
108
109 define Package/pppdump
110 $(call Package/ppp/Default)
111 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
112 TITLE:=Read PPP record file
113 endef
114
115 define Package/pppdump/description
116 This package contains an utility to read PPP record file.
117 endef
118
119 define Package/pppstats
120 $(call Package/ppp/Default)
121 DEPENDS:=@(PACKAGE_ppp||PACKAGE_ppp-multilink)
122 TITLE:=Report PPP statistics
123 endef
124
125 define Package/pppstats/description
126 This package contains an utility to report PPP statistics.
127 endef
128
129
130 define 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/
141 endef
142
143 MAKE_FLAGS += COPTS="$(TARGET_CFLAGS)" \
144 PRECOMPILED_FILTER=1 \
145 STAGING_DIR="$(STAGING_DIR)"
146
147 ifeq ($(BUILD_VARIANT),multilink)
148 MAKE_FLAGS += HAVE_MULTILINK=y
149 else
150 MAKE_FLAGS += HAVE_MULTILINK=
151 endif
152
153
154 define Build/InstallDev
155 $(INSTALL_DIR) $(1)/usr/include
156 $(CP) $(PKG_INSTALL_DIR)/include/pppd $(1)/usr/include/
157 endef
158
159 ifneq ($(CONFIG_PACKAGE_netifd),)
160 define Package/ppp/script_install
161 $(INSTALL_DIR) $(1)/lib/netifd/proto
162 $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/netifd/proto/
163 endef
164 else
165 define Package/ppp/script_install
166 $(INSTALL_DIR) $(1)/lib/network
167 $(INSTALL_BIN) ./files.old/ppp.sh $(1)/lib/network/
168 $(INSTALL_BIN) ./files.old/etc/ppp/ip-up $(1)/etc/ppp/
169 $(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
170 $(INSTALL_BIN) ./files.old/etc/ppp/ip-down $(1)/etc/ppp/
171 $(INSTALL_DIR) $(1)/etc/ppp/ip-down.d
172 $(INSTALL_BIN) ./files.old/etc/ppp/ipv6-up $(1)/etc/ppp/
173 $(INSTALL_BIN) ./files.old/etc/ppp/ipv6-down $(1)/etc/ppp/
174 $(INSTALL_DIR) $(1)/lib/network
175 $(INSTALL_BIN) ./files.old/pppoe.sh $(1)/lib/network/
176 $(INSTALL_DIR) $(1)/lib/network
177 $(INSTALL_BIN) ./files.old/pppoa.sh $(1)/lib/network/
178 $(INSTALL_DIR) $(1)/etc/hotplug.d/atm
179 $(INSTALL_DATA) ./files.old/etc/hotplug.d/atm/20-atm-modem $(1)/etc/hotplug.d/atm/
180 endef
181 endif
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 $(Package/ppp/script_install)
193 endef
194 Package/ppp-multilink/install=$(Package/ppp/install)
195
196 define Package/ppp-mod-pppoa/install
197 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
198 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/pppoatm.so \
199 $(1)/usr/lib/pppd/$(PKG_VERSION)/
200 endef
201
202 define Package/ppp-mod-pppoe/install
203 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
204 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
205 $(1)/usr/lib/pppd/$(PKG_VERSION)/
206 endef
207
208 define Package/ppp-mod-radius/install
209 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
210 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/radius.so \
211 $(1)/usr/lib/pppd/$(PKG_VERSION)/
212 $(INSTALL_DIR) $(1)/etc/ppp
213 $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
214 $(INSTALL_DIR) $(1)/etc/ppp/radius
215 $(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
216 $(1)/etc/ppp/radius/
217 $(INSTALL_CONF) ./files/etc/ppp/radius/servers \
218 $(1)/etc/ppp/radius/
219 endef
220
221 define Package/chat/install
222 $(INSTALL_DIR) $(1)/usr/sbin
223 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/chat $(1)/usr/sbin/
224 endef
225
226 define Package/pppdump/install
227 $(INSTALL_DIR) $(1)/usr/sbin
228 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppdump $(1)/usr/sbin/
229 endef
230
231 define Package/pppstats/install
232 $(INSTALL_DIR) $(1)/usr/sbin
233 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppstats $(1)/usr/sbin/
234 endef
235
236 $(eval $(call BuildPackage,ppp))
237 $(eval $(call BuildPackage,ppp-multilink))
238 $(eval $(call BuildPackage,ppp-mod-pppoa))
239 $(eval $(call BuildPackage,ppp-mod-pppoe))
240 $(eval $(call BuildPackage,ppp-mod-radius))
241 $(eval $(call BuildPackage,chat))
242 $(eval $(call BuildPackage,pppdump))
243 $(eval $(call BuildPackage,pppstats))
This page took 0.05925 seconds and 5 git commands to generate.