9ed8750b43
This package contains some simple command line tools to help using Linux spidev devices. https://github.com/cpb-/spi-tools The included version is based in a sha1 and not a tagged version as the current master branch contains autotools support for build but there is no tagged version with autotools support yet. The only other quirk with the recipe is related to the VERSION define which is normally obtained in build time via git for this package, but that would fail within Buildroot as the package build is normally not performed inside a git repository. To work around that, I have added a hook which will substitute change the VERSION to match that of the Buildroot package. I have tested this package in an ARM target with a custom SPI device. Signed-off-by: Erico Nunes <nunes.erico@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
25 lines
895 B
Makefile
25 lines
895 B
Makefile
################################################################################
|
|
#
|
|
# spi-tools
|
|
#
|
|
################################################################################
|
|
|
|
# git commit sha1 is used as there is no release tag with autotools support yet
|
|
SPI_TOOLS_VERSION = cc6a41fdcec60610703ba6db488c621c64952898
|
|
SPI_TOOLS_SITE = $(call github,cpb-,spi-tools,$(SPI_TOOLS_VERSION))
|
|
# autoreconf must be run as specified in package documentation
|
|
SPI_TOOLS_AUTORECONF = YES
|
|
SPI_TOOLS_LICENSE = GPLv2
|
|
SPI_TOOLS_LICENSE_FILES = LICENSE
|
|
|
|
# Package attempts to use git to obtain version, that fails within Buildroot.
|
|
# To avoid it, set the GIT_VERSION variable to the Buildroot package version.
|
|
define SPI_TOOLS_SET_VERSION
|
|
$(SED) "s/^\(GIT_VERSION:=\).*/\1$(SPI_TOOLS_VERSION)/" \
|
|
$(@D)/src/Makefile.am
|
|
endef
|
|
|
|
SPI_TOOLS_POST_PATCH_HOOKS = SPI_TOOLS_SET_VERSION
|
|
|
|
$(eval $(autotools-package))
|