source: packages/utils/mtd-utils/Makefile

Last change on this file was 39029, checked in by luka, 3 years ago

[packages] mtd-utils: add missing dependency

Signed-off-by: Luka Perkov <luka@…>

File size: 2.4 KB
Line 
1#
2# Copyright (C) 2009-2013 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=mtd-utils
11PKG_REV:=ab8c6fb93ce9db0f09401c4b819b0b277dc00340
12PKG_VERSION:=1.5.0
13PKG_RELEASE:=2
14
15PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16PKG_SOURCE_URL:=git://git.infradead.org/mtd-utils.git
17PKG_SOURCE_PROTO:=git
18PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
19PKG_SOURCE_VERSION:=$(PKG_REV)
20
21PKG_INSTALL:=1
22
23PKG_BUILD_DEPENDS:=util-linux
24
25include $(INCLUDE_DIR)/package.mk
26
27FILES:= \
28        doc_loadbios \
29        docfdisk \
30        flash_erase \
31        flash_eraseall:+mtd-utils-flash-erase \
32        flash_lock \
33        flash_otp_dump \
34        flash_otp_lock \
35        flash_otp_write \
36        flash_unlock \
37        flashcp \
38        ftl_check \
39        ftl_format \
40        jffs2dump \
41        jffs2reader:+zlib \
42        mkfs.jffs2:+zlib \
43        mkfs.ubifs:+libuuid:+liblzo:+zlib \
44        mtd_debug \
45        mtdinfo \
46        nanddump \
47        nandtest \
48        nandwrite \
49        nftldump \
50        nftl_format \
51        recv_image \
52        rfddump \
53        rfdformat \
54        serve_image \
55        sumtool \
56        ubiattach \
57        ubicrc32 \
58        ubidetach \
59        ubiformat \
60        ubimkvol \
61        ubinfo \
62        ubinize \
63        ubirename \
64        ubirmvol \
65        ubirsvol \
66        ubiupdatevol
67
68define PartGen
69define Package/mtd-utils-$(subst _,-,$(firstword $(subst :, ,$(1))))
70  TITLE:=$(firstword $(subst :, ,$(1))) package from mtd-utils
71  URL:=http://www.linux-mtd.infradead.org/
72  SECTION:=utils
73  CATEGORY:=Utilities
74  DEPENDS:=mtd-utils $(wordlist 2,$(words $(subst :, ,$(1))),$(subst :, ,$(1)))
75endef
76endef
77
78define Package/mtd-utils
79  TITLE:=Utilities for flash info/debug
80  SECTION:=utils
81  CATEGORY:=Utilities
82  URL:=http://www.linux-mtd.infradead.org/
83  MENU:=1
84endef
85
86define Package/mtd-utils/description
87  Utilities for manipulating memory technology devices.
88endef
89
90define Package/mtd-utils/install
91        true
92endef
93
94$(foreach file,$(FILES),$(eval $(call PartGen,$(file))))
95
96MAKE_FLAGS += \
97        DESTDIR="$(PKG_INSTALL_DIR)" \
98        BUILDDIR="$(PKG_BUILD_DIR)" \
99        LDLIBS+="$(LIBGCC_S)" \
100        WITHOUT_XATTR=1 \
101        WITHOUT_LZO=1
102
103define PartInstall
104define Package/mtd-utils-$(subst _,-,$(firstword $(subst :, ,$(1))))/install
105        $(INSTALL_DIR) $$(1)/usr/sbin
106        $(INSTALL_BIN) \
107                $(PKG_INSTALL_DIR)/usr/sbin/$(firstword $(subst :, ,$(1))) \
108                $$(1)/usr/sbin/
109endef
110endef
111
112$(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
113
114$(eval $(call BuildPackage,mtd-utils))
115$(foreach file,$(FILES),$(eval $(call BuildPackage,mtd-utils-$(subst _,-,$(firstword $(subst :, ,$(file)))))))
Note: See TracBrowser for help on using the repository browser.