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