1
0

Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.6
  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_MD5SUM:=09c35abbc25f7ebff125bc43ff21ac35
  14. PKG_LICENSE:=LGPL-2.1+
  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))