Makefile 2.1 KB

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