Makefile 2.1 KB

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