Makefile 2.2 KB

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