Download or pull OpenWRT repository, and create a directory gattlib
in the openwrt/package/libs/
path, and copy the Makefile
file to this directory.
Enjoy it.
Created
November 17, 2021 10:20
-
-
Save idoop/7e56ed5a90c971a2a88c3a62cf0d16b4 to your computer and use it in GitHub Desktop.
GattLib as OpenWRT package
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright (C) 2020-2030 OpenWrt.org | |
# | |
# This is free software, licensed under the GNU General Public License v2. | |
# See /LICENSE for more information. | |
# Author: Chen Yang <[email protected]> | |
# Github: https://github.com/idoop | |
include $(TOPDIR)/rules.mk | |
PKG_NAME:=gattlib | |
PKG_VERSION:=master | |
PKG_RELEASE:=1 | |
PKG_SOURCE_PROTO:=git | |
PKG_SOURCE_URL:=https://github.com/labapart/gattlib.git | |
PKG_SOURCE_DATE:=2021-10-18 | |
PKG_SOURCE_VERSION:=1afaa8b460d0395989663e0e3baa6f8aeec48b78 | |
PKG_MAINTAINER:=Chen Yang <[email protected]> | |
PKG_LICENSE:=BSD-3-Clause | |
PKG_BUILD_PARALLEL:=1 | |
PKG_INSTALL:=1 | |
include $(INCLUDE_DIR)/package.mk | |
include $(INCLUDE_DIR)/cmake.mk | |
define Package/$(PKG_NAME) | |
SECTION:=libs | |
CATEGORY:=Libraries | |
DEPENDS:=+bluez-daemon +bluez-utils +libpcre | |
TITLE:=GattLib | |
endef | |
define Package/$(PKG_NAME)/description | |
GattLib is a library used to access Generic Attribute Profile (GATT) protocol of BLE (Bluetooth Low Energy) devices. | |
endef | |
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include | |
CMAKE_OPTIONS = \ | |
-DGATTLIB_BUILD_DOCS=OFF \ | |
-DGATTLIB_BUILD_EXAMPLES=OFF \ | |
-DGATTLIB_PYTHON_INTERFACE=OFF | |
define Build/InstallDev | |
$(INSTALL_DIR) $(1)/usr/include | |
$(INSTALL_DIR) $(1)/usr/lib | |
$(CP) $(PKG_BUILD_DIR)/include/* $(1)/usr/include/ | |
$(CP) $(PKG_BUILD_DIR)/dbus/lib* $(1)/usr/lib/ | |
endef | |
define Package/$(PKG_NAME)/install | |
$(INSTALL_DIR) $(1)/usr/lib | |
$(CP) $(PKG_BUILD_DIR)/dbus/lib* $(1)/usr/lib/ | |
endef | |
$(eval $(call BuildPackage,$(PKG_NAME))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment