f892b0ebbf629656c86823d0ec55e7e6a7a928c3
[openwrt/svn-archive/archive.git] / utils / sysfsutils / Makefile
1 #
2 # Copyright (C) 2006 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:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@SF/linux-diag
16 PKG_MD5SUM:=14e7dcd0436d2f49aa403f67e1ef7ddc
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/sysfsutils
21 SECTION:=utils
22 CATEGORY:=Utilities
23 SUBMENU:=Filesystem
24 DEPENDS:=@LINUX_2_6
25 TITLE:=sysfs Utilities
26 URL:=http://linux-diag.sourceforge.net/Sysfsutils.html
27 endef
28
29 define Build/Configure
30 $(call Build/Configure/Default)
31 endef
32
33 define Build/Compile
34 $(MAKE) -C "$(PKG_BUILD_DIR)" \
35 $(TARGET_CONFIGURE_OPTS) \
36 CFLAGS="$(TARGET_CFLAGS)" \
37 all
38 endef
39
40 define Build/InstallDev
41 $(INSTALL_DIR) $(1)/usr/include/sysfs
42 $(CP) $(PKG_BUILD_DIR)/include/*.h $(1)/usr/include/sysfs
43 $(INSTALL_DIR) $(1)/usr/lib
44 $(CP) $(PKG_BUILD_DIR)/lib/.libs/libsysfs.{a,so*} $(1)/usr/lib/
45 endef
46
47 define Package/sysfsutils/install
48 $(INSTALL_DIR) $(1)/usr/bin
49 $(CP) $(PKG_BUILD_DIR)/cmd/systool $(1)/usr/bin/
50 $(INSTALL_DIR) $(1)/usr/lib
51 $(CP) $(PKG_BUILD_DIR)/lib/.libs/libsysfs.so.* $(1)/usr/lib/
52 endef
53
54 $(eval $(call BuildPackage,sysfsutils))