#
# Copyright (C) 2015-2016 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:=pybluez
VERSION_MAJOR:=0
VERSION_REVISION:=23
PKG_VERSION:=$(VERSION_MAJOR).$(VERSION_REVISION)

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/pybluez/pybluez/archive/refs/tags/0.23.tar.gz
PKG_MD5SUM:=0d36204485cb8e56cd84f82a15b027e2
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE.rst
PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>

include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/python/python-package.mk

PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)

define Package/pybluez
	SECTION:=lang
	CATEGORY:=Languages
	SUBMENU:=Python
	TITLE:=pybluez
	URL:=https://github.com/kjd/crcmod
	DEPENDS:=+python-light +bluez-libs +gattlib
	VARIANT:=python
endef

define Package/pybluez-src
	SECTION:=lang
	CATEGORY:=Languages
	SUBMENU:=Python
	TITLE:=pybluez src
	URL:=https://github.com/kjd/crcmod
	DEPENDS:=+python-light +bluez-libs +gattlib
	VARIANT:=python
endef

define Package/pybluez/description
A library to support the Internationalised Domain Names in Applications
(snap7) protocol as specified in RFC 5891. This version of the protocol
is often referred to as "snap72008" and can produce different results
from the earlier standard from 2003.
endef


$(eval $(call PyPackage,pybluez))
$(eval $(call BuildPackage,pybluez))
$(eval $(call BuildPackage,pybluez-src))
