source: trunk/package/ppp/Makefile @ 19993

Last change on this file since 19993 was 19993, checked in by thepeople, 7 years ago

this patch simplifies the Makefile by using PKG_INSTALL:=1, and it also
fixes parallel build.

-Raphael

  • Property svn:copyright set to Copyright (C) 2006 OpenWrt.org
  • Property svn:eol-style set to native
File size: 4.9 KB
Line 
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
9
10PKG_NAME:=ppp
11PKG_VERSION:=2.4.4
12PKG_RELEASE:=5
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
16PKG_MD5SUM:=183800762e266132218b204dfb428d29
17
18PKG_BUILD_DEPENDS:=libpcap
19
20PKG_INSTALL:=1
21
22include $(INCLUDE_DIR)/package.mk
23include $(INCLUDE_DIR)/kernel.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-mod-pppoa
43$(call Package/ppp/Default)
44  DEPENDS:=ppp +linux-atm +kmod-pppoa
45  TITLE:=PPPoA plugin
46endef
47
48define Package/ppp-mod-pppoa/description
49This package contains a PPPoA (PPP over ATM) plugin for ppp.
50endef
51
52define Package/ppp-mod-pppoe
53$(call Package/ppp/Default)
54  DEPENDS:=ppp +kmod-pppoe
55  TITLE:=PPPoE plugin
56endef
57
58define Package/ppp-mod-pppoe/description
59This package contains a PPPoE (PPP over Ethernet) plugin for ppp.
60endef
61
62define Package/ppp-mod-radius
63$(call Package/ppp/Default)
64  DEPENDS:=ppp
65  TITLE:=RADIUS plugin
66endef
67
68define Package/ppp-mod-radius/description
69This package contains a RADIUS (Remote Authentication Dial-In User Service)
70plugin for ppp.
71endef
72
73define Package/chat
74$(call Package/ppp/Default)
75  DEPENDS:=ppp
76  TITLE:=Establish conversation with a modem
77endef
78
79define Package/chat/description
80This package contains an utility to establish conversation with other PPP servers
81(via a modem).
82endef
83
84define Package/pppdump
85$(call Package/ppp/Default)
86  DEPENDS:=ppp
87  TITLE:=Read PPP record file
88endef
89
90define Package/pppdump/description
91This package contains an utility to read PPP record file.
92endef
93
94define Package/pppstats
95$(call Package/ppp/Default)
96  DEPENDS:=ppp
97  TITLE:=Report PPP statistics
98endef
99
100define Package/pppstats/description
101This package contains an utility to report PPP statistics.
102endef
103
104
105define Build/Configure
106$(call Build/Configure/Default,, \
107        UNAME_S="Linux" \
108        UNAME_R="$(LINUX_VERSION)" \
109        UNAME_M="$(ARCH)" \
110)
111endef
112
113MAKE_FLAGS += COPTS="$(TARGET_CFLAGS)" \
114                PRECOMPILED_FILTER=1 \
115                STAGING_DIR="$(STAGING_DIR)"
116
117define Build/InstallDev
118        $(INSTALL_DIR) $(1)/usr/include
119        $(CP) $(PKG_INSTALL_DIR)/include/pppd $(1)/usr/include/
120endef
121
122define Package/ppp/install
123        $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
124        $(INSTALL_DIR) $(1)/usr/sbin
125        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppd $(1)/usr/sbin/
126        $(INSTALL_DIR) $(1)/lib/network
127        $(INSTALL_BIN) ./files/ppp.sh $(1)/lib/network/
128        $(INSTALL_DIR) $(1)/etc/ppp
129        $(INSTALL_CONF) ./files/etc/ppp/chap-secrets $(1)/etc/ppp/
130        $(INSTALL_DATA) ./files/etc/ppp/filter $(1)/etc/ppp/
131        $(INSTALL_BIN) ./files/etc/ppp/ip-up $(1)/etc/ppp/
132        $(INSTALL_DIR) $(1)/etc/ppp/ip-up.d
133        $(INSTALL_BIN) ./files/etc/ppp/ip-down $(1)/etc/ppp/
134        $(INSTALL_DIR) $(1)/etc/ppp/ip-down.d
135        $(INSTALL_BIN) ./files/etc/ppp/ipv6-up $(1)/etc/ppp/
136        $(INSTALL_BIN) ./files/etc/ppp/ipv6-down $(1)/etc/ppp/
137        $(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
138        ln -sf /tmp/resolv.conf.auto $(1)/etc/ppp/resolv.conf
139endef
140       
141define Package/ppp-mod-pppoa/install
142        $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
143        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/pppoatm.so \
144                $(1)/usr/lib/pppd/$(PKG_VERSION)/
145        $(INSTALL_DIR) $(1)/lib/network
146        $(INSTALL_BIN) ./files/pppoa.sh $(1)/lib/network/
147endef
148
149define Package/ppp-mod-pppoe/install
150        $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
151        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/rp-pppoe.so \
152                $(1)/usr/lib/pppd/$(PKG_VERSION)/
153        $(INSTALL_DIR) $(1)/lib/network
154        $(INSTALL_BIN) ./files/pppoe.sh $(1)/lib/network/
155endef
156
157define Package/ppp-mod-radius/install
158        $(INSTALL_DIR) $(1)/usr/lib/pppd/$(PKG_VERSION)
159        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/lib/pppd/$(PKG_VERSION)/radius.so \
160                $(1)/usr/lib/pppd/$(PKG_VERSION)/
161        $(INSTALL_DIR) $(1)/etc/ppp
162        $(INSTALL_DATA) ./files/etc/ppp/radius.conf $(1)/etc/ppp/
163        $(INSTALL_DIR) $(1)/etc/ppp/radius
164        $(INSTALL_DATA) ./files/etc/ppp/radius/dictionary* \
165                $(1)/etc/ppp/radius/
166        $(INSTALL_CONF) ./files/etc/ppp/radius/servers \
167                $(1)/etc/ppp/radius/
168endef
169
170define Package/chat/install
171        $(INSTALL_DIR) $(1)/usr/sbin
172        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/chat $(1)/usr/sbin/
173endef
174
175define Package/pppdump/install
176        $(INSTALL_DIR) $(1)/usr/sbin
177        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppdump $(1)/usr/sbin/
178endef
179
180define Package/pppstats/install
181        $(INSTALL_DIR) $(1)/usr/sbin
182        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/sbin/pppstats $(1)/usr/sbin/
183endef
184
185$(eval $(call BuildPackage,ppp))
186$(eval $(call BuildPackage,ppp-mod-pppoa))
187$(eval $(call BuildPackage,ppp-mod-pppoe))
188$(eval $(call BuildPackage,ppp-mod-radius))
189$(eval $(call BuildPackage,chat))
190$(eval $(call BuildPackage,pppdump))
191$(eval $(call BuildPackage,pppstats))
Note: See TracBrowser for help on using the repository browser.