You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.3 KiB

  1. #
  2. # Copyright (C) 2014-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=spi-tools
  9. PKG_VERSION:=1
  10. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://github.com/cpb-/spi-tools.git
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE_VERSION:=cc6a41fdcec60610703ba6db488c621c64952898
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  16. PKG_MIRROR_HASH:=3c37fde79ab09e9a590f4cdb55751083017197d0037a7c0dce56fceef5e05a21
  17. PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
  18. PKG_LICENSE:=GPL-2.0
  19. PKG_LICENSE_FILES:=
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/spi-tools
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=Command line SPI tools
  25. endef
  26. EXTRA_CFLAGS+=-DVERSION=\"$(PKG_SOURCE_VERSION)\"
  27. define Build/Compile
  28. cd $(PKG_BUILD_DIR) ; \
  29. $(TARGET_CC) $(TARGET_CFLAGS) $(EXTRA_CFLAGS) -Wall -Werror -o spi-config src/spi-config.c ; \
  30. $(TARGET_CC) $(TARGET_CFLAGS) $(EXTRA_CFLAGS) -Wall -Werror -o spi-pipe src/spi-pipe.c
  31. endef
  32. define Package/spi-tools/install
  33. $(INSTALL_DIR) $(1)/usr/bin
  34. $(INSTALL_BIN) $(PKG_BUILD_DIR)/spi-config $(1)/usr/bin
  35. $(INSTALL_BIN) $(PKG_BUILD_DIR)/spi-pipe $(1)/usr/bin
  36. endef
  37. $(eval $(call BuildPackage,spi-tools))