ce1c93d9b6c5c41ef2590faab702ce15e74873f1
[packages.git] / utils / mtd-utils / Makefile
1
2 # Copyright (C) 2009-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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=mtd-utils
11 PKG_REV:=a2d010f8fca904fffa3c6e5a5d148cc96a37a08a
12 PKG_VERSION:=20090227
13 PKG_RELEASE:=1
14 PKG_INSTALL:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=git://git.infradead.org/mtd-utils.git
18 PKG_SOURCE_PROTO:=git
19 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
20 PKG_SOURCE_VERSION:=$(PKG_REV)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 FILES:= \
25         ubiupdatevol \
26         flash_otp_info \
27         nandtest \
28         ubimkvol \
29         ubigen \
30         serve_image \
31         recv_image \
32         ubinfo \
33         ubirename \
34         mkpfi \
35         nandwrite \
36         flash_eraseall \
37         mkbootenv \
38         ftl_format \
39         nand2bin \
40         ubiattach \
41         nftl_format \
42         nanddump \
43         ubinize \
44         docfdisk \
45         ubimirror \
46         ubicrc32.pl \
47         ftl_check \
48         flashcp \
49         jffs2dump \
50         ubiformat \
51         ubidetach \
52         flash_lock \
53         bin2nand \
54         pfiflash \
55         mtd_debug \
56         pddcustomize \
57         flash_unlock \
58         doc_loadbios \
59         nftldump \
60         mkfs.jffs2 \
61         flash_info \
62         ubicrc32 \
63         ubirmvol \
64         unubi \
65         pfi2bin \
66         mkfs.ubifs \
67         sumtool \
68         flash_erase \
69         rfddump \
70         flash_otp_dump \
71         rfdformat
72
73 define PartGen
74 define Package/mtd-utils-$(subst _,-,$(1))
75   TITLE:=MTD $(1)
76   URL:=http://www.linux-mtd.infradead.org/
77   SECTION:=utils
78   CATEGORY:=Utilities
79   DEPENDS:=mtd-utils +zlib +liblzo +libuuid
80 endef
81 endef
82
83 define Package/mtd-utils
84   TITLE:=Utilities for flash info/debug
85   SECTION:=utils
86   CATEGORY:=Utilities
87   MENU:=1
88 endef
89
90 define Package/mtd-utils/description
91   Utilities for manipulating memory technology devices.
92 endef
93
94 define Package/mtd-utils/install
95         true
96 endef
97
98 $(foreach file,$(FILES),$(eval $(call PartGen,$(file))))
99
100 MAKE_FLAGS += \
101         DESTDIR="$(PKG_INSTALL_DIR)" \
102         BUILDDIR="$(PKG_BUILD_DIR)" \
103         LDLIBS+="$(LIBGCC_S)" \
104         WITHOUT_XATTR=1
105
106 ifeq ($(CONFIG_LINUX_2_4),y)
107 MAKE_FLAGS += \
108         SUBDIRS=""
109 endif
110
111 define PartInstall
112 define Package/mtd-utils-$(subst _,-,$(1))/install
113         $(INSTALL_DIR) \
114                 $$(1)/usr/sbin
115
116         $(INSTALL_BIN) \
117                 $(PKG_INSTALL_DIR)/usr/sbin/$(1) \
118                 $$(1)/usr/sbin/
119 endef
120 endef
121
122 $(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
123
124 $(eval $(call BuildPackage,mtd-utils))
125 $(foreach file,$(FILES),$(eval $(call BuildPackage,mtd-utils-$(subst _,-,$(file)))))