Convert packages to new template
[openwrt.git] / package / iproute2 / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=iproute2
6 PKG_VERSION:=2.6.15-060110
7 PKG_RELEASE:=1
8
9 PKG_BUILD_DIR:=$(BUILD_DIR)/iproute2-$(PKG_VERSION)
10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
11 PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/
12 PKG_MD5SUM:=04f57a6d366d36426d276178b600f5c5
13 PKG_CAT:=zcat
14
15 include $(TOPDIR)/package/rules.mk
16
17 # define Package/iproute2
18 # SECTION:=base
19 # CATEGORY:=Network
20 # DEFAULT:=n
21 # MENU:=1
22 # TITLE:=A collection of utilites for controlling TCP/IP networking and Traffic Control
23 # endef
24
25 define Package/ip
26 SECTION:=base
27 CATEGORY:=Network
28 DEFAULT:=n
29 DEPENDS:=iproute2
30 TITLE:=A routing control utility
31 endef
32
33 define Package/tc
34 $(call Package/ip)
35 # DEPENDS:=kmod-sched
36 TITLE:=A traffic control utility
37 endef
38
39 define Build/Configure
40 $(SED) "s:-O2:${TARGET_CFLAGS}:g" $(PKG_BUILD_DIR)/Makefile
41 $(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile
42 $(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
43 $(PKG_BUILD_DIR)/Makefile
44 $(SED) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
45 $(PKG_BUILD_DIR)/Makefile
46 # For now disable compiling of the misc directory because it seems to fail
47 rm -rf $(PKG_BUILD_DIR)/misc
48 $(SED) "s, misc,," $(PKG_BUILD_DIR)/Makefile
49 endef
50
51 define Build/Compile
52 $(MAKE) -j1 -C $(PKG_BUILD_DIR)/netem HOSTCC=$(HOSTCC) CFLAGS="-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I ../include -DRESOLVE_HOSTNAMES"
53 $(MAKE) -j1 -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all tc/tc ip/ip
54 endef
55
56 define Package/ip/install
57 install -d -m0755 $(IDIR_IP)/usr/sbin
58 install -m0755 $(PKG_BUILD_DIR)/ip/ip $(IDIR_IP)/usr/sbin/
59 endef
60
61 define Package/tc/install
62 install -d -m0755 $(IDIR_TC)/usr/sbin
63 install -m0755 $(PKG_BUILD_DIR)/tc/tc $(IDIR_TC)/usr/sbin/
64 endef
65
66 # $(eval $(call BuildPackage,iproute2))
67 # $(eval $(call BuildPackage,ip))
68 # $(eval $(call BuildPackage,tc))
This page took 0.051727 seconds and 5 git commands to generate.