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

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=qosapp
PKG_VERSION:=1.02
PKG_RELEASE:=11

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

PKG_CAT:=zcat

include $(INCLUDE_DIR)/package.mk

PKG_BUILD_DEPENDS:=kmod-qoscom

define Package/qosapp
  CATEGORY:=Mindspeed Packages
  DEFAULT:=y
  DEPENDS:=@TARGET_comcerto1000
  TITLE:=Comcerto 1000 QoS application
  DESCRIPTION:= \
     This package is a template application \
     that manages the Comcerto 1000's QoS blocks 
  URL:=http://www.mindspeed.com/
endef

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/qosapp/install
	@echo "Install.................."
	$(CP) $(PKG_BUILD_DIR)/binary/* $(1)
endef

$(eval $(call BuildPackage,qosapp))
