3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=4b3f335b0139cb909c6a2ae8bf72e548
10 PKG_SOURCE_URL
:=http
://developer.osdl.org
/dev
/iproute2
/download
/
11 PKG_SOURCE
:=$(PKG_NAME
)-2.6.9-041019.
tar.gz
12 PKG_BUILD_DIR
:=$(BUILD_DIR
)/iproute2-2.6
.9
15 PKG_IP
:=$(PACKAGE_DIR
)/ip_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
16 PKG_IP_DIR
:=$(PKG_BUILD_DIR
)/ipkg
/ip
18 PKG_TC
:=$(PACKAGE_DIR
)/tc_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
19 PKG_TC_DIR
:=$(PKG_BUILD_DIR
)/ipkg
/tc
21 $(DL_DIR
)/$(PKG_SOURCE
):
22 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
24 $(PKG_BUILD_DIR
)/.patched
: $(DL_DIR
)/$(PKG_SOURCE
)
25 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
26 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
27 $(SED
) "s:-O2:${TARGET_CFLAGS}:g" $(PKG_BUILD_DIR
)/Makefile
28 touch
$(PKG_BUILD_DIR
)/.patched
30 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.patched
31 $(SED
) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR
)/Makefile
32 $(SED
) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
33 $(PKG_BUILD_DIR
)/Makefile
34 $(SED
) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
35 $(PKG_BUILD_DIR
)/Makefile
36 # For now disable compiling of the misc directory because it seems to fail
37 rm -rf
$(PKG_BUILD_DIR
)/misc
38 $(SED
) "s, misc,," $(PKG_BUILD_DIR
)/Makefile
39 touch
$(PKG_BUILD_DIR
)/.configured
41 $(PKG_BUILD_DIR
)/tc
/tc
: $(PKG_BUILD_DIR
)/.configured
42 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(TARGET_CONFIGURE_OPTS
) KERNEL_INCLUDE
=$(LINUX_DIR
)/include all tc
/tc
44 $(PKG_BUILD_DIR
)/ip
/ip
: $(PKG_BUILD_DIR
)/.configured
45 $(MAKE
) -C
$(PKG_BUILD_DIR
) $(TARGET_CONFIGURE_OPTS
) KERNEL_INCLUDE
=$(LINUX_DIR
)/include all ip
/ip
48 $(PKG_IP
): $(PKG_BUILD_DIR
)/ip
/ip
$(PACKAGE_DIR
)
49 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IP_DIR
) ip.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
50 mkdir
-p
$(PKG_IP_DIR
)/usr
/sbin
51 cp
$< $(PKG_IP_DIR
)/usr
/sbin
/
52 $(STRIP
) $(PKG_IP_DIR
)/usr
/sbin
/*
53 $(IPKG_BUILD
) $(PKG_IP_DIR
) $(PACKAGE_DIR
)
55 $(IPKG_STATE_DIR
)/info/ip.list
: $(PKG_IP
)
56 $(IPKG
) install $(PKG_IP
)
58 $(PKG_TC
): $(PKG_BUILD_DIR
)/tc
/tc
$(PACKAGE_DIR
)
59 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_TC_DIR
) tc.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
60 mkdir
-p
$(PKG_TC_DIR
)/usr
/sbin
61 cp
$< $(PKG_TC_DIR
)/usr
/sbin
/
62 $(STRIP
) $(PKG_TC_DIR
)/usr
/sbin
/*
63 $(IPKG_BUILD
) $(PKG_TC_DIR
) $(PACKAGE_DIR
)
65 $(IPKG_STATE_DIR
)/info/tc.list
: $(PKG_TC
)
66 $(IPKG
) install $(PKG_TC
)
69 mkdir
-p
$(PACKAGE_DIR
)
72 ifneq ($(BR2_PACKAGE_IPROUTE2_IP
),)
75 ifneq ($(BR2_PACKAGE_IPROUTE2_TC
),)
79 ifeq ($(BR2_PACKAGE_IPROUTE2_IP
),y
)
80 INSTALL_TARGETS
+= $(IPKG_STATE_DIR
)/info/ip.list
82 ifeq ($(BR2_PACKAGE_IPROUTE2_TC
),y
)
83 INSTALL_TARGETS
+= $(IPKG_STATE_DIR
)/info/tc.list
86 source
: $(DL_DIR
)/$(PKG_SOURCE
)
87 prepare
: $(PKG_BUILD_DIR
)/.patched
89 install: $(INSTALL_TARGETS
)
92 rm -rf
$(PKG_BUILD_DIR
)
93 rm -f
$(PKG_IP
) $(PKG_TC
)