Makefile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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:=ab8c6fb93ce9db0f09401c4b819b0b277dc00340
  10. PKG_VERSION:=1.5.0
  11. PKG_RELEASE:=2
  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. ubidetach \
  28. ubiformat \
  29. ubimkvol \
  30. ubinfo \
  31. ubinize \
  32. ubirename \
  33. ubirmvol \
  34. ubirsvol \
  35. ubiupdatevol
  36. define PartGen
  37. define Package/ubi-utils-$(subst _,-,$(firstword $(subst :, ,$(1))))
  38. TITLE:=$(firstword $(subst :, ,$(1))) package from ubi-utils
  39. URL:=http://www.linux-mtd.infradead.org/
  40. SECTION:=utils
  41. CATEGORY:=Utilities
  42. DEPENDS:=ubi-utils $(wordlist 2,$(words $(subst :, ,$(1))),$(subst :, ,$(1)))
  43. endef
  44. endef
  45. define Package/ubi-utils
  46. TITLE:=Utilities for ubi info/debug
  47. SECTION:=utils
  48. CATEGORY:=Utilities
  49. URL:=http://www.linux-mtd.infradead.org/
  50. MENU:=1
  51. endef
  52. define Package/ubi-utils/description
  53. Utilities for manipulating memory technology devices.
  54. endef
  55. define Package/ubi-utils/install
  56. true
  57. endef
  58. $(foreach file,$(FILES),$(eval $(call PartGen,$(file))))
  59. MAKE_FLAGS += \
  60. DESTDIR="$(PKG_INSTALL_DIR)" \
  61. BUILDDIR="$(PKG_BUILD_DIR)" \
  62. LDLIBS+="$(LIBGCC_S)" \
  63. WITHOUT_XATTR=1 \
  64. WITHOUT_LZO=1
  65. define PartInstall
  66. define Package/ubi-utils-$(subst _,-,$(firstword $(subst :, ,$(1))))/install
  67. $(INSTALL_DIR) $$(1)/usr/sbin
  68. $(INSTALL_BIN) \
  69. $(PKG_INSTALL_DIR)/usr/sbin/$(firstword $(subst :, ,$(1))) \
  70. $$(1)/usr/sbin/
  71. endef
  72. endef
  73. $(foreach file,$(FILES),$(eval $(call PartInstall,$(file))))
  74. $(eval $(call BuildPackage,ubi-utils))
  75. $(foreach file,$(FILES),$(eval $(call BuildPackage,ubi-utils-$(subst _,-,$(firstword $(subst :, ,$(file)))))))