From 1c860d592afda1fb22545dbc01678adbb13abb4e Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Thu, 29 Jun 2023 03:00:37 +0300 Subject: [PATCH] Make a package for spidev and include it into the waveshare image --- .buildbot/openwrt/build.sh | 2 +- feed/spidev/Makefile | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 feed/spidev/Makefile diff --git a/.buildbot/openwrt/build.sh b/.buildbot/openwrt/build.sh index 850e408..3ff677f 100755 --- a/.buildbot/openwrt/build.sh +++ b/.buildbot/openwrt/build.sh @@ -153,7 +153,7 @@ make image PROFILE=${PROFILE} EXTRA_IMAGE_NAME="waveshare" \ ${PACKAGES} cryptsetup kmod-ata-ahci smartmontools hdparm fdisk parted \ kmod-hwmon-drivetemp btrfs-progs kmod-fs-btrfs kmod-nvme nvme-cli \ docker dockerd docker-compose block-mount \ - python3-packages" \ + python3-packages python3-spidev" \ DISABLED_SERVICES="dropbear" FILES="files" || exit 1 diff --git a/feed/spidev/Makefile b/feed/spidev/Makefile new file mode 100644 index 0000000..5e34f66 --- /dev/null +++ b/feed/spidev/Makefile @@ -0,0 +1,36 @@ +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=spidev +PKG_VERSION:=3.6 +PKG_RELEASE:=$(AUTORELEASE) + +PYPI_NAME:=$(PKG_NAME) +PKG_HASH:=14dbc37594a4aaef85403ab617985d3c3ef464d62bc9b769ef552db53701115b +PKG_MAINTAINER:=Lee Miller +PKG_LICENSE:=MIT + +include $(TOPDIR)/feeds/packages/lang/python/pypi.mk +include $(INCLUDE_DIR)/package.mk +include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk + +define Package/python3-$(PKG_NAME) + SECTION:=lang + CATEGORY:=Languages + SUBMENU:=Python + TITLE:=Python bindings for Linux SPI access through spidev + URL:=http://github.com/doceme/py-spidev + DEPENDS:=+python3 +python3-setuptools +endef + +define Package/python3-$(PKG_NAME)/description + This project contains a python module for interfacing with SPI devices + from user space via the spidev linux kernel driver. +endef + +$(eval $(call Py3Package,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME))) +$(eval $(call BuildPackage,python3-$(PKG_NAME)-src))