|
@ -26,6 +26,7 @@ PKG_LICENSE_FILES:=COPYING |
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk |
|
|
include $(INCLUDE_DIR)/package.mk |
|
|
$(call include_mk, python-package.mk) |
|
|
$(call include_mk, python-package.mk) |
|
|
|
|
|
$(call include_mk, python3-package.mk) |
|
|
|
|
|
|
|
|
define Package/i2c/Default |
|
|
define Package/i2c/Default |
|
|
URL:=http://lm-sensors.org/wiki/I2CTools |
|
|
URL:=http://lm-sensors.org/wiki/I2CTools |
|
@ -48,6 +49,15 @@ define Package/python-smbus |
|
|
DEPENDS:=+python-light |
|
|
DEPENDS:=+python-light |
|
|
endef |
|
|
endef |
|
|
|
|
|
|
|
|
|
|
|
define Package/python3-smbus |
|
|
|
|
|
$(call Package/i2c/Default) |
|
|
|
|
|
SUBMENU:=Python |
|
|
|
|
|
SECTION:=lang |
|
|
|
|
|
CATEGORY:=Languages |
|
|
|
|
|
TITLE:=Python bindings for the SMBUS |
|
|
|
|
|
DEPENDS:=+python3-light |
|
|
|
|
|
endef |
|
|
|
|
|
|
|
|
define Package/i2c-tools/description |
|
|
define Package/i2c-tools/description |
|
|
This package contains an heterogeneous set of I2C tools for Linux. These tools |
|
|
This package contains an heterogeneous set of I2C tools for Linux. These tools |
|
|
were originally part of the lm-sensors package. |
|
|
were originally part of the lm-sensors package. |
|
@ -57,6 +67,10 @@ define Package/python-smbus/description |
|
|
This package contain the python bindings for Linux SMBus access through i2c-dev. |
|
|
This package contain the python bindings for Linux SMBus access through i2c-dev. |
|
|
endef |
|
|
endef |
|
|
|
|
|
|
|
|
|
|
|
define Package/python3-smbus/description |
|
|
|
|
|
This package contain the python bindings for Linux SMBus access through i2c-dev. |
|
|
|
|
|
endef |
|
|
|
|
|
|
|
|
TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)/include |
|
|
TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)/include |
|
|
|
|
|
|
|
|
ifdef CONFIG_PACKAGE_python-smbus |
|
|
ifdef CONFIG_PACKAGE_python-smbus |
|
@ -68,6 +82,15 @@ ifdef CONFIG_PACKAGE_python-smbus |
|
|
endef |
|
|
endef |
|
|
endif |
|
|
endif |
|
|
|
|
|
|
|
|
|
|
|
ifdef CONFIG_PACKAGE_python3-smbus |
|
|
|
|
|
define Build/Compile/python3-smbus |
|
|
|
|
|
$(if $(Build/Compile/Py3Mod),,@echo Python3 packaging code not found.; false) |
|
|
|
|
|
$(call Build/Compile/Py3Mod,./py-smbus/, \
|
|
|
|
|
|
install --prefix="$(PKG_INSTALL_DIR)/usr", \
|
|
|
|
|
|
) |
|
|
|
|
|
endef |
|
|
|
|
|
endif |
|
|
|
|
|
|
|
|
define Build/Compile |
|
|
define Build/Compile |
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
LINUX="$(LINUX_DIR)" \
|
|
|
LINUX="$(LINUX_DIR)" \
|
|
@ -76,6 +99,7 @@ define Build/Compile |
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
|
CFLAGS="$(TARGET_CFLAGS)" |
|
|
CFLAGS="$(TARGET_CFLAGS)" |
|
|
$(Build/Compile/python-smbus) |
|
|
$(Build/Compile/python-smbus) |
|
|
|
|
|
$(Build/Compile/python3-smbus) |
|
|
endef |
|
|
endef |
|
|
|
|
|
|
|
|
define Package/i2c-tools/install |
|
|
define Package/i2c-tools/install |
|
@ -87,9 +111,15 @@ define Package/i2c-tools/install |
|
|
endef |
|
|
endef |
|
|
|
|
|
|
|
|
define PyPackage/python-smbus/filespec |
|
|
define PyPackage/python-smbus/filespec |
|
|
+|$(PYTHON_PKG_DIR)/smbus.so |
|
|
|
|
|
|
|
|
+|$(PYTHON_PKG_DIR) |
|
|
|
|
|
endef |
|
|
|
|
|
|
|
|
|
|
|
define PyPackage/python3-smbus/filespec |
|
|
|
|
|
+|$(PYTHON3_PKG_DIR) |
|
|
endef |
|
|
endef |
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,i2c-tools)) |
|
|
$(eval $(call BuildPackage,i2c-tools)) |
|
|
$(eval $(call PyPackage,python-smbus)) |
|
|
$(eval $(call PyPackage,python-smbus)) |
|
|
$(eval $(call BuildPackage,python-smbus)) |
|
|
$(eval $(call BuildPackage,python-smbus)) |
|
|
|
|
|
$(eval $(call PyPackage,python3-smbus)) |
|
|
|
|
|
$(eval $(call BuildPackage,python3-smbus)) |