Changeset 22376


Ignore:
Timestamp:
2010-07-24T15:08:35+02:00 (8 years ago)
Author:
claudio
Message:

[packages] i2c-tools: Package also the python bindings

Location:
packages/utils/i2c-tools
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • packages/utils/i2c-tools/Makefile

    r16803 r22376  
    11# 
    2 # Copyright (C) 2007 OpenWrt.org 
     2# Copyright (C) 2007-2010 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    77 
    88include $(TOPDIR)/rules.mk 
     9include $(INCLUDE_DIR)/kernel.mk 
    910 
    1011PKG_NAME:=i2c-tools 
    1112PKG_VERSION:=3.0.2 
    12 PKG_RELEASE:=1 
     13PKG_RELEASE:=2 
    1314 
    1415PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
     
    1617PKG_MD5SUM:=b546345ac19db56719dea6b8199f11e0 
    1718 
     19PKG_BUILD_DEPENDS:=python 
     20 
    1821include $(INCLUDE_DIR)/package.mk 
     22$(call include_mk, python-package.mk) 
    1923 
    2024define Package/i2c-tools 
     
    2428  DEPENDS:=@LINUX_2_6 
    2529  URL:=http://www.lm-sensors.org/wiki/I2CTools 
     30endef 
     31 
     32define Package/python-smbus 
     33  SUBMENU:=Python 
     34  SECTION:=lang 
     35  CATEGORY:=Languages 
     36  TITLE:=Python bindings for the SMBUS 
     37  URL:=http://www.lm-sensors.org/wiki/I2CTools 
     38  DEPENDS:= +python-mini +i2c-tools 
    2639endef 
    2740 
     
    3649endef 
    3750 
     51define Package/python-smbus/description 
     52 This package contains an heterogeneous set of I2C tools for Linux.  
     53  
     54 This package contain the python bindings for Linux SMBus access through i2c-dev. 
     55endef 
     56 
     57TARGET_CPPFLAGS += -I$(LINUX_DIR)/include 
     58 
    3859define Build/Compile 
    3960        $(MAKE) -C $(PKG_BUILD_DIR) \ 
     
    4162                CC="$(TARGET_CC)" \ 
    4263                STAGING_DIR="$(STAGING_DIR)" 
     64        $(if $(Build/Compile/PyMod),,@echo Python packaging code not found.; false) 
     65        $(call Build/Compile/PyMod,./py-smbus/, \ 
     66                install --prefix="$(PKG_INSTALL_DIR)/usr", \ 
     67        ) 
    4368endef 
    4469 
     
    5176endef 
    5277 
     78define PyPackage/python-smbus/filespec 
     79+|$(PYTHON_PKG_DIR)/smbus.so 
     80endef 
     81 
    5382$(eval $(call BuildPackage,i2c-tools)) 
     83$(eval $(call PyPackage,python-smbus)) 
     84$(eval $(call BuildPackage,python-smbus)) 
Note: See TracChangeset for help on using the changeset viewer.