package/zic: bump version to 2015e
[buildroot-gz.git] / package / i2c-tools / i2c-tools.mk
blob6c156ca421344f2f2600777475be7d0e192f67b2
1 ################################################################################
3 # i2c-tools
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
14 # infrastructure
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
23 (cd $(@D)/py-smbus; \
24 $(I2C_TOOLS_PYTHON_BASE_ENV) \
25 $(HOST_DIR)/usr/bin/python setup.py build \
26 $(PKG_PYTHON_DISTUTILS_BUILD_OPTS))
27 endef
29 define I2C_TOOLS_INSTALL_PYSMBUS
30 (cd $(@D)/py-smbus; \
31 $(I2C_TOOLS_PYTHON_BASE_ENV) \
32 $(HOST_DIR)/usr/bin/python setup.py install \
33 $(PKG_PYTHON_DISTUTILS_INSTALL_TARGET_OPTS))
34 endef
36 endif # BR2_PACKAGE_PYTHON
38 define I2C_TOOLS_BUILD_CMDS
39 $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
40 $(I2C_TOOLS_BUILD_PYSMBUS)
41 endef
43 define I2C_TOOLS_INSTALL_TARGET_CMDS
44 for i in i2cdump i2cget i2cset i2cdetect; \
45 do \
46 $(INSTALL) -m 755 -D $(@D)/tools/$$i $(TARGET_DIR)/usr/bin/$$i; \
47 done
48 $(I2C_TOOLS_INSTALL_PYSMBUS)
49 endef
51 $(eval $(generic-package))