Makefile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #
  2. # Copyright (C) 2006-2015 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. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=grub
  10. PKG_CPE_ID:=cpe:/a:gnu:grub2
  11. PKG_VERSION:=2.02
  12. PKG_RELEASE:=3
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  14. PKG_SOURCE_URL:=@GNU/grub
  15. PKG_HASH:=810b3798d316394f94096ec2797909dbf23c858e48f7b3830826b8daa06b7b0f
  16. PKG_FIXUP:=autoreconf
  17. HOST_BUILD_PARALLEL:=1
  18. PKG_BUILD_DEPENDS:=grub2/host
  19. PKG_SSP:=0
  20. PKG_FLAGS:=nonshared
  21. include $(INCLUDE_DIR)/host-build.mk
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/grub2
  24. CATEGORY:=Boot Loaders
  25. SECTION:=boot
  26. TITLE:=GRand Unified Bootloader
  27. URL:=http://www.gnu.org/software/grub/
  28. DEPENDS:=@TARGET_x86||TARGET_x86_64
  29. endef
  30. define Package/grub2-editenv
  31. CATEGORY:=Utilities
  32. SECTION:=utils
  33. SUBMENU:=Boot Loaders
  34. TITLE:=Grub2 Environment editor
  35. URL:=http://www.gnu.org/software/grub/
  36. DEPENDS:=@TARGET_x86||TARGET_x86_64
  37. endef
  38. define Package/grub2-editenv/description
  39. Edit grub2 environment files.
  40. endef
  41. HOST_BUILD_PREFIX := $(STAGING_DIR_HOST)
  42. CONFIGURE_VARS += \
  43. grub_build_mkfont_excuse="don't want fonts"
  44. CONFIGURE_ARGS += \
  45. --target=$(REAL_GNU_TARGET_NAME) \
  46. --disable-werror \
  47. --disable-nls \
  48. --disable-device-mapper \
  49. --disable-libzfs \
  50. --disable-grub-mkfont \
  51. --with-platform=none
  52. HOST_CONFIGURE_VARS += \
  53. grub_build_mkfont_excuse="don't want fonts"
  54. HOST_CONFIGURE_ARGS += \
  55. --disable-grub-mkfont \
  56. --target=$(REAL_GNU_TARGET_NAME) \
  57. --sbindir="$(STAGING_DIR_HOST)/bin" \
  58. --disable-werror \
  59. --disable-libzfs \
  60. --disable-nls
  61. HOST_MAKE_FLAGS += \
  62. TARGET_RANLIB=$(TARGET_RANLIB) \
  63. LIBLZMA=$(STAGING_DIR_HOST)/lib/liblzma.a
  64. define Host/Configure
  65. $(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in
  66. $(Host/Configure/Default)
  67. endef
  68. define Package/grub2-editenv/install
  69. $(INSTALL_DIR) $(1)/usr/sbin
  70. $(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
  71. endef
  72. $(eval $(call HostBuild))
  73. $(eval $(call BuildPackage,grub2))
  74. $(eval $(call BuildPackage,grub2-editenv))