• 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
Peter KorsgaardPeter Korsgaard committed 00d73749e2a10 Jul 2017
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
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.xz
9
I2C_TOOLS_SITE = https://www.kernel.org/pub/software/utils/i2c-tools
10
I2C_TOOLS_LICENSE = GPL-2.0+, GPL-2.0 (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
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
22
I2C_TOOLS_DEPENDENCIES += busybox
23
endif
24
​
25
# Build/install steps mirror the distutil python package type in the python package
26
# infrastructure
27
ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)
28
# BASE_ENV taken from PKG_PYTHON_DISTUTILS_ENV in package/pkg-python.mk
29
I2C_TOOLS_PYTHON_BASE_ENV = \
30
    $(PKG_PYTHON_DISTUTILS_ENV) \
31
    CFLAGS="$(TARGET_CFLAGS) -I../include"
32
​
33
define I2C_TOOLS_BUILD_PYSMBUS
34
    (cd $(@D)/py-smbus; \
35
    $(I2C_TOOLS_PYTHON_BASE_ENV) \
36
        $(HOST_DIR)/bin/python setup.py build \
37
        $(PKG_PYTHON_DISTUTILS_BUILD_OPTS))
38
endef
39
​
40
define I2C_TOOLS_INSTALL_PYSMBUS
41
    (cd $(@D)/py-smbus; \
42
    $(I2C_TOOLS_PYTHON_BASE_ENV) \
43
        $(HOST_DIR)/bin/python setup.py install \
44
        $(PKG_PYTHON_DISTUTILS_INSTALL_TARGET_OPTS))
45
endef
46
​
47
endif # BR2_PACKAGE_PYTHON
48
​
49
define I2C_TOOLS_BUILD_CMDS
50
    $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
51
    $(I2C_TOOLS_BUILD_PYSMBUS)
52
endef
53
​
54
define I2C_TOOLS_INSTALL_TARGET_CMDS
55
    for i in i2cdump i2cget i2cset i2cdetect; \
56
    do \
57
        $(INSTALL) -m 755 -D $(@D)/tools/$$i $(TARGET_DIR)/usr/sbin/$$i; \
58
    done
59
    $(I2C_TOOLS_INSTALL_PYSMBUS)
60
endef
61
​
62
$(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.