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
23 $(DL_DIR
)/$(PKG_SOURCE
):
24 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
26 $(PKG_BUILD_DIR
)/.patched
: $(DL_DIR
)/$(PKG_SOURCE
)
27 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
28 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
29 $(SED
) "s:-O2:${TARGET_CFLAGS}:g" $(PKG_BUILD_DIR
)/Makefile
30 touch
$(PKG_BUILD_DIR
)/.patched
32 $(PKG_BUILD_DIR
)/.configured
: $(PKG_BUILD_DIR
)/.patched
33 $(SED
) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR
)/Makefile
34 $(SED
) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
35 $(PKG_BUILD_DIR
)/Makefile
36 $(SED
) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
37 $(PKG_BUILD_DIR
)/Makefile
38 # For now disable compiling of the misc directory because it seems to fail
39 rm -rf
$(PKG_BUILD_DIR
)/misc
40 $(SED
) "s, misc,," $(PKG_BUILD_DIR
)/Makefile
41 touch
$(PKG_BUILD_DIR
)/.configured
43 $(PKG_BUILD_DIR
)/tc
/tc
: $(PKG_BUILD_DIR
)/.configured
44 $(MAKE
) -j1
-C
$(PKG_BUILD_DIR
) $(TARGET_CONFIGURE_OPTS
) KERNEL_INCLUDE
=$(LINUX_DIR
)/include all tc
/tc
46 $(PKG_BUILD_DIR
)/ip
/ip
: $(PKG_BUILD_DIR
)/.configured
47 $(MAKE
) -j1
-C
$(PKG_BUILD_DIR
) $(TARGET_CONFIGURE_OPTS
) KERNEL_INCLUDE
=$(LINUX_DIR
)/include all ip
/ip
50 $(PKG_IP
): $(PKG_BUILD_DIR
)/ip
/ip
$(PACKAGE_DIR
)
51 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_IP_DIR
) ip.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
52 mkdir
-p
$(PKG_IP_DIR
)/usr
/sbin
53 cp
$< $(PKG_IP_DIR
)/usr
/sbin
/
54 $(STRIP
) $(PKG_IP_DIR
)/usr
/sbin
/*
55 $(IPKG_BUILD
) $(PKG_IP_DIR
) $(PACKAGE_DIR
)
57 $(IPKG_STATE_DIR
)/info/ip.list
: $(PKG_IP
)
58 $(IPKG
) install $(PKG_IP
)
60 $(PKG_TC
): $(PKG_BUILD_DIR
)/tc
/tc
$(PACKAGE_DIR
)
61 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(PKG_TC_DIR
) tc.control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
62 mkdir
-p
$(PKG_TC_DIR
)/usr
/sbin
63 cp
$< $(PKG_TC_DIR
)/usr
/sbin
/
64 $(STRIP
) $(PKG_TC_DIR
)/usr
/sbin
/*
65 $(IPKG_BUILD
) $(PKG_TC_DIR
) $(PACKAGE_DIR
)
67 $(IPKG_STATE_DIR
)/info/tc.list
: $(PKG_TC
)
68 $(IPKG
) install $(PKG_TC
)
71 mkdir
-p
$(PACKAGE_DIR
)
74 ifneq ($(BR2_PACKAGE_IPROUTE2_IP
),)
77 ifneq ($(BR2_PACKAGE_IPROUTE2_TC
),)
81 ifeq ($(BR2_PACKAGE_IPROUTE2_IP
),y
)
82 INSTALL_TARGETS
+= $(IPKG_STATE_DIR
)/info/ip.list
84 ifeq ($(BR2_PACKAGE_IPROUTE2_TC
),y
)
85 INSTALL_TARGETS
+= $(IPKG_STATE_DIR
)/info/tc.list
88 source
: $(DL_DIR
)/$(PKG_SOURCE
)
89 prepare
: $(PKG_BUILD_DIR
)/.patched
91 install: $(INSTALL_TARGETS
)
94 rm -rf
$(PKG_BUILD_DIR
)
95 rm -f
$(PKG_IP
) $(PKG_TC
)