[packages] click: store the git hash in the PKG_REV variable, add PKG_RELEASE, remove...
[openwrt/svn-archive/archive.git] / net / click / Makefile
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=click
11 PKG_VERSION:=20101002
12 PKG_RELEASE:=1
13 PKG_REV:=04f9a6ea146793881caa6b1721872a92d8c2ddcf
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=git://read.cs.ucla.edu/git/click
17 PKG_SOURCE_PROTO:=git
18 PKG_SOURCE_VERSION:=$(PKG_REV)
19 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
20 PKG_MD5SUM:=e2f144265b5b61804b0634bf567bee5b
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/click
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=@BROKEN
28 TITLE:=Click Modular Router
29 URL:=http://read.cs.ucla.edu/click
30 endef
31
32 define Package/click/Description
33 The Click Modular Router userspace package
34 endef
35
36 TARGET_CFLAGS += "-static -O2 -MD"
37 TARGET_CXXFLAGS += "-static -O2 -MD"
38
39 define Build/Configure
40 (cd $(PKG_BUILD_DIR); \
41 rm -rf config.{cache,status} ; \
42 "./configure \
43 --prefix=/usr \
44 --enable-userlevel \
45 --enable-wifi \
46 --enable-fixincludes \
47 --disable-linuxmodule" ; \
48 rm -rf config.{cache,status} ; \
49 ./configure \
50 --prefix=/usr \
51 --target=$(GNU_TARGET_NAME) \
52 --host=$(GNU_TARGET_NAME) \
53 --build=$(GNU_HOST_NAME) \
54 --enable-tools=mixed \
55 --enable-userlevel \
56 --enable-wifi \
57 --enable-fixincludes \
58 --disable-linuxmodule \
59 )
60 endef
61
62 define Build/Compile
63 $(MAKE) -C $(PKG_BUILD_DIR) \
64 tools elementmap.xml
65 (cd $(PKG_BUILD_DIR)/userlevel; \
66 ../tools/click-mkmindriver/click-mkmindriver -p $(PKG_NAME) -C .. \
67 -f $(PKG_BUILD_DIR)/conf/wifi/dump.click \
68 -A --all -E Discard -E Print; \
69 )
70 $(MAKE) -C $(PKG_BUILD_DIR) MINDRIVER=$(PKG_NAME)
71 endef
72
73 define Package/click/install
74 $(INSTALL_DIR) $(1)/usr
75 $(INSTALL_DIR) $(1)/usr/bin
76 $(INSTALL_DIR) $(1)/usr/share/click
77 $(CP) $(PKG_BUILD_DIR)/userlevel/$(PKG_NAME)click $(1)/usr/bin/click
78 $(CP) $(PKG_BUILD_DIR)/tools/click-align/click-align $(1)/usr/bin/click-align
79 $(CP) $(PKG_BUILD_DIR)/elementmap.xml $(1)/usr/share/click/elementmap.xml
80 endef
81
82 $(eval $(call BuildPackage,click))