ubi-utils: fix git tree path, a regex went mad
[openwrt/staging/yousong.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:=ab8c6fb93ce9db0f09401c4b819b0b277dc00340
12 PKG_VERSION:=1.5.0
13 PKG_RELEASE:=2
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)/usb-utils/$(PKG_NAME)-$(PKG_VERSION)
30
31 include $(INCLUDE_DIR)/package.mk
32
33 FILES:= \
34 ubiattach \
35 ubicrc32 \
36 ubidetach \
37 ubiformat \
38 ubimkvol \
39 ubinfo \
40 ubinize \
41 ubirename \
42 ubirmvol \
43 ubirsvol \
44 ubiupdatevol
45
46 define PartGen
47 define Package/ubi-utils-$(subst _,-,$(firstword $(subst :, ,$(1))))
48 TITLE:=$(firstword $(subst :, ,$(1))) package from ubi-utils
49 URL:=http://www.linux-mtd.infradead.org/
50 SECTION:=utils
51 CATEGORY:=Utilities
52 DEPENDS:=ubi-utils $(wordlist 2,$(words $(subst :, ,$(1))),$(subst :, ,$(1)))
53 endef
54 endef
55
56 define Package/ubi-utils
57 TITLE:=Utilities for ubi info/debug
58 SECTION:=utils
59 CATEGORY:=Utilities
60 URL:=http://www.linux-mtd.infradead.org/
61 MENU:=1
62 endef
63
64 define Package/ubi-utils/description
65 Utilities for manipulating memory technology devices.
66 endef
67
68 define Package/ubi-utils/install
69 true
70 endef
71
72 $(foreach file,$(FILES),$(eval $(call PartGen,$(file))))
73
74 MAKE_FLAGS += \
75 DESTDIR="$(PKG_INSTALL_DIR)" \
76 BUILDDIR="$(PKG_BUILD_DIR)" \
77 LDLIBS+="$(LIBGCC_S)" \
78 WITHOUT_XATTR=1 \
79 WITHOUT_LZO=1
80
81 define PartInstall
82 define Package/ubi-utils-$(subst _,-,$(firstword $(subst :, ,$(1))))/install
83 $(INSTALL_DIR) $$(1)/usr/sbin
84 $(INSTALL_BIN) \
85 $(PKG_INSTALL_DIR)/usr/sbin/$(firstword $(subst :, ,$(1))) \
86 $$(1)/usr/sbin/
87 endef
88 endef
89
90 $(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
91
92 $(eval $(call BuildPackage,ubi-utils))
93 $(foreach file,$(FILES),$(eval $(call BuildPackage,ubi-utils-$(subst _,-,$(firstword $(subst :, ,$(file)))))))