Forward port whiterussian resolv.conf changes
[openwrt.git] / package / ppp / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=ppp
12 PKG_VERSION:=2.4.3
13 PKG_RELEASE:=7
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
17 PKG_MD5SUM:=848f6c3cafeb6074ffeb293c3af79b7c
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 PKG_BUILDDEP:=libpcap linux-atm
24
25 include $(INCLUDE_DIR)/package.mk
26 include $(INCLUDE_DIR)/kernel.mk
27
28 define Package/ppp/Default
29 SECTION:=net
30 CATEGORY:=Network
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 DESCRIPTION:=\
39 This package contains the PPP (Point-to-Point Protocol) daemon.
40 MENU:=1
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 DESCRIPTION:=\
48 This package contains a PPPoA (PPP over ATM) plugin for ppp.
49 endef
50
51 define Package/ppp-mod-pppoe
52 $(call Package/ppp/Default)
53 DEPENDS:=ppp +kmod-pppoe
54 TITLE:=PPPoE plugin
55 DESCRIPTION:=\
56 This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
57 endef
58
59 define Package/ppp-mod-radius
60 $(call Package/ppp/Default)
61 DEPENDS:=ppp
62 TITLE:=RADIUS plugin
63 DESCRIPTION:=\
64 This package contains a RADIUS (Remote Authentication Dial-In User \\\
65 Service) plugin for ppp.
66 endef
67
68 define Package/chat
69 $(call Package/ppp/Default)
70 DEPENDS:=ppp
71 TITLE:=Establish conversation with a modem
72 DESCRIPTION:=\
73 This package contains an utility to establish conversation with other \\\
74 PPP servers (via a modem).
75 endef
76
77 define Package/pppdump
78 $(call Package/ppp/Default)
79 DEPENDS:=ppp
80 TITLE:=Read PPP record file
81 DESCRIPTION:=\
82 This package contains an utility to read PPP record file.
83 endef
84
85 define Package/pppstats
86 $(call Package/ppp/Default)
87 DEPENDS:=ppp
88 TITLE:=Report PPP statistics
89 DESCRIPTION:=\
90 This package contains an utility to report PPP statistics.
91 endef
92
93 define Build/Configure
94 $(call Build/Configure/Default,, \
95 UNAME_S="Linux" \
96 UNAME_R="$(LINUX_VERSION)" \
97 UNAME_M="$(ARCH)" \
98 )
99 endef
100
101 define Build/Compile
102 rm -rf $(PKG_INSTALL_DIR)
103 mkdir -p $(PKG_INSTALL_DIR)/usr
104 $(MAKE) -C $(PKG_BUILD_DIR) \
105 $(TARGET_CONFIGURE_OPTS) \
106 COPTS="$(TARGET_CFLAGS)" \
107 PRECOMPILED_FILTER=1 \
108 STAGING_DIR="$(STAGING_DIR)" \
109 DESTDIR="$(PKG_INSTALL_DIR)/usr" \
110 all install
111 endef
112
113 define Package/ppp/install
114 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
115 $(INSTALL_DIR) $(1)/usr/sbin
116 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppd $(1)/usr/sbin/
117 $(INSTALL_DIR) $(1)/lib/network
118 $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/network/
119 $(INSTALL_DIR) $(1)/etc/ppp
120 $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
121 $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
122 $(INSTALL_BIN) ./files/etc/ppp/ip-up $(1)/etc/ppp/
123 $(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
124 $(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/
125 $(INSTALL_DIR) $(1)/etc/ppp/ip-down.d
126 $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
127 ln -sf /tmp/resolv.conf.auto $(1)/etc/ppp/resolv.conf
128 endef
129
130 define Package/ppp-mod-pppoa/install
131 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
132 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/pppoatm.so \
133 $(1)/usr/lib/pppd/$(PKG_VERSION)/
134 $(INSTALL_DIR) $(1)/lib/network
135 $(INSTALL_BIN) ./files/pppoa.sh $(1)/lib/network/
136 endef
137
138 define Package/ppp-mod-pppoe/install
139 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
140 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
141 $(1)/usr/lib/pppd/$(PKG_VERSION)/
142 $(INSTALL_DIR) $(1)/lib/network
143 $(INSTALL_BIN) ./files/pppoe.sh $(1)/lib/network/
144 endef
145
146 define Package/ppp-mod-radius/install
147 $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
148 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/radius.so \
149 $(1)/usr/lib/pppd/$(PKG_VERSION)/
150 $(INSTALL_DIR) $(1)/etc/ppp
151 $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
152 $(INSTALL_DIR) $(1)/etc/ppp/radius
153 $(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
154 $(1)/etc/ppp/radius/
155 $(INSTALL_CONF) ./files/etc/ppp/radius/servers \
156 $(1)/etc/ppp/radius/
157 endef
158
159 define Package/chat/install
160 $(INSTALL_DIR) $(1)/usr/sbin
161 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/chat $(1)/usr/sbin/
162 endef
163
164 define Package/pppdump/install
165 $(INSTALL_DIR) $(1)/usr/sbin
166 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(1)/usr/sbin/
167 endef
168
169 define Package/pppstats/install
170 $(INSTALL_DIR) $(1)/usr/sbin
171 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(1)/usr/sbin/
172 endef
173
174 $(eval $(call BuildPackage,ppp))
175 $(eval $(call BuildPackage,ppp-mod-pppoa))
176 $(eval $(call BuildPackage,ppp-mod-pppoe))
177 $(eval $(call BuildPackage,ppp-mod-radius))
178 $(eval $(call BuildPackage,chat))
179 $(eval $(call BuildPackage,pppdump))
180 $(eval $(call BuildPackage,pppstats))
This page took 0.062648 seconds and 5 git commands to generate.