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.

67 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2017 Yegor Yefremov <yegorslists@googlemail.com>
  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:=libsoc
  9. PKG_RELEASE:=2
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL:=https://github.com/jackmitch/libsoc.git
  12. PKG_MIRROR_HASH:=bdfaace3d59da30c4aa5ef78b5e235b5e9c41cd56867e04cb0acefc4dcd62d33
  13. PKG_SOURCE_DATE:=2016-12-22
  14. PKG_SOURCE_VERSION:=5b788d4d558a78c52e6cfe97325e4564b307a3a0
  15. PKG_MAINTAINER:=Yegor Yefremov <yegorslists@googlemail.com>
  16. PKG_LICENSE:=LGPL-2.1
  17. PKG_LICENSE_FILES:=LICENCE
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. PKG_BUILD_PARALLEL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/libsoc
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. DEPENDS:=+libpthread
  26. TITLE:=SoC Library
  27. URL:=https://github.com/jackmitch/libsoc
  28. endef
  29. define Package/libsoc/description
  30. libsoc: C library for interfacing with common SoC peripherals through
  31. generic kernel interfaces
  32. endef
  33. CONFIGURE_ARGS += \
  34. --enable-shared \
  35. --enable-static \
  36. --disable-cxx
  37. define Build/InstallDev
  38. $(INSTALL_DIR) $(1)/usr/include
  39. $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_board.h $(1)/usr/include/
  40. $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_conffile.h $(1)/usr/include/
  41. $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_debug.h $(1)/usr/include/
  42. $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_gpio.h $(1)/usr/include/
  43. $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_i2c.h $(1)/usr/include/
  44. $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_pwm.h $(1)/usr/include/
  45. $(CP) $(PKG_INSTALL_DIR)/usr/include/libsoc_spi.h $(1)/usr/include/
  46. $(INSTALL_DIR) $(1)/usr/lib
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoc.{a,so*} $(1)/usr/lib/
  48. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsoc.pc $(1)/usr/lib/pkgconfig
  50. endef
  51. define Package/libsoc/install
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsoc.so.* $(1)/usr/lib/
  54. endef
  55. $(eval $(call BuildPackage,libsoc))