[patchteam] sysfsutils: separate libsysfs and sysfsutils and move to libs, add patch...
[openwrt/svn-archive/archive.git] / libs / sysfsutils / Makefile
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=sysfsutils
11 PKG_VERSION:=2.1.0
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/linux-diag
16 PKG_MD5SUM:=14e7dcd0436d2f49aa403f67e1ef7ddc
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libsysfs
24 SECTION:=libs
25 CATEGORY:=Libraries
26 SUBMENU:=Filesystem
27 DEPENDS:=@LINUX_2_6
28 TITLE:=Sysfs library
29 URL:=http://linux-diag.sourceforge.net/Sysfsutils.html
30 endef
31
32 define Package/sysfsutils
33 SECTION:=utils
34 CATEGORY:=Utilities
35 SUBMENU:=Filesystem
36 DEPENDS:=@LINUX_2_6 +libsysfs
37 TITLE:=System Utilities Based on Sysfs
38 URL:=http://linux-diag.sourceforge.net/Sysfsutils.html
39 endef
40
41 define Package/libsysfs/description
42 The library's purpose is to provide a consistant and stable interface for
43 querying system device information exposed through sysfs.
44 endef
45
46 define Package/sysfsutils/description
47 A utility built upon libsysfs that lists devices by bus, class, and topology.
48 endef
49
50 define Build/InstallDev
51 $(INSTALL_DIR) $(1)/usr/include
52 $(CP) $(PKG_INSTALL_DIR)/usr/include/sysfs $(1)/usr/include/
53
54 $(INSTALL_DIR) $(1)/usr/lib
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsysfs.{a,so*,la} $(1)/usr/lib/
56 endef
57
58 define Package/libsysfs/install
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsysfs.so* $(1)/usr/lib/
61 endef
62
63 define Package/sysfsutils/install
64 $(INSTALL_DIR) $(1)/usr/bin
65 $(CP) $(PKG_INSTALL_DIR)/usr/bin/systool $(1)/usr/bin/
66 endef
67
68 $(eval $(call BuildPackage,libsysfs))
69 $(eval $(call BuildPackage,sysfsutils))