• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/i2c-tools/i2c-tools.mk
Angelo CompagnucciAngelo Compagnucci committed 140d66a80fb18 Jun 2015
Raw file
Source viewDiff to previous
 
1
################################################################################
2
#
3
# i2c-tools
4
#
5
################################################################################
6
​
7
I2C_TOOLS_VERSION = 3.1.2
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
12
​
13
ifeq ($(BR2_PACKAGE_PYTHON),y)
14
I2C_TOOLS_DEPENDENCIES += python
15
endif
16
​
17
ifeq ($(BR2_PACKAGE_PYTHON3),y)
18
I2C_TOOLS_DEPENDENCIES += python3
19
endif
20
​
21
# Build/install steps mirror the distutil python package type in the python package
22
# infrastructure
23
ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)
24
# BASE_ENV taken from PKG_PYTHON_DISTUTILS_ENV in package/pkg-python.mk
25
I2C_TOOLS_PYTHON_BASE_ENV = \
26
    $(PKG_PYTHON_DISTUTILS_ENV) \
27
    CFLAGS="$(TARGET_CFLAGS) -I../include"
28
​
29
define I2C_TOOLS_BUILD_PYSMBUS
30
    (cd $(@D)/py-smbus;  \
31
    $(I2C_TOOLS_PYTHON_BASE_ENV) \
32
        $(HOST_DIR)/usr/bin/python setup.py build \
33
        $(PKG_PYTHON_DISTUTILS_BUILD_OPTS))
34
endef
35
​
36
define I2C_TOOLS_INSTALL_PYSMBUS
37
    (cd $(@D)/py-smbus; \
38
    $(I2C_TOOLS_PYTHON_BASE_ENV) \
39
        $(HOST_DIR)/usr/bin/python setup.py install \
40
        $(PKG_PYTHON_DISTUTILS_INSTALL_TARGET_OPTS))
41
endef
42
​
43
endif # BR2_PACKAGE_PYTHON
44
​
45
define I2C_TOOLS_BUILD_CMDS
46
    $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
47
    $(I2C_TOOLS_BUILD_PYSMBUS)
48
endef
49
​
50
define I2C_TOOLS_INSTALL_TARGET_CMDS
51
    for i in i2cdump i2cget i2cset i2cdetect; \
52
    do \
53
        $(INSTALL) -m 755 -D $(@D)/tools/$$i $(TARGET_DIR)/usr/bin/$$i; \
54
    done
55
    $(I2C_TOOLS_INSTALL_PYSMBUS)
56
endef
57
​
58
$(eval $(generic-package))
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.