source: trunk/package/ppp/Makefile @ 23248

Last change on this file since 23248 was 23248, checked in by jow, 6 years ago

[package] ppp: mark /etc/ppp/ resources as conffiles

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