2018-02-11 17:19:35 +00:00
|
|
|
#
|
2019-07-28 21:46:14 +00:00
|
|
|
# Copyright (C) 2018-2019 Michael Heimpold <mhei@heimpold.de>
|
2018-02-11 17:19:35 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libgpiod
|
2023-03-10 21:01:03 +00:00
|
|
|
PKG_VERSION:=1.6.4
|
2023-02-18 21:18:07 +00:00
|
|
|
PKG_RELEASE:=1
|
2018-02-11 17:19:35 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
|
|
PKG_SOURCE_URL:=@KERNEL/software/libs/libgpiod/
|
2023-03-10 21:01:03 +00:00
|
|
|
PKG_HASH:=7b146e12f28fbca3df7557f176eb778c5ccf952ca464698dba8a61b2e1e3f9b5
|
2018-02-11 17:19:35 +00:00
|
|
|
|
2020-09-02 23:35:15 +00:00
|
|
|
PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
|
2019-07-28 21:46:14 +00:00
|
|
|
PKG_LICENSE:=LGPL-2.1-or-later
|
2018-02-11 17:19:35 +00:00
|
|
|
PKG_LICENSE_FILES:=COPYING
|
|
|
|
|
|
|
|
PKG_INSTALL:=1
|
|
|
|
PKG_BUILD_PARALLEL:=1
|
2020-04-17 14:23:39 +00:00
|
|
|
PYTHON3_PKG_BUILD:=0
|
2018-02-11 17:19:35 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2020-01-25 14:41:32 +00:00
|
|
|
include ../../lang/python/python3-package.mk
|
2018-02-11 17:19:35 +00:00
|
|
|
|
|
|
|
ifneq ($(CONFIG_PACKAGE_gpiod-tools),)
|
|
|
|
CONFIGURE_ARGS += --enable-tools
|
|
|
|
endif
|
|
|
|
|
2023-03-10 21:01:03 +00:00
|
|
|
ifneq ($(CONFIG_PACKAGE_python3-gpiod),)
|
|
|
|
CONFIGURE_ARGS += --enable-bindings-python
|
|
|
|
CONFIGURE_VARS += \
|
|
|
|
PYTHON="$(STAGING_DIR_HOSTPKG)/bin/$(PYTHON3)" \
|
|
|
|
PYTHON_CPPFLAGS="$(shell $(STAGING_DIR)/host/bin/$(PYTHON3)-config --includes)" \
|
|
|
|
PYTHON_LIBS="$(shell $(STAGING_DIR)/host/bin/$(PYTHON3)-config --libs)"
|
|
|
|
endif
|
2020-01-25 14:41:32 +00:00
|
|
|
|
2018-02-11 17:19:35 +00:00
|
|
|
define Package/libgpiod
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
URL:=https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
|
|
|
|
TITLE:=Library for interacting with Linux's GPIO character device
|
2022-12-21 13:18:47 +00:00
|
|
|
KCONFIG:= \
|
2023-03-10 21:01:03 +00:00
|
|
|
CONFIG_GPIO_CDEV=y \
|
|
|
|
CONFIG_GPIO_CDEV_V1=y
|
2019-06-27 11:41:49 +00:00
|
|
|
DEPENDS:=@GPIO_SUPPORT
|
2018-02-11 17:19:35 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libgpiod/description
|
|
|
|
C library for interacting with the linux GPIO character device
|
|
|
|
(gpiod stands for GPIO device).
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/gpiod-tools
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
TITLE:=Tools for interacting with GPIO pins
|
|
|
|
DEPENDS:=+libgpiod
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/gpiod-tools/description
|
|
|
|
Tools for interacting with the linux GPIO character device
|
|
|
|
(gpiod stands for GPIO device).
|
|
|
|
endef
|
|
|
|
|
2020-01-25 14:41:32 +00:00
|
|
|
define Package/python3-gpiod
|
|
|
|
SECTION:=lang
|
|
|
|
CATEGORY:=Languages
|
|
|
|
SUBMENU:=Python
|
|
|
|
TITLE:=Python bindings for libgpiod
|
|
|
|
URL:=https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
|
|
|
|
DEPENDS:=+python3-light +libgpiod
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/python3-gpiod/description
|
|
|
|
This package contains the Python bindings for libgpiod.
|
|
|
|
endef
|
|
|
|
|
2018-02-11 17:19:35 +00:00
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/gpiod.h $(1)/usr/include/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpiod.{so*,a} $(1)/usr/lib/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libgpiod.pc $(1)/usr/lib/pkgconfig/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libgpiod/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2019-09-15 09:08:49 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgpiod.so.* $(1)/usr/lib/
|
2018-02-11 17:19:35 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/gpiod-tools/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
|
|
|
endef
|
|
|
|
|
2023-03-10 21:01:03 +00:00
|
|
|
define Package/python3-gpiod/install
|
|
|
|
$(INSTALL_DIR) $(1)/$(PYTHON3_PKG_DIR)
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/$(PYTHON3_PKG_DIR)/gpiod.so $(1)/$(PYTHON3_PKG_DIR)
|
2020-01-25 14:41:32 +00:00
|
|
|
endef
|
|
|
|
|
2018-02-11 17:19:35 +00:00
|
|
|
$(eval $(call BuildPackage,libgpiod))
|
|
|
|
$(eval $(call BuildPackage,gpiod-tools))
|
2020-01-25 14:41:32 +00:00
|
|
|
$(eval $(call BuildPackage,python3-gpiod))
|