1 ################################################################################
5 ################################################################################
7 I2C_TOOLS_VERSION
= 3.1.1
8 I2C_TOOLS_SOURCE
= i2c-tools-
$(I2C_TOOLS_VERSION
).
tar.bz2
9 I2C_TOOLS_SITE
= http
://dl.lm-sensors.org
/i2c-tools
/releases
10 I2C_TOOLS_LICENSE
= GPLv2
+, GPLv2
(py-smbus
)
11 I2C_TOOLS_LICENSE_FILES
= COPYING
13 # Build/install steps mirror the distutil python package type in the python package
15 ifeq ($(BR2_PACKAGE_PYTHON
),y
)
16 I2C_TOOLS_DEPENDENCIES
+= python
17 # BASE_ENV taken from PKG_PYTHON_DISTUTILS_ENV in package/pkg-python.mk
18 I2C_TOOLS_PYTHON_BASE_ENV
= \
19 $(PKG_PYTHON_DISTUTILS_ENV
) \
20 CFLAGS
="$(TARGET_CFLAGS) -I../include"
22 define I2C_TOOLS_BUILD_PYSMBUS
24 $(I2C_TOOLS_PYTHON_BASE_ENV
) \
25 $(HOST_DIR
)/usr
/bin
/python setup.py build \
26 $(PKG_PYTHON_DISTUTILS_BUILD_OPTS
))
29 define I2C_TOOLS_INSTALL_PYSMBUS
31 $(I2C_TOOLS_PYTHON_BASE_ENV
) \
32 $(HOST_DIR
)/usr
/bin
/python setup.py
install \
33 $(PKG_PYTHON_DISTUTILS_INSTALL_TARGET_OPTS
))
36 endif # BR2_PACKAGE_PYTHON
38 define I2C_TOOLS_BUILD_CMDS
39 $(MAKE
) $(TARGET_CONFIGURE_OPTS
) -C
$(@D
)
40 $(I2C_TOOLS_BUILD_PYSMBUS
)
43 define I2C_TOOLS_INSTALL_TARGET_CMDS
44 for i in i2cdump i2cget i2cset i2cdetect
; \
46 $(INSTALL
) -m
755 -D
$(@D
)/tools
/$$i $(TARGET_DIR
)/usr
/bin
/$$i; \
48 $(I2C_TOOLS_INSTALL_PYSMBUS
)
51 $(eval
$(generic-package
))