Port heyu to -ng
[openwrt/svn-archive/archive.git] / utils / heyu / Makefile
1 # Copyright (C) 2006 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6 # $Id$
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=heyu
11 PKG_VERSION:=2.0beta.5
12 PKG_RELEASE:=1
13 PKG_MD5SUM:=8289d5ca5b972333a72bc0fc3e640c13
14 PKG_SOURCE_URL:=http://heyu.tanj.com/download/
15 PKG_SOURCE:=heyu-$(PKG_VERSION).tgz
16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
17 PKG_CAT:=zcat
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/heyu
22 SECTION:=utils
23 CATEGORY:=Utilities
24 DEPENDS:=+setserial
25 TITLE:=X10 home automation control using a CM11A
26 DESCRIPTION:=10 home automation control using the CM11A serial device.
27 URL:=http://heyu.tanj.com/heyu2/
28 endef
29
30 define Package/heyu/conffiles
31 /etc/heyu/x10.conf
32 endef
33
34 define Build/Compile
35 $(MAKE) -C $(PKG_BUILD_DIR) \
36 CC=$(TARGET_CC) LD=$(TARGET_CROSS)ld \
37 CFLAGS="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR) -DSYSV -DPOSIX -DHAS_ITIMER -DLINUX -DHASSELECT -DHASTZ"
38 endef
39
40 define Package/heyu/install
41 install -d -m0755 $(1)/etc/$(PKG_NAME)
42 install -m0644 ./files/x10.conf $(1)/etc/$(PKG_NAME)/x10.conf
43 install -d -m0755 $(1)/usr/bin
44 install -m0644 $(PKG_BUILD_DIR)/heyu $(1)/usr/bin/
45 endef
46
47 $(eval $(call BuildPackage,heyu))