package/uboot-envtools: generate config-file from UCI
[openwrt/openwrt.git] / package / uboot-envtools / Makefile
1 #
2 # Copyright (C) 2006-2011 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:=uboot-envtools
11 PKG_DISTNAME:=u-boot
12 PKG_VERSION:=2011.06
13 PKG_RELEASE:=3
14
15 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
17 PKG_MD5SUM:=
18 PKG_BUILD_DEPENDS:=zlib
19
20 include $(INCLUDE_DIR)/package.mk
21
22 TAR_OPTIONS+= --strip-components=3 -C $(PKG_BUILD_DIR) $(PKG_DISTNAME)-$(PKG_VERSION)/tools/env
23
24 define Package/uboot-envtools
25 SECTION:=utils
26 CATEGORY:=Utilities
27 TITLE:=read/modify U-Boot bootloader environment
28 URL:=http://www.denx.de/wiki/U-Boot
29 endef
30
31 define Package/uboot-envtools/description
32 This package includes tools to read and modify U-Boot bootloader environment.
33 endef
34
35 define Package/uboot-envtools/install
36 $(INSTALL_DIR) $(1)/usr/sbin
37 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fw_printenv $(1)/usr/sbin/
38 ln -sf fw_printenv $(1)/usr/sbin/fw_setenv
39 $(INSTALL_DIR) $(1)/etc/init.d
40 $(INSTALL_BIN) ./files/uboot-envtools.init $(1)/etc/init.d/uboot-envtools
41 endef
42
43 define Build/Prepare
44 mkdir -p $(PKG_BUILD_DIR)
45 tar xvjf $(DL_DIR)/$(PKG_SOURCE) --strip-components=2 -C $(PKG_BUILD_DIR) $(PKG_DISTNAME)-$(PKG_VERSION)/lib/crc32.c
46 $(call Build/Prepare/Default)
47 endef
48
49 $(eval $(call BuildPackage,uboot-envtools))