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.

72 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2012-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:=libugpio
  9. PKG_VERSION:=0.0.7
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=https://github.com/mhei/libugpio/releases/download/v$(PKG_VERSION)
  13. PKG_HASH:=4e0ae6f9cd3d670eb5ba9595a24696a034fda3c7c1900aa9d2cae5a4cd9dab64
  14. PKG_LICENSE:=LGPL-2.1-or-later
  15. PKG_LICENSE_FILES:=COPYING.LESSER
  16. PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/libugpio
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. URL:=https://github.com/mhei/libugpio
  24. TITLE:=Library for using sysfs gpio interface from C programs
  25. DEPENDS:=@GPIO_SUPPORT
  26. endef
  27. define Package/libugpio/description
  28. libugpio is a library to ease the use of linux kernel's sysfs
  29. gpio interface from C programs and/or other libraries.
  30. endef
  31. define Package/gpioctl-sysfs
  32. SECTION:=utils
  33. CATEGORY:=Utilities
  34. TITLE:=Tool for controlling gpio pins
  35. DEPENDS:=+libugpio
  36. endef
  37. define Package/gpioctl-sysfs/description
  38. Tool for controlling gpio pins using the sysfs api provided by the kernel.
  39. endef
  40. define Build/InstallDev
  41. $(INSTALL_DIR) $(1)/usr/include
  42. $(CP) $(PKG_INSTALL_DIR)/usr/include/ugpio $(1)/usr/include/
  43. $(INSTALL_DIR) $(1)/usr/lib
  44. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libugpio.{so*,a} $(1)/usr/lib/
  45. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libugpio.pc $(1)/usr/lib/pkgconfig/
  47. endef
  48. define Package/libugpio/install
  49. $(INSTALL_DIR) $(1)/usr/lib
  50. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libugpio.so.* $(1)/usr/lib/
  51. endef
  52. define Package/gpioctl-sysfs/install
  53. $(INSTALL_DIR) $(1)/usr/bin
  54. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpioctl $(1)/usr/bin/
  55. endef
  56. $(eval $(call BuildPackage,libugpio))
  57. $(eval $(call BuildPackage,gpioctl-sysfs))