[packages] nvramtool: use the new repo, per http://www.coreboot.org/pipermail/coreboo...
[openwrt/svn-archive/archive.git] / utils / nvramtool / Makefile
1 #
2 # Copyright (C) 2008-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 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=nvramtool
10 PKG_REV:=4887
11 PKG_VERSION:=$(PKG_REV)
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_PROTO:=svn
15 PKG_SOURCE_VERSION:=$(PKG_REV)
16 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
17 PKG_SOURCE_URL:=svn://coreboot.org/coreboot/trunk/util/nvramtool
18 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/nvramtool
23 SECTION:=utils
24 CATEGORY:=Utilities
25 URL:=http://www.coreboot.org/Nvramtool
26 TITLE:=Coreboot nvramtool
27 DEPENDS:=@TARGET_x86 +@PACKAGE_pciutils +zlib
28 endef
29
30 define Package/nvramtool/description
31 nvramtool (previously known as lxbios and cmos_util) is a utility for
32 reading/writing coreboot parameters and displaying information from the coreboot
33 table in CMOS/NVRAM.
34 The program is intended only for x86-based Linux systems that use coreboot, but
35 can also be used for non-coreboot systems (e.g. for dumping all NVRAM bytes).
36 endef
37
38 define Build/Configure
39 endef
40
41 define Build/Compile
42 $(MAKE) -C $(PKG_BUILD_DIR) \
43 CC="$(TARGET_CC)" \
44 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" \
45 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
46 LIBS="-lpci -lz" \
47 DESTDIR="$(PKG_INSTALL_DIR)" \
48 nvramtool
49 endef
50
51 define Package/nvramtool/install
52 $(INSTALL_DIR) $(1)/sbin
53 $(INSTALL_BIN) $(PKG_BUILD_DIR)/nvramtool $(1)/sbin/nvramtool
54 endef
55
56 $(eval $(call BuildPackage,nvramtool))