3 include $(TOPDIR)/rules.mk
8 PKG_MD5SUM:=848f6c3cafeb6074ffeb293c3af79b7c
10 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
17 include $(TOPDIR)/package/rules.mk
19 define PKG_mod_template
22 install -d -m0755 $$(IDIR_$(1))/usr/lib/pppd/$(PKG_VERSION)
23 install -m0755 $(PKG_INSTALL_DIR)/usr/lib/pppd/$(PKG_VERSION)/$(2).so \
24 $$(IDIR_$(1))/usr/lib/pppd/$(PKG_VERSION)/
25 $(RSTRIP) $$(IDIR_$(1))
26 $(IPKG_BUILD) $$(IDIR_$(1)) $(PACKAGE_DIR)
30 $(eval $(call PKG_template,PPP,ppp,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
31 $(eval $(call PKG_template,PPP_MOD_PPPOA,ppp-mod-pppoa,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
32 $(eval $(call PKG_template,PPP_MOD_PPPOE,ppp-mod-pppoe,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
33 $(eval $(call PKG_template,PPP_MOD_RADIUS,ppp-mod-radius,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
34 $(eval $(call PKG_template,CHAT,chat,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
35 $(eval $(call PKG_template,PPPDUMP,pppdump,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
36 $(eval $(call PKG_template,PPPSTATS,pppstats,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
38 $(eval $(call PKG_mod_template,PPP_MOD_PPPOA,pppoatm))
39 $(eval $(call PKG_mod_template,PPP_MOD_PPPOE,rp-pppoe))
40 $(eval $(call PKG_mod_template,PPP_MOD_RADIUS,radius))
42 PKG_DEPEND:="kmod-ppp"
43 ifeq ($(BR2_PACKAGE_PPP_WITH_FILTER),y)
44 ENABLE_FILTER:="PRECOMPILED_FILTER=1"
47 $(PKG_BUILD_DIR)/.configured:
48 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
49 $(TARGET_CONFIGURE_OPTS) \
50 CFLAGS="$(TARGET_CFLAGS)" \
52 --target=$(GNU_TARGET_NAME) \
53 --host=$(GNU_TARGET_NAME) \
54 --build=$(GNU_HOST_NAME) \
60 --datadir=/usr/share \
61 --includedir=/usr/include \
62 --infodir=/usr/share/info \
64 --libexecdir=/usr/lib \
65 --localstatedir=/var \
66 --mandir=/usr/share/man \
69 $(DISABLE_LARGEFILE) \
74 $(PKG_BUILD_DIR)/.built:
75 rm -rf $(PKG_INSTALL_DIR)
76 mkdir -p $(PKG_INSTALL_DIR)/usr
77 $(MAKE) -C $(PKG_BUILD_DIR) \
79 COPTS="$(TARGET_CFLAGS)" \
82 STAGING_DIR=$(STAGING_DIR) \
83 DESTDIR="$(PKG_INSTALL_DIR)/usr" \
87 ifeq ($(BR2_PACKAGE_PPP_WITH_FILTER),y)
88 INSTALL_FILTER=install -m0644 ./files/etc/ppp/filter $(IDIR_PPP)/etc/ppp/
92 install -d -m0755 $(IDIR_PPP)/etc/ppp
93 ln -sf /tmp/resolv.conf $(IDIR_PPP)/etc/ppp/resolv.conf
94 install -m0600 ./files/etc/ppp/chap-secrets $(IDIR_PPP)/etc/ppp/
95 install -m0644 ./files/etc/ppp/options $(IDIR_PPP)/etc/ppp/
97 install -m0755 ./files/etc/ppp/ip-up $(IDIR_PPP)/etc/ppp/
98 install -d -m0755 ./files/etc/ppp/ip-up.d
99 install -m0755 ./files/etc/ppp/ip-down $(IDIR_PPP)/etc/ppp/
100 install -d -m0755 ./files/etc/ppp/ip-down.d
101 install -d -m0755 $(IDIR_PPP)/usr/sbin
102 install -m0755 $(PKG_INSTALL_DIR)/usr/sbin/pppd $(IDIR_PPP)/usr/sbin/
103 install -d -m0755 $(IDIR_PPP)/usr/lib/pppd
104 echo "Depends: $(PKG_DEPEND)" >> $(IDIR_PPP)/CONTROL/control
105 $(RSTRIP) $(IDIR_PPP)
106 $(IPKG_BUILD) $(IDIR_PPP) $(PACKAGE_DIR)
108 $(IDIR_PPP_MOD_PPPOA)/sbin/ifup.pppoa:
109 install -d -m0755 $(IDIR_PPP_MOD_PPPOA)/sbin
110 install -m0755 ./files/ifup.pppoa $(IDIR_PPP_MOD_PPPOA)/sbin/
112 $(IPKG_PPP_MOD_PPPOA): $(IDIR_PPP_MOD_PPPOA)/sbin/ifup.pppoa
114 $(IDIR_PPP_MOD_PPPOE)/sbin/ifup.pppoe:
115 install -d -m0755 $(IDIR_PPP_MOD_PPPOE)/sbin
116 install -m0755 ./files/ifup.pppoe $(IDIR_PPP_MOD_PPPOE)/sbin/
118 $(IPKG_PPP_MOD_PPPOE): $(IDIR_PPP_MOD_PPPOE)/sbin/ifup.pppoe
120 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius.conf:
121 install -d -m0755 $(IDIR_PPP_MOD_RADIUS)/etc/ppp
122 install -m644 ./files/etc/ppp/radius.conf $(IDIR_PPP_MOD_RADIUS)/etc/ppp/
123 install -d -m0755 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius
124 install -m644 ./files/etc/ppp/radius/dictionary* \
125 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius/
126 install -m600 ./files/etc/ppp/radius/servers \
127 $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius/
129 $(IPKG_PPP_MOD_RADIUS): $(IDIR_PPP_MOD_RADIUS)/etc/ppp/radius.conf
132 install -d -m0755 $(IDIR_CHAT)/usr/sbin
133 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/chat $(IDIR_CHAT)/usr/sbin/
134 $(RSTRIP) $(IDIR_CHAT)
135 $(IPKG_BUILD) $(IDIR_CHAT) $(PACKAGE_DIR)
138 install -d -m0755 $(IDIR_PPPDUMP)/usr/sbin
139 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppdump $(IDIR_PPPDUMP)/usr/sbin/
140 $(RSTRIP) $(IDIR_PPPDUMP)
141 $(IPKG_BUILD) $(IDIR_PPPDUMP) $(PACKAGE_DIR)
143 $(IPKG_PPPSTATS): $(IPKG_PPP)
144 install -d -m0755 $(IDIR_PPPSTATS)/usr/sbin
145 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/pppstats $(IDIR_PPPSTATS)/usr/sbin/
146 $(RSTRIP) $(IDIR_PPPSTATS)
147 $(IPKG_BUILD) $(IDIR_PPPSTATS) $(PACKAGE_DIR)