#
# Copyright (C) 2007-2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=temper
PKG_VERSION:=1.0
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install

include $(INCLUDE_DIR)/package.mk

define Package/temper
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=temper
  URL:=http://../
  DEPENDS:=+libusb
endef

#
# copy the source code to build folder
#

EX_LIBS  = -L$(STAGING_DIR)/usr/lib -lusb
INCLUDES = -I$(STAGING_DIR)/usr/include -I$(LINUX_DIR)/include 

#TARGET_CFLAGS += $(INCLUDES) -g
TARGET_CFLAGS += $(INCLUDES)

define Build/Compile
	@echo "Compiling..................."
	$(INSTALL_DIR) $(PKG_BUILD_DIR)/binary
	tar xzfO $(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_arm.ipk ./data.tar.gz | tar -C $(PKG_BUILD_DIR)/binary -xzf -

endef
define Package/temper/install
	@echo "Install.................."
	$(CP) $(PKG_BUILD_DIR)/binary/* $(1)
endef

$(eval $(call BuildPackage,temper))
