source: Switch to xz for packages and tools where possible
[openwrt/openwrt.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_REV:=aea36417067dade75192bafa03af70b6eb2677b1
12 PKG_VERSION:=1.5.2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
16 PKG_SOURCE_URL:=git://git.infradead.org/mtd-utils.git
17 PKG_SOURCE_PROTO:=git
18 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
19 PKG_SOURCE_VERSION:=$(PKG_REV)
20 PKG_MIRROR_MD5SUM:=e11b342b85a36b2e438a8412ec52f87621d3046aec1a93039f8c72de9990b2a7
21
22 PKG_INSTALL:=1
23
24 PKG_BUILD_DEPENDS:=util-linux liblzo zlib
25
26 PKG_LICENSE:=GPLv2
27 PKG_LICENSE_FILES:=
28
29 PKG_MAINTAINER:=John Crispin <john@phrozen.org>
30
31 include $(INCLUDE_DIR)/package.mk
32
33 define Package/mtd-utils/Default
34 SECTION:=utils
35 CATEGORY:=Utilities
36 URL:=http://www.linux-mtd.infradead.org/
37 DEPENDS:=@NAND_SUPPORT
38 endef
39
40 define Package/ubi-utils
41 $(call Package/mtd-utils/Default)
42 TITLE:=Utilities for ubi info/debug
43 endef
44
45 define Package/ubi-utils/description
46 Utilities for manipulating memory technology devices.
47 endef
48
49 define Package/nand-utils
50 $(call Package/mtd-utils/Default)
51 TITLE:=Utilities for nand flash read/write/test
52 endef
53
54 define Package/nand-utils/description
55 Utilities for NAND devices.
56 endef
57
58 MAKE_FLAGS += \
59 DESTDIR="$(PKG_INSTALL_DIR)" \
60 BUILDDIR="$(PKG_BUILD_DIR)" \
61 LDLIBS+="$(LIBGCC_S)" \
62 WITHOUT_XATTR=1 \
63 WITHOUT_LZO=1
64
65 define Package/ubi-utils/install
66 $(INSTALL_DIR) $(1)/usr/sbin
67 $(INSTALL_BIN) \
68 $(PKG_INSTALL_DIR)/usr/sbin/{ubiattach,ubicrc32,ubiblock,ubidetach,ubiformat,ubimkvol} $(1)/usr/sbin/
69 $(INSTALL_BIN) \
70 $(PKG_INSTALL_DIR)/usr/sbin/{ubinfo,ubinize,ubirename,ubirmvol,ubirsvol,ubiupdatevol} $(1)/usr/sbin/
71 endef
72
73 define Package/nand-utils/install
74 $(INSTALL_DIR) $(1)/usr/sbin
75 $(INSTALL_BIN) \
76 $(PKG_INSTALL_DIR)/usr/sbin/{nanddump,nandwrite,nandtest,mtdinfo} $(1)/usr/sbin/
77 endef
78
79 $(eval $(call BuildPackage,ubi-utils))
80 $(eval $(call BuildPackage,nand-utils))