remove CVS directories from ppp packages
[openwrt.git] / openwrt / package / ppp / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME := ppp
6 PKG_VERSION := 2.4.3
7 PKG_RELEASE := 3
8 PKG_MD5SUM := 848f6c3cafeb6074ffeb293c3af79b7c
9
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)
15
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
21
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
27
28 TARGETS := $(PKG_PPP)
29 ifneq ($(BR2_PACKAGE_PPP_PPPOE),)
30 TARGETS += $(PKG_PPP_PPPOE_PLUGIN)
31 endif
32 ifneq ($(BR2_PACKAGE_PPP_RADIUS),)
33 TARGETS += $(PKG_PPP_RADIUS_PLUGIN)
34 endif
35 ifneq ($(BR2_PACKAGE_PPPDUMP),)
36 TARGETS += $(PKG_PPPDUMP)
37 endif
38 ifneq ($(BR2_PACKAGE_PPPSTATS),)
39 TARGETS += $(PKG_PPPSTATS)
40 endif
41
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
45 endif
46 ifeq ($(BR2_PACKAGE_PPP_RADIUS),y)
47 INSTALL_TARGETS += $(IPKG_STATE_DIR)/info/ppp-radius-plugin.list
48 endif
49 ifeq ($(BR2_PACKAGE_PPPDUMP),y)
50 INSTALL_TARGETS += $(IPKG_STATE_DIR)/info/pppdump.list
51 endif
52 ifeq ($(BR2_PACKAGE_PPPSTATS),y)
53 INSTALL_TARGETS += $(IPKG_STATE_DIR)/info/pppstats.list
54 endif
55
56 $(DL_DIR)/$(PKG_SOURCE_FILE):
57 mkdir -p $(DL_DIR)
58 $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
59
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
65
66 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched
67 (cd $(PKG_BUILD_DIR); \
68 rm -f config.cache; \
69 $(TARGET_CONFIGURE_OPTS) \
70 CFLAGS="$(TARGET_CFLAGS)" \
71 ./configure \
72 --target=$(GNU_TARGET_NAME) \
73 --host=$(GNU_TARGET_NAME) \
74 --build=$(GNU_HOST_NAME) \
75 --prefix=/usr \
76 --exec-prefix=/usr \
77 --bindir=/usr/bin \
78 --datadir=/usr/share \
79 --infodir=/usr/share/info \
80 --libexecdir=/usr/lib \
81 --localstatedir=/var \
82 --mandir=/usr/share/man \
83 --sbindir=/usr/sbin \
84 --sysconfdir=/etc \
85 $(DISABLE_NLS))
86 touch $(PKG_BUILD_DIR)/.configured
87
88 $(PKG_BUILD_DIR)/pppd/pppd $(PKG_BUILD_DIR)/pppd/plugins/radius/radius.so: $(PKG_BUILD_DIR)/.configured
89 $(MAKE) -C $(PKG_BUILD_DIR) \
90 CC=$(TARGET_CC) \
91 COPTS="$(TARGET_CFLAGS)" \
92 all
93
94 $(PKG_PPP): $(PKG_BUILD_DIR)/pppd/pppd
95 mkdir -p $(I_PPP)
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 find $(I_PPP) -name CVS | xargs rm -rf
109 $(IPKG_BUILD) $(I_PPP) $(PACKAGE_DIR)
110
111 $(IPKG_STATE_DIR)/info/ppp.list: $(PKG_PPP)
112 $(IPKG) install $(PKG_PPP)
113
114 $(PKG_PPP_PPPOE_PLUGIN): $(PKG_PPP)
115 $(SCRIPT_DIR)/make-ipkg-dir.sh $(I_PPP_PPPOE_PLUGIN) control/ppp-pppoe-plugin.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
116 mkdir -p $(I_PPP_PPPOE_PLUGIN)/usr/lib/pppd/rp-pppoe
117 cp -af $(PKG_BUILD_DIR)/pppd/plugins/rp-pppoe/rp-pppoe.so \
118 $(I_PPP_PPPOE_PLUGIN)/usr/lib/pppd/rp-pppoe
119 $(STRIP) $(I_PPP_PPPOE_PLUGIN)/usr/lib/pppd/*/*.so
120 mkdir -p $(I_PPP_PPPOE_PLUGIN)/$(MODULES_SUBDIR)
121 cp $(MODULES_DIR)/kernel/drivers/net/pppo*.o $(I_PPP_PPPOE_PLUGIN)/$(MODULES_SUBDIR)
122 find $(I_PPP_PPPOE_PLUGIN) -name CVS | xargs rm -rf
123 $(IPKG_BUILD) $(I_PPP_PPPOE_PLUGIN) $(PACKAGE_DIR)
124
125 $(IPKG_STATE_DIR)/info/ppp-pppoe-plugin.list: $(PKG_PPP_PPPOE_PLUGIN)
126 $(IPKG) install $(PKG_PPP_PPPOE_PLUGIN)
127
128 $(PKG_PPP_RADIUS_PLUGIN): $(PKG_PPP)
129 $(SCRIPT_DIR)/make-ipkg-dir.sh $(I_PPP_RADIUS_PLUGIN) control/ppp-radius-plugin.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
130 mkdir -p $(I_PPP_RADIUS_PLUGIN)/usr/lib/pppd/radius
131 cp -af $(PKG_BUILD_DIR)/pppd/plugins/radius/radius.so \
132 $(I_PPP_RADIUS_PLUGIN)/usr/lib/pppd/radius/
133 $(STRIP) $(I_PPP_RADIUS_PLUGIN)/usr/lib/pppd/*/*.so
134 find $(I_PPP_RADIUS_PLUGIN) -name CVS | xargs rm -rf
135 $(IPKG_BUILD) $(I_PPP_RADIUS_PLUGIN) $(PACKAGE_DIR)
136
137 $(IPKG_STATE_DIR)/info/ppp-radius-plugin.list: $(PKG_PPP_RADIUS_PLUGIN)
138 $(IPKG) install $(PKG_PPP_RADIUS_PLUGIN)
139
140 $(PKG_PPPDUMP): $(PKG_PPP)
141 $(SCRIPT_DIR)/make-ipkg-dir.sh $(I_PPPDUMP) control/pppdump.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
142 mkdir -p $(I_PPPDUMP)/usr/sbin
143 cp -af $(PKG_BUILD_DIR)/pppdump/pppdump $(I_PPPDUMP)/usr/sbin/
144 $(STRIP) $(I_PPPDUMP)/usr/sbin/*
145 find $(I_PPPDUMP) -name CVS | xargs rm -rf
146 $(IPKG_BUILD) $(I_PPPDUMP) $(PACKAGE_DIR)
147
148 $(IPKG_STATE_DIR)/info/pppdump.list: $(PKG_PPPDUMP)
149 $(IPKG) install $(PKG_PPPDUMP)
150
151 $(PKG_PPPSTATS): $(PKG_PPP)
152 $(SCRIPT_DIR)/make-ipkg-dir.sh $(I_PPPSTATS) control/pppstats.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
153 mkdir -p $(I_PPPSTATS)/usr/sbin
154 cp -af $(PKG_BUILD_DIR)/pppstats/pppstats $(I_PPPSTATS)/usr/sbin/
155 $(STRIP) $(I_PPPSTATS)/usr/sbin/*
156 find $(I_PPPSTATS) -name CVS | xargs rm -rf
157 $(IPKG_BUILD) $(I_PPPSTATS) $(PACKAGE_DIR)
158
159 $(IPKG_STATE_DIR)/info/pppstats.list: $(PKG_PPPSTATS)
160 $(IPKG) install $(PKG_PPPSTATS)
161
162 source: $(DL_DIR)/$(PKG_SOURCE_FILE)
163 prepare: $(PKG_BUILD_DIR)/.patched
164 compile: $(TARGETS)
165 install: $(INSTALL_TARGETS)
166
167 clean:
168 rm -rf $(PKG_BUILD_DIR)
169 rm -f $(PKG_PPP) $(PKG_PPP_PPPOE_PLUGIN) $(PKG_PPP_RADIUS_PLUGIN) $(PKG_PPPSTATS) $(PKG_PPPDUMP)
This page took 0.049775 seconds and 5 git commands to generate.