remove wl / nas / et .. binary only; no license given
[openwrt.git] / package / ppp / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME := ppp
4 PKG_VERSION := 2.4.3
5 PKG_RELEASE := 3
6
7 PKG_SOURCE_SITE := ftp://ftp.samba.org/pub/ppp/
8 PKG_SOURCE_FILE := $(PKG_NAME)-$(PKG_VERSION).tar.gz
9 PKG_SOURCE_CAT := zcat
10 PKG_SOURCE_DIR := $(PKG_NAME)-$(PKG_VERSION)
11
12 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
13
14 PKG_PPP := $(PACKAGE_DIR)/ppp_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
15 PKG_PPP_PPPOE_PLUGIN := $(PACKAGE_DIR)/ppp-pppoe-plugin_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
16 PKG_PPP_RADIUS_PLUGIN := $(PACKAGE_DIR)/ppp-radius-plugin_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
17 PKG_PPPSTATS := $(PACKAGE_DIR)/pppstats_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
18 PKG_PPPDUMP := $(PACKAGE_DIR)/pppdump_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
19
20 I_PPP := $(PKG_BUILD_DIR)/ipkg/ppp
21 I_PPP_PPPOE_PLUGIN := $(PKG_BUILD_DIR)/ipkg/ppp-pppoe-plugin
22 I_PPP_RADIUS_PLUGIN := $(PKG_BUILD_DIR)/ipkg/ppp-radius-plugin
23 I_PPPDUMP := $(PKG_BUILD_DIR)/ipkg/pppdump
24 I_PPPSTATS := $(PKG_BUILD_DIR)/ipkg/pppstats
25
26 TARGETS := $(PKG_PPP)
27 ifneq ($(BR2_PACKAGE_PPP_PPPOE),)
28 TARGETS += $(PKG_PPP_PPPOE_PLUGIN)
29 endif
30 ifneq ($(BR2_PACKAGE_PPP_RADIUS),)
31 TARGETS += $(PKG_PPP_RADIUS_PLUGIN)
32 endif
33 ifneq ($(BR2_PACKAGE_PPPDUMP),)
34 TARGETS += $(PKG_PPPDUMP)
35 endif
36 ifneq ($(BR2_PACKAGE_PPPSTATS),)
37 TARGETS += $(PKG_PPPSTATS)
38 endif
39
40 $(DL_DIR)/$(PKG_SOURCE_FILE):
41 mkdir -p $(DL_DIR)
42 $(WGET) -P $(DL_DIR) $(PKG_SOURCE_SITE)/$(PKG_SOURCE_FILE)
43
44 $(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE)
45 mkdir -p $(TOOL_BUILD_DIR)
46 $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
47 $(PATCH) $(PKG_BUILD_DIR) . $(PKG_NAME).patch
48 touch $(PKG_BUILD_DIR)/.patched
49
50 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
51 (cd $(PKG_BUILD_DIR); \
52 rm -f config.cache; \
53 $(TARGET_CONFIGURE_OPTS) \
54 CFLAGS="$(TARGET_CFLAGS)" \
55 ./configure \
56 --target=$(GNU_TARGET_NAME) \
57 --host=$(GNU_TARGET_NAME) \
58 --build=$(GNU_HOST_NAME) \
59 --prefix=/usr \
60 --exec-prefix=/usr \
61 --bindir=/usr/bin \
62 --datadir=/usr/share \
63 --infodir=/usr/share/info \
64 --libexecdir=/usr/lib \
65 --localstatedir=/var \
66 --mandir=/usr/share/man \
67 --sbindir=/usr/sbin \
68 --sysconfdir=/etc \
69 $(DISABLE_NLS))
70 touch $(PKG_BUILD_DIR)/.configured
71
72 $(PKG_BUILD_DIR)/pppd/pppd $(PKG_BUILD_DIR)/pppd/plugins/radius/radius.so: $(PKG_BUILD_DIR)/.configured
73 $(MAKE) -C $(PKG_BUILD_DIR) \
74 CC=$(TARGET_CC) \
75 COPTS="$(TARGET_CFLAGS)" \
76 all
77
78 $(PKG_PPP): $(PKG_BUILD_DIR)/pppd/pppd
79 mkdir -p $(I_PPP)
80 cp -af ./ipkg/ppp/* $(I_PPP)
81 $(SCRIPT_DIR)/make-ipkg-dir.sh $(I_PPP) control/ppp.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
82 mkdir -p $(I_PPP)/usr/sbin
83 cp -af $(PKG_BUILD_DIR)/pppd/pppd $(I_PPP)/usr/sbin/
84 $(STRIP) $(I_PPP)/usr/sbin/*
85 mkdir -p $(I_PPP)/usr/lib/pppd
86 cp $(PKG_BUILD_DIR)/pppd/plugins/*.so $(I_PPP)/usr/lib/pppd/
87 $(STRIP) $(I_PPP)/usr/lib/pppd/*.so
88 mkdir -p $(I_PPP)/$(MODULES_SUBDIR)
89 cp $(MODULES_DIR)/kernel/drivers/net/ppp_async.o $(I_PPP)/$(MODULES_SUBDIR)
90 cp $(MODULES_DIR)/kernel/drivers/net/ppp_deflate.o $(I_PPP)/$(MODULES_SUBDIR)
91 cp $(MODULES_DIR)/kernel/drivers/net/bsd_comp.o $(I_PPP)/$(MODULES_SUBDIR)
92 $(IPKG_BUILD) $(I_PPP) $(PACKAGE_DIR)
93
94 $(PKG_PPP_PPPOE_PLUGIN): $(PKG_PPP)
95 $(SCRIPT_DIR)/make-ipkg-dir.sh $(I_PPP_PPPOE_PLUGIN) control/ppp-pppoe-plugin.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
96 mkdir -p $(I_PPP_PPPOE_PLUGIN)/usr/lib/pppd/rp-pppoe
97 cp -af $(PKG_BUILD_DIR)/pppd/plugins/rp-pppoe/rp-pppoe.so \
98 $(I_PPP_PPPOE_PLUGIN)/usr/lib/pppd/rp-pppoe
99 $(STRIP) $(I_PPP_PPPOE_PLUGIN)/usr/lib/pppd/*/*.so
100 mkdir -p $(I_PPP_PPPOE_PLUGIN)/$(MODULES_SUBDIR)
101 cp $(MODULES_DIR)/kernel/drivers/net/pppo*.o $(I_PPP_PPPOE_PLUGIN)/$(MODULES_SUBDIR)
102 $(IPKG_BUILD) $(I_PPP_PPPOE_PLUGIN) $(PACKAGE_DIR)
103
104 $(PKG_PPP_RADIUS_PLUGIN): $(PKG_PPP)
105 $(SCRIPT_DIR)/make-ipkg-dir.sh $(I_PPP_RADIUS_PLUGIN) control/ppp-radius-plugin.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
106 mkdir -p $(I_PPP_RADIUS_PLUGIN)/usr/lib/pppd/radius
107 cp -af $(PKG_BUILD_DIR)/pppd/plugins/radius/radius.so \
108 $(I_PPP_RADIUS_PLUGIN)/usr/lib/pppd/radius/
109 $(STRIP) $(I_PPP_RADIUS_PLUGIN)/usr/lib/pppd/*/*.so
110 $(IPKG_BUILD) $(I_PPP_RADIUS_PLUGIN) $(PACKAGE_DIR)
111
112 $(PKG_PPPDUMP): $(PKG_PPP)
113 $(SCRIPT_DIR)/make-ipkg-dir.sh $(I_PPPDUMP) control/pppdump.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
114 mkdir -p $(I_PPPDUMP)/usr/sbin
115 cp -af $(PKG_BUILD_DIR)/pppdump/pppdump $(I_PPPDUMP)/usr/sbin/
116 $(STRIP) $(I_PPPDUMP)/usr/sbin/*
117 $(IPKG_BUILD) $(I_PPPDUMP) $(PACKAGE_DIR)
118
119 $(PKG_PPPSTATS): $(PKG_PPP)
120 $(SCRIPT_DIR)/make-ipkg-dir.sh $(I_PPPSTATS) control/pppstats.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
121 mkdir -p $(I_PPPSTATS)/usr/sbin
122 cp -af $(PKG_BUILD_DIR)/pppstats/pppstats $(I_PPPSTATS)/usr/sbin/
123 $(STRIP) $(I_PPPSTATS)/usr/sbin/*
124 $(IPKG_BUILD) $(I_PPPSTATS) $(PACKAGE_DIR)
125
126
127 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
128 prepare: $(PKG_BUILD_DIR)/.patched
129 compile: $(TARGETS)
130 install: compile
131 $(IPKG) install $(PKG_PPP)
132 ifeq ($(BR2_PACKAGE_PPP_PPPOE),y)
133 $(IPKG) install $(PKG_PPP_PPPOE_PLUGIN)
134 endif
135 ifeq ($(BR2_PACKAGE_PPP_RADIUS),y)
136 $(IPKG) install $(PKG_PPP_RADIUS_PLUGIN)
137 endif
138 ifeq ($(BR2_PACKAGE_PPPDUMP),y)
139 $(IPKG) install $(PKG_PPPDUMP)
140 endif
141 ifeq ($(BR2_PACKAGE_PPPSTATS),y)
142 $(IPKG) install $(PKG_PPPSTATS)
143 endif
144
145 clean:
146 rm -rf $(PKG_BUILD_DIR)
147 rm -f $(PKG_PPP) $(PKG_PPP_PPPOE_PLUGIN) $(PKG_PPP_RADIUS_PLUGIN) $(PKG_PPPSTATS) $(PKG_PPPDUMP)
This page took 0.050158 seconds and 5 git commands to generate.