mtd-utils: update to 2.1.6
[openwrt/staging/jow.git] / package / utils / mtd-utils / Makefile
1 #
2 # Copyright (C) 2009-2014 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:=mtd-utils
11 PKG_VERSION:=2.1.6
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=https://infraroot.at/pub/mtd/
16 PKG_HASH:=c1d853bc4adf83bcabd2792fc95af33bdd8643c97e8f7b3f0180af36af76f0e5
17
18 PKG_INSTALL:=1
19 PKG_FIXUP:=autoreconf
20
21 PKG_FLAGS:=nonshared
22 PKG_BUILD_FLAGS:=gc-sections
23
24 PKG_BUILD_DEPENDS:=util-linux
25
26 PKG_LICENSE:=GPLv2
27 PKG_LICENSE_FILES:=
28 PKG_CPE_ID:=cpe:/a:mtd-utils_project:mtd-utils
29
30 PKG_MAINTAINER:=John Crispin <john@phrozen.org>
31
32 include $(INCLUDE_DIR)/package.mk
33
34 define Package/mtd-utils/Default
35 SECTION:=utils
36 CATEGORY:=Utilities
37 URL:=http://www.linux-mtd.infradead.org/
38 DEPENDS:=@NAND_SUPPORT
39 endef
40
41 define Package/ubi-utils
42 $(call Package/mtd-utils/Default)
43 TITLE:=Utilities for ubi info/debug
44 endef
45
46 define Package/ubi-utils/description
47 Utilities for manipulating memory technology devices.
48 endef
49
50 define Package/nand-utils
51 $(call Package/mtd-utils/Default)
52 TITLE:=Utilities for nand flash erase/read/write/test
53 endef
54
55 define Package/nand-utils/description
56 Utilities for NAND devices.
57 endef
58
59 MAKE_FLAGS += LDLIBS+="$(LIBGCC_S)"
60
61 CONFIGURE_ARGS += \
62 --disable-tests \
63 --without-crypto \
64 --without-xattr \
65 --without-zstd \
66 --without-lzo
67
68 define Package/ubi-utils/install
69 $(INSTALL_DIR) $(1)/usr/sbin
70 $(INSTALL_BIN) \
71 $(PKG_INSTALL_DIR)/usr/sbin/{ubiattach,ubicrc32,ubiblock,ubidetach,ubiformat,ubimkvol} $(1)/usr/sbin/
72 $(INSTALL_BIN) \
73 $(PKG_INSTALL_DIR)/usr/sbin/{ubinfo,ubinize,ubirename,ubirmvol,ubirsvol,ubiupdatevol} $(1)/usr/sbin/
74 endef
75
76 define Package/nand-utils/install
77 $(INSTALL_DIR) $(1)/usr/sbin
78 $(INSTALL_BIN) \
79 $(PKG_INSTALL_DIR)/usr/sbin/{flash_erase,nanddump,nandwrite,nandtest,mtdinfo} $(1)/usr/sbin/
80 endef
81
82 $(eval $(call BuildPackage,ubi-utils))
83 $(eval $(call BuildPackage,nand-utils))