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.

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