a778206bbbfb50da198476e0ed45b8c1074755dd
[packages.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_REMOVE_FILES:=aclocal.m4 ltmain.sh
20
21 PKG_INSTALL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libsysfs
26   SECTION:=libs
27   CATEGORY:=Libraries
28   SUBMENU:=Filesystem
29   DEPENDS:=@!LINUX_2_4
30   TITLE:=Sysfs library
31   URL:=http://linux-diag.sourceforge.net/Sysfsutils.html
32 endef
33
34 define Package/sysfsutils
35   SECTION:=utils
36   CATEGORY:=Utilities
37   SUBMENU:=Filesystem
38   DEPENDS:=@!LINUX_2_4 +libsysfs
39   TITLE:=System Utilities Based on Sysfs
40   URL:=http://linux-diag.sourceforge.net/Sysfsutils.html
41 endef
42
43 define Package/libsysfs/description
44 The library's purpose is to provide a consistant and stable interface for
45 querying system device information exposed through sysfs.
46 endef
47
48 define Package/sysfsutils/description
49 A utility built upon libsysfs that lists devices by bus, class, and topology.
50 endef
51
52 define Build/InstallDev
53         $(INSTALL_DIR) $(1)/usr/include
54         $(CP) $(PKG_INSTALL_DIR)/usr/include/sysfs $(1)/usr/include/
55
56         $(INSTALL_DIR) $(1)/usr/lib
57         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsysfs.{a,so*,la} $(1)/usr/lib/
58 endef
59
60 define Package/libsysfs/install
61         $(INSTALL_DIR) $(1)/usr/lib
62         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsysfs.so* $(1)/usr/lib/
63 endef
64
65 define Package/sysfsutils/install
66         $(INSTALL_DIR) $(1)/usr/bin
67         $(CP) $(PKG_INSTALL_DIR)/usr/bin/systool $(1)/usr/bin/
68 endef
69
70 $(eval $(call BuildPackage,libsysfs))
71 $(eval $(call BuildPackage,sysfsutils))