strip quotes in gcc version check
[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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=sysfsutils
12 PKG_VERSION:=2.1.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/linux-diag
17 PKG_MD5SUM:=14e7dcd0436d2f49aa403f67e1ef7ddc
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/sysfsutils
25 SECTION:=utils
26 CATEGORY:=Utilities
27 DEPENDS:=@LINUX_2_6
28 TITLE:=sysfs Utilities
29 URL:=http://linux-diag.sourceforge.net/Sysfsutils.html
30 endef
31
32 define Build/Configure
33 $(call Build/Configure/Default)
34 endef
35
36 define Build/Compile
37 $(MAKE) -C "$(PKG_BUILD_DIR)" \
38 $(TARGET_CONFIGURE_OPTS) \
39 CFLAGS="$(TARGET_CFLAGS)" \
40 all
41 endef
42
43 define Build/InstallDev
44 mkdir -p $(STAGING_DIR)/usr/include/sysfs
45 $(CP) $(PKG_BUILD_DIR)/include/*.h $(STAGING_DIR)/usr/include/sysfs
46 mkdir -p $(STAGING_DIR)/usr/lib
47 $(CP) $(PKG_BUILD_DIR)/lib/.libs/libsysfs.{a,so*} $(STAGING_DIR)/usr/lib/
48 endef
49
50 define Build/UninstallDev
51 rm -rf \
52 $(STAGING_DIR)/usr/include/sysfs/*.h \
53 $(STAGING_DIR)/usr/lib/libsysfs.{a,so*}
54 endef
55
56 define Package/sysfsutils/install
57 $(INSTALL_DIR) $(1)/usr/bin
58 $(CP) $(PKG_BUILD_DIR)/cmd/systool $(1)/usr/bin/
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) $(PKG_BUILD_DIR)/lib/.libs/libsysfs.so.* $(1)/usr/lib/
61 endef
62
63 $(eval $(call BuildPackage,sysfsutils))