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