md5sum was left out
[openwrt.git] / package / iproute2 / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=iproute2
12 PKG_VERSION:=2.6.23
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/
17 PKG_MD5SUM:=2e59da739ef19990408cf0a5cb0cae3e
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/iproute2-$(PKG_VERSION)
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/iproute2/Default
24 SECTION:=net
25 CATEGORY:=Network
26 URL:=http://linux-net.osdl.org/index.php/Iproute2
27 endef
28
29 define Package/ip
30 $(call Package/iproute2/Default)
31 TITLE:=Routing control utility
32 endef
33
34 define Package/tc
35 $(call Package/iproute2/Default)
36 TITLE:=Traffic control utility
37 endef
38
39 define Package/genl
40 $(call Package/iproute2/Default)
41 TITLE:=General netlink utility frontend
42 endef
43
44 define Build/Configure
45 $(SED) "s:-O2:${TARGET_CFLAGS}:g" $(PKG_BUILD_DIR)/Makefile
46 $(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile
47 $(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \
48 $(PKG_BUILD_DIR)/Makefile
49 $(SED) "s,^LIBC_INCLUDE.*,LIBC_INCLUDE=$(STAGING_DIR)/include," \
50 $(PKG_BUILD_DIR)/Makefile
51 # For now disable compiling of the misc directory because it seems to fail
52 rm -rf $(PKG_BUILD_DIR)/misc
53 $(SED) "s, misc,," $(PKG_BUILD_DIR)/Makefile
54 endef
55
56 define Build/Compile
57 $(MAKE) -C $(PKG_BUILD_DIR)/netem HOSTCC="$(HOSTCC)" CFLAGS="-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -I ../include -DRESOLVE_HOSTNAMES"
58 $(MAKE) -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all tc/tc ip/ip
59 endef
60
61 define Package/ip/install
62 $(INSTALL_DIR) $(1)/usr/sbin
63 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ip/ip $(1)/usr/sbin/
64 endef
65
66 define Package/tc/install
67 $(INSTALL_DIR) $(1)/usr/sbin
68 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/sbin/
69 endef
70
71 define Package/genl/install
72 $(INSTALL_DIR) $(1)/usr/sbin
73 $(INSTALL_BIN) $(PKG_BUILD_DIR)/genl/genl $(1)/usr/sbin/
74 endef
75
76 $(eval $(call BuildPackage,ip))
77 $(eval $(call BuildPackage,tc))
78 $(eval $(call BuildPackage,genl))
79
80 $(eval $(call RequireCommand,bison, \
81 $(PKG_NAME) requires GNU bison. \
82 ))
This page took 0.037591 seconds and 5 git commands to generate.