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.

98 lines
2.4 KiB

  1. #
  2. # Copyright (C) 2021 TDT AG <development@tdt.de>
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See https://www.gnu.org/licenses/gpl-2.0.txt for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libatasmart
  9. PKG_RELEASE:=1
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL:=https://git.0pointer.net/libatasmart.git
  12. PKG_SOURCE_DATE:=2012-05-21
  13. PKG_SOURCE_VERSION:=de6258940960443038b4c1651dfda3620075e870
  14. PKG_MIRROR_HASH:=6d2a8782d16e4c1b909e5e836c43c6d58d65b0e1698a53a463a8694a396eb0d7
  15. PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
  16. PKG_LICENSE:=LGPL-2.1
  17. PKG_LICENSE_FILES:=LGPL
  18. PKG_REMOVE_FILES:=autogen.sh
  19. PKG_FIXUP:=autoreconf
  20. PKG_INSTALL:=1
  21. PKG_BUILD_PARALLEL:=1
  22. PKG_BUILD_DEPENDS:=libatasmart/host
  23. # Do not do autoconf FIXUP for host.
  24. # We only need Host Compiled strpool binary.
  25. HOST_FIXUP:=
  26. include $(INCLUDE_DIR)/package.mk
  27. include $(INCLUDE_DIR)/host-build.mk
  28. define Package/libatasmart
  29. SECTION:=libs
  30. CATEGORY:=Libraries
  31. TITLE:=S.M.A.R.T. Reading and Parsing Library
  32. URL:=https://git.0pointer.net/libatasmart.git
  33. DEPENDS:= +libudev
  34. endef
  35. define Package/libatasmart/description
  36. This library is supposed to be lean and small and thus
  37. supports only a subset of the S.M.A.R.T. functionality.
  38. However, I claim that it implements the relevant part of it.
  39. If you need full control over all S.M.A.R.T. functionality of
  40. your hardware please refer to smartmontools.
  41. endef
  42. define Host/Configure
  43. endef
  44. define Host/Compile
  45. $(RM) -rf $(HOST_BUILD_DIR)/strpool
  46. $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
  47. -o $(HOST_BUILD_DIR)/strpool \
  48. $(HOST_BUILD_DIR)/strpool.c
  49. endef
  50. define Host/Install
  51. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
  52. $(INSTALL_BIN) $(HOST_BUILD_DIR)/strpool $(STAGING_DIR_HOSTPKG)/bin
  53. endef
  54. define Build/Configure
  55. $(RM) -rf $(PKG_BUILD_DIR)/strpool
  56. $(RM) $(PKG_BUILD_DIR)/strpool.c
  57. $(Build/Configure/Default)
  58. endef
  59. define Build/InstallDev
  60. $(INSTALL_DIR) $(1)/usr/lib
  61. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.la \
  62. $(1)/usr/lib
  63. $(INSTALL_DIR) $(1)/usr/lib
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  65. $(1)/usr/lib
  66. $(INSTALL_DIR) $(1)/usr/include
  67. $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h \
  68. $(1)/usr/include
  69. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  70. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
  71. $(1)/usr/lib/pkgconfig/
  72. endef
  73. define Package/libatasmart/install
  74. $(INSTALL_DIR) $(1)/usr/lib
  75. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* \
  76. $(1)/usr/lib
  77. endef
  78. $(eval $(call HostBuild))
  79. $(eval $(call BuildPackage,libatasmart))