Makefile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #
  2. # Copyright (C) 2006-2012 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:=sysfsutils
  9. PKG_VERSION:=2.1.0
  10. PKG_RELEASE:=4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@SF/linux-diag
  13. PKG_HASH:=e865de2c1f559fff0d3fc936e660c0efaf7afe662064f2fb97ccad1ec28d208a
  14. PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
  15. PKG_CPE_ID:=cpe:/a:sysfsutils_project:sysfsutils
  16. PKG_LICENSE:=LGPL-2.1
  17. PKG_LICENSE_FILES:=COPYING cmd/GPL lib/LGPL
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libsysfs
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. SUBMENU:=Filesystem
  25. TITLE:=Sysfs library
  26. URL:=http://linux-diag.sourceforge.net/Sysfsutils.html
  27. ABI_VERSION:=2
  28. endef
  29. define Package/sysfsutils
  30. SECTION:=utils
  31. CATEGORY:=Utilities
  32. SUBMENU:=Filesystem
  33. DEPENDS:=+libsysfs
  34. TITLE:=System Utilities Based on Sysfs
  35. URL:=http://linux-diag.sourceforge.net/Sysfsutils.html
  36. endef
  37. define Package/libsysfs/description
  38. The library's purpose is to provide a consistant and stable interface for
  39. querying system device information exposed through sysfs.
  40. endef
  41. define Package/sysfsutils/description
  42. A utility built upon libsysfs that lists devices by bus, class, and topology.
  43. endef
  44. define Build/InstallDev
  45. $(INSTALL_DIR) $(1)/usr/include
  46. $(CP) $(PKG_INSTALL_DIR)/usr/include/sysfs $(1)/usr/include/
  47. $(INSTALL_DIR) $(1)/usr/lib
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsysfs.{a,so*,la} $(1)/usr/lib/
  49. endef
  50. define Package/libsysfs/install
  51. $(INSTALL_DIR) $(1)/usr/lib
  52. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsysfs.so.* $(1)/usr/lib/
  53. endef
  54. define Package/sysfsutils/install
  55. $(INSTALL_DIR) $(1)/etc/init.d
  56. $(INSTALL_BIN) ./files/sysfsutils $(1)/etc/init.d/
  57. $(INSTALL_DATA) ./files/sysfs.conf $(1)/etc/
  58. $(INSTALL_DIR) $(1)/etc/sysfs.d
  59. $(INSTALL_DATA) ./files/local.conf $(1)/etc/sysfs.d/
  60. $(INSTALL_DIR) $(1)/usr/bin
  61. $(CP) $(PKG_INSTALL_DIR)/usr/bin/systool $(1)/usr/bin/
  62. endef
  63. define Package/sysfsutils/conffiles
  64. /etc/sysfs.conf
  65. /etc/sysfs.d/local.conf
  66. endef
  67. $(eval $(call BuildPackage,libsysfs))
  68. $(eval $(call BuildPackage,sysfsutils))