#
# 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:=pygattlib
VERSION_MAJOR:=20201113
PKG_VERSION:=$(VERSION_MAJOR)

PKG_SOURCE:=$(PKG_NAME)-v.$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/oscaracena/pygattlib/archive/refs/tags/v.20201113.tar.gz
PKG_MD5SUM:=f2c7b9e1a2b8692bf80f278a46e575c8
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-v.$(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)
TARGET_CFLAGS += -fpermissive

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

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

define Package/pygattlib/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,pygattlib))
$(eval $(call BuildPackage,pygattlib))
$(eval $(call BuildPackage,pygattlib-src))
