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