b7c9d8cdc14dd887b69f3dfd513eaaebb584426c
[openwrt/staging/stintel.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:=4
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/linux-diag
16 PKG_HASH:=e865de2c1f559fff0d3fc936e660c0efaf7afe662064f2fb97ccad1ec28d208a
17 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
18 PKG_CPE_ID:=cpe:/a:sysfsutils_project:sysfsutils
19
20 PKG_LICENSE:=LGPL-2.1
21 PKG_LICENSE_FILES:=COPYING cmd/GPL lib/LGPL
22
23 PKG_FIXUP:=autoreconf
24
25 PKG_INSTALL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/libsysfs
30 SECTION:=libs
31 CATEGORY:=Libraries
32 SUBMENU:=Filesystem
33 TITLE:=Sysfs library
34 URL:=http://linux-diag.sourceforge.net/Sysfsutils.html
35 ABI_VERSION:=2
36 endef
37
38 define Package/sysfsutils
39 SECTION:=utils
40 CATEGORY:=Utilities
41 SUBMENU:=Filesystem
42 DEPENDS:=+libsysfs
43 TITLE:=System Utilities Based on Sysfs
44 URL:=http://linux-diag.sourceforge.net/Sysfsutils.html
45 endef
46
47 define Package/libsysfs/description
48 The library's purpose is to provide a consistant and stable interface for
49 querying system device information exposed through sysfs.
50 endef
51
52 define Package/sysfsutils/description
53 A utility built upon libsysfs that lists devices by bus, class, and topology.
54 endef
55
56 define Build/InstallDev
57 $(INSTALL_DIR) $(1)/usr/include
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/sysfs $(1)/usr/include/
59
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsysfs.{a,so*,la} $(1)/usr/lib/
62 endef
63
64 define Package/libsysfs/install
65 $(INSTALL_DIR) $(1)/usr/lib
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsysfs.so.* $(1)/usr/lib/
67 endef
68
69 define Package/sysfsutils/install
70 $(INSTALL_DIR) $(1)/etc/init.d
71 $(INSTALL_BIN) ./files/sysfsutils $(1)/etc/init.d/
72
73 $(INSTALL_DATA) ./files/sysfs.conf $(1)/etc/
74 $(INSTALL_DIR) $(1)/etc/sysfs.d
75 $(INSTALL_DATA) ./files/local.conf $(1)/etc/sysfs.d/
76
77 $(INSTALL_DIR) $(1)/usr/bin
78 $(CP) $(PKG_INSTALL_DIR)/usr/bin/systool $(1)/usr/bin/
79 endef
80
81 define Package/sysfsutils/conffiles
82 /etc/sysfs.conf
83 /etc/sysfs.d/local.conf
84 endef
85
86 $(eval $(call BuildPackage,libsysfs))
87 $(eval $(call BuildPackage,sysfsutils))