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