f95617f3e060b9b9265d484fb3b5cccd0c15c433
[openwrt.git] / package / libs / sysfsutils / Makefile
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
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 PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
18
19 PKG_LICENSE:=GPL-2.0 LGPL-2.1+
20 PKG_LICENSE_FILES:=COPYING cmd/GPL lib/LGPL
21
22 PKG_FIXUP:=autoreconf
23
24 PKG_INSTALL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libsysfs
29   SECTION:=libs
30   CATEGORY:=Libraries
31   SUBMENU:=Filesystem
32   TITLE:=Sysfs library
33   URL:=http://linux-diag.sourceforge.net/Sysfsutils.html
34 endef
35
36 define 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
43 endef
44
45 define Package/libsysfs/description
46 The library's purpose is to provide a consistant and stable interface for
47 querying system device information exposed through sysfs.
48 endef
49
50 define Package/sysfsutils/description
51 A utility built upon libsysfs that lists devices by bus, class, and topology.
52 endef
53
54 define 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/
60 endef
61
62 define Package/libsysfs/install
63         $(INSTALL_DIR) $(1)/usr/lib
64         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsysfs.so* $(1)/usr/lib/
65 endef
66
67 define Package/sysfsutils/install
68         $(INSTALL_DIR) $(1)/usr/bin
69         $(CP) $(PKG_INSTALL_DIR)/usr/bin/systool $(1)/usr/bin/
70 endef
71
72 $(eval $(call BuildPackage,libsysfs))
73 $(eval $(call BuildPackage,sysfsutils))