i2c-tools: make the python dependency optional
git-svn-id: svn://svn.openwrt.org/openwrt/packages@27280 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
2466c2a93f
commit
d72d2fb2da
@ -16,7 +16,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
|||||||
PKG_SOURCE_URL:=http://dl.lm-sensors.org/i2c-tools/releases
|
PKG_SOURCE_URL:=http://dl.lm-sensors.org/i2c-tools/releases
|
||||||
PKG_MD5SUM:=511376eed04455cdb277ef19c5f73bb4
|
PKG_MD5SUM:=511376eed04455cdb277ef19c5f73bb4
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=python
|
PKG_BUILD_DEPENDS:=PACKAGE_python-smbus:python
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
$(call include_mk, python-package.mk)
|
$(call include_mk, python-package.mk)
|
||||||
@ -35,7 +35,7 @@ define Package/python-smbus
|
|||||||
CATEGORY:=Languages
|
CATEGORY:=Languages
|
||||||
TITLE:=Python bindings for the SMBUS
|
TITLE:=Python bindings for the SMBUS
|
||||||
URL:=http://www.lm-sensors.org/wiki/I2CTools
|
URL:=http://www.lm-sensors.org/wiki/I2CTools
|
||||||
DEPENDS:= +python-mini +i2c-tools
|
DEPENDS:= +PACKAGE_python-smbus:python-mini +i2c-tools
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/i2c-tools/description
|
define Package/i2c-tools/description
|
||||||
@ -56,15 +56,21 @@ endef
|
|||||||
|
|
||||||
TARGET_CPPFLAGS += -I$(LINUX_DIR)/include
|
TARGET_CPPFLAGS += -I$(LINUX_DIR)/include
|
||||||
|
|
||||||
|
ifdef CONFIG_PACKAGE_python-smbus
|
||||||
|
define Build/Compile/python-smbus
|
||||||
|
$(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false)
|
||||||
|
$(call Build/Compile/PyMod,./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)" \
|
||||||
CC="$(TARGET_CC)" \
|
CC="$(TARGET_CC)" \
|
||||||
STAGING_DIR="$(STAGING_DIR)"
|
STAGING_DIR="$(STAGING_DIR)"
|
||||||
$(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false)
|
$(Build/Compile/python-smbus)
|
||||||
$(call Build/Compile/PyMod,./py-smbus/, \
|
|
||||||
install --prefix="$(PKG_INSTALL_DIR)/usr", \
|
|
||||||
)
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/i2c-tools/install
|
define Package/i2c-tools/install
|
||||||
|
Loading…
x
Reference in New Issue
Block a user