# $FreeWRT$
#-
# This file is part of the FreeWRT project. FreeWRT is copyrighted
# material, please see the LICENCE file in the top-level directory
# or at http://www.freewrt.org/licence for details.

include $(TOPDIR)/rules.mk

PKG_NAME:=		wondershaper
PKG_VERSION:=		1.1a
PKG_RELEASE:=		2
PKG_MD5SUM:=		bbc5a3a4485ab286e337ce8550e7b990
PKG_INIT:=		80
PKG_SOURCE_URL:=	http://lartc.org/wondershaper/
PKG_SOURCE:=		$(PKG_NAME)-$(PKG_VERSION).tar.gz

include $(TOPDIR)/mk/package.mk

$(eval $(call PKG_template,WONDERSHAPER,wondershaper,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))

$(WRKBUILD)/.configured:
	touch $@

$(WRKBUILD)/.built:
	mkdir -p $(WRKINST)
	touch $@

$(IPKG_WONDERSHAPER):
	install -d -m0755 $(IDIR_WONDERSHAPER)/usr/sbin
	install -d -m0755 $(IDIR_WONDERSHAPER)/etc/init.d
	$(CP) $(WRKBUILD)/wshaper.htb $(IDIR_WONDERSHAPER)/usr/sbin/wshaper
	$(CP) $(WRKBUILD)/wshaper.conf $(IDIR_WONDERSHAPER)/etc/wshaper.conf
	$(INSTALL_BIN) ./files/wondershaper.init \
		$(IDIR_WONDERSHAPER)/etc/init.d/S$(PKG_INIT)wondershaper
	$(IPKG_BUILD) $(IDIR_WONDERSHAPER) $(PACKAGE_DIR)

