3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:= 848f6c3cafeb6074ffeb293c3af79b7c
10 PKG_SOURCE_SITE
:= ftp
://ftp.samba.org
/pub
/ppp
/
11 PKG_SOURCE_FILE
:= $(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
12 PKG_SOURCE_CAT
:= zcat
13 PKG_SOURCE_DIR
:= $(PKG_NAME
)-$(PKG_VERSION
)
14 PKG_BUILD_DIR
:= $(BUILD_DIR
)/$(PKG_SOURCE_DIR
)
16 PKG_PPP
:= $(PACKAGE_DIR
)/ppp_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
17 PKG_PPP_PPPOE_PLUGIN
:= $(PACKAGE_DIR
)/ppp-pppoe-plugin_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
18 PKG_PPP_RADIUS_PLUGIN
:= $(PACKAGE_DIR
)/ppp-radius-plugin_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
19 PKG_PPPSTATS
:= $(PACKAGE_DIR
)/pppstats_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
20 PKG_PPPDUMP
:= $(PACKAGE_DIR
)/pppdump_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
22 I_PPP
:= $(PKG_BUILD_DIR
)/ipkg
/ppp
23 I_PPP_PPPOE_PLUGIN
:= $(PKG_BUILD_DIR
)/ipkg
/ppp-pppoe-plugin
24 I_PPP_RADIUS_PLUGIN
:= $(PKG_BUILD_DIR
)/ipkg
/ppp-radius-plugin
25 I_PPPDUMP
:= $(PKG_BUILD_DIR
)/ipkg
/pppdump
26 I_PPPSTATS
:= $(PKG_BUILD_DIR
)/ipkg
/pppstats
29 ifneq ($(BR2_PACKAGE_PPP_PPPOE
),)
30 TARGETS
+= $(PKG_PPP_PPPOE_PLUGIN
)
32 ifneq ($(BR2_PACKAGE_PPP_RADIUS
),)
33 TARGETS
+= $(PKG_PPP_RADIUS_PLUGIN
)
35 ifneq ($(BR2_PACKAGE_PPPDUMP
),)
36 TARGETS
+= $(PKG_PPPDUMP
)
38 ifneq ($(BR2_PACKAGE_PPPSTATS
),)
39 TARGETS
+= $(PKG_PPPSTATS
)
42 INSTALL_TARGETS
:= $(IPKG_STATE_DIR
)/info/ppp.list
43 ifeq ($(BR2_PACKAGE_PPP_PPPOE
),y
)
44 INSTALL_TARGETS
+= $(IPKG_STATE_DIR
)/info/ppp-pppoe-plugin.list
46 ifeq ($(BR2_PACKAGE_PPP_RADIUS
),y
)
47 INSTALL_TARGETS
+= $(IPKG_STATE_DIR
)/info/ppp-radius-plugin.list
49 ifeq ($(BR2_PACKAGE_PPPDUMP
),y
)
50 INSTALL_TARGETS
+= $(IPKG_STATE_DIR
)/info/pppdump.list
52 ifeq ($(BR2_PACKAGE_PPPSTATS
),y
)
53 INSTALL_TARGETS
+= $(IPKG_STATE_DIR
)/info/pppstats.list
56 $(DL_DIR
)/$(PKG_SOURCE_FILE
):
58 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE_FILE
) $(PKG_MD5SUM
) $(PKG_SOURCE_SITE
)
60 $(PKG_BUILD_DIR
)/.patched
: $(DL_DIR
)/$(PKG_SOURCE_FILE
)
61 mkdir
-p
$(TOOL_BUILD_DIR
)
62 $(PKG_SOURCE_CAT
) $(DL_DIR
)/$(PKG_SOURCE_FILE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
63 $(PATCH
) $(PKG_BUILD_DIR
) .
$(PKG_NAME
).patch
64 touch
$(PKG_BUILD_DIR
)/.patched
66 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.patched
67 (cd
$(PKG_BUILD_DIR
); \
69 $(TARGET_CONFIGURE_OPTS
) \
70 CFLAGS
="$(TARGET_CFLAGS)" \
72 --target
=$(GNU_TARGET_NAME
) \
73 --host
=$(GNU_TARGET_NAME
) \
74 --build
=$(GNU_HOST_NAME
) \
78 --datadir=/usr
/share \
79 --infodir=/usr
/share
/info \
80 --libexecdir
=/usr
/lib \
81 --localstatedir
=/var \
82 --mandir=/usr
/share
/man \
86 touch
$(PKG_BUILD_DIR
)/.configured
88 $(PKG_BUILD_DIR
)/pppd
/pppd
$(PKG_BUILD_DIR
)/pppd
/plugins
/radius
/radius.so
: $(PKG_BUILD_DIR
)/.configured
89 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
91 COPTS
="$(TARGET_CFLAGS)" \
94 $(PKG_PPP
): $(PKG_BUILD_DIR
)/pppd
/pppd
96 cp
-af .
/ipkg
/ppp
/* $(I_PPP
)
97 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(I_PPP
) control
/ppp.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
98 mkdir
-p
$(I_PPP
)/usr
/sbin
99 cp
-af
$(PKG_BUILD_DIR
)/pppd
/pppd
$(I_PPP
)/usr
/sbin
/
100 $(STRIP
) $(I_PPP
)/usr
/sbin
/*
101 mkdir
-p
$(I_PPP
)/usr
/lib
/pppd
102 cp
$(PKG_BUILD_DIR
)/pppd
/plugins
/*.so
$(I_PPP
)/usr
/lib
/pppd
/
103 $(STRIP
) $(I_PPP
)/usr
/lib
/pppd
/*.so
104 mkdir
-p
$(I_PPP
)/$(MODULES_SUBDIR
)
105 cp
$(MODULES_DIR
)/kernel
/drivers
/net
/ppp_async.o
$(I_PPP
)/$(MODULES_SUBDIR
)
106 cp
$(MODULES_DIR
)/kernel
/drivers
/net
/ppp_deflate.o
$(I_PPP
)/$(MODULES_SUBDIR
)
107 cp
$(MODULES_DIR
)/kernel
/drivers
/net
/bsd_comp.o
$(I_PPP
)/$(MODULES_SUBDIR
)
108 $(IPKG_BUILD
) $(I_PPP
) $(PACKAGE_DIR
)
110 $(IPKG_STATE_DIR
)/info/ppp.list
: $(PKG_PPP
)
111 $(IPKG
) install $(PKG_PPP
)
113 $(PKG_PPP_PPPOE_PLUGIN
): $(PKG_PPP
)
114 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(I_PPP_PPPOE_PLUGIN
) control
/ppp-pppoe-plugin.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
115 mkdir
-p
$(I_PPP_PPPOE_PLUGIN
)/usr
/lib
/pppd
/rp-pppoe
116 cp
-af
$(PKG_BUILD_DIR
)/pppd
/plugins
/rp-pppoe
/rp-pppoe.so \
117 $(I_PPP_PPPOE_PLUGIN
)/usr
/lib
/pppd
/rp-pppoe
118 $(STRIP
) $(I_PPP_PPPOE_PLUGIN
)/usr
/lib
/pppd
/*/*.so
119 mkdir
-p
$(I_PPP_PPPOE_PLUGIN
)/$(MODULES_SUBDIR
)
120 cp
$(MODULES_DIR
)/kernel
/drivers
/net
/pppo
*.o
$(I_PPP_PPPOE_PLUGIN
)/$(MODULES_SUBDIR
)
121 $(IPKG_BUILD
) $(I_PPP_PPPOE_PLUGIN
) $(PACKAGE_DIR
)
123 $(IPKG_STATE_DIR
)/info/ppp-pppoe-plugin.list
: $(PKG_PPP_PPPOE_PLUGIN
)
124 $(IPKG
) install $(PKG_PPP_PPPOE_PLUGIN
)
126 $(PKG_PPP_RADIUS_PLUGIN
): $(PKG_PPP
)
127 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(I_PPP_RADIUS_PLUGIN
) control
/ppp-radius-plugin.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
128 mkdir
-p
$(I_PPP_RADIUS_PLUGIN
)/usr
/lib
/pppd
/radius
129 cp
-af
$(PKG_BUILD_DIR
)/pppd
/plugins
/radius
/radius.so \
130 $(I_PPP_RADIUS_PLUGIN
)/usr
/lib
/pppd
/radius
/
131 $(STRIP
) $(I_PPP_RADIUS_PLUGIN
)/usr
/lib
/pppd
/*/*.so
132 $(IPKG_BUILD
) $(I_PPP_RADIUS_PLUGIN
) $(PACKAGE_DIR
)
134 $(IPKG_STATE_DIR
)/info/ppp-radius-plugin.list
: $(PKG_PPP_RADIUS_PLUGIN
)
135 $(IPKG
) install $(PKG_PPP_RADIUS_PLUGIN
)
137 $(PKG_PPPDUMP
): $(PKG_PPP
)
138 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(I_PPPDUMP
) control
/pppdump.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
139 mkdir
-p
$(I_PPPDUMP
)/usr
/sbin
140 cp
-af
$(PKG_BUILD_DIR
)/pppdump
/pppdump
$(I_PPPDUMP
)/usr
/sbin
/
141 $(STRIP
) $(I_PPPDUMP
)/usr
/sbin
/*
142 $(IPKG_BUILD
) $(I_PPPDUMP
) $(PACKAGE_DIR
)
144 $(IPKG_STATE_DIR
)/info/pppdump.list
: $(PKG_PPPDUMP
)
145 $(IPKG
) install $(PKG_PPPDUMP
)
147 $(PKG_PPPSTATS
): $(PKG_PPP
)
148 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(I_PPPSTATS
) control
/pppstats.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
149 mkdir
-p
$(I_PPPSTATS
)/usr
/sbin
150 cp
-af
$(PKG_BUILD_DIR
)/pppstats
/pppstats
$(I_PPPSTATS
)/usr
/sbin
/
151 $(STRIP
) $(I_PPPSTATS
)/usr
/sbin
/*
152 $(IPKG_BUILD
) $(I_PPPSTATS
) $(PACKAGE_DIR
)
154 $(IPKG_STATE_DIR
)/info/pppstats.list
: $(PKG_PPPSTATS
)
155 $(IPKG
) install $(PKG_PPPSTATS
)
157 source
: $(DL_DIR
)/$(PKG_SOURCE_FILE
)
158 prepare
: $(PKG_BUILD_DIR
)/.patched
160 install: $(INSTALL_TARGETS
)
163 rm -rf
$(PKG_BUILD_DIR
)
164 rm -f
$(PKG_PPP
) $(PKG_PPP_PPPOE_PLUGIN
) $(PKG_PPP_RADIUS_PLUGIN
) $(PKG_PPPSTATS
) $(PKG_PPPDUMP
)