ubi-utils: bump to version 1.5.1 for ubiblock support
[openwrt/openwrt.git] / package / utils / ubi-utils / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=mtd-utils
11 PKG_REV:=7d2839b8dede3ae368780364b4a07473d2303219
12 PKG_VERSION:=1.5.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
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
21 PKG_INSTALL:=1
22
23 PKG_BUILD_DEPENDS:=util-linux liblzo
24
25 PKG_LICENSE:=GPLv2
26 PKG_LICENSE_FILES:=
27
28 PKG_MAINTAINER:=John Crispin <blogic@openwrt.org>
29 PKG_BUILD_DIR:=$(BUILD_DIR)/ubi-utils/$(PKG_NAME)-$(PKG_VERSION)
30
31 include $(INCLUDE_DIR)/package.mk
32
33 FILES:= \
34 ubiattach \
35 ubicrc32 \
36 ubiblock \
37 ubidetach \
38 ubiformat \
39 ubimkvol \
40 ubinfo \
41 ubinize \
42 ubirename \
43 ubirmvol \
44 ubirsvol \
45 ubiupdatevol
46
47 define PartGen
48 define Package/ubi-utils-$(subst _,-,$(firstword $(subst :, ,$(1))))
49 TITLE:=$(firstword $(subst :, ,$(1))) package from ubi-utils
50 URL:=http://www.linux-mtd.infradead.org/
51 SECTION:=utils
52 CATEGORY:=Utilities
53 DEPENDS:=ubi-utils $(wordlist 2,$(words $(subst :, ,$(1))),$(subst :, ,$(1)))
54 endef
55 endef
56
57 define Package/ubi-utils
58 TITLE:=Utilities for ubi info/debug
59 SECTION:=utils
60 CATEGORY:=Utilities
61 URL:=http://www.linux-mtd.infradead.org/
62 MENU:=1
63 endef
64
65 define Package/ubi-utils/description
66 Utilities for manipulating memory technology devices.
67 endef
68
69 define Package/ubi-utils/install
70 true
71 endef
72
73 $(foreach file,$(FILES),$(eval $(call PartGen,$(file))))
74
75 MAKE_FLAGS += \
76 DESTDIR="$(PKG_INSTALL_DIR)" \
77 BUILDDIR="$(PKG_BUILD_DIR)" \
78 LDLIBS+="$(LIBGCC_S)" \
79 WITHOUT_XATTR=1 \
80 WITHOUT_LZO=1
81
82 define PartInstall
83 define Package/ubi-utils-$(subst _,-,$(firstword $(subst :, ,$(1))))/install
84 $(INSTALL_DIR) $$(1)/usr/sbin
85 $(INSTALL_BIN) \
86 $(PKG_INSTALL_DIR)/usr/sbin/$(firstword $(subst :, ,$(1))) \
87 $$(1)/usr/sbin/
88 endef
89 endef
90
91 $(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
92
93 $(eval $(call BuildPackage,ubi-utils))
94 $(foreach file,$(FILES),$(eval $(call BuildPackage,ubi-utils-$(subst _,-,$(firstword $(subst :, ,$(file)))))))