grub2: disable mkfont - fix build on Archlinux
[openwrt/staging/yousong.git] / package / boot / grub2 / Makefile
1 #
2 # Copyright (C) 2006-2010 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 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=grub
12 PKG_VERSION:=2.02~beta2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
16 PKG_SOURCE_URL:=http://alpha.gnu.org/gnu/grub
17 PKG_MD5SUM:=be62932eade308a364ea4bbc91295930
18
19 HOST_BUILD_PARALLEL:=1
20 PKG_BUILD_DEPENDS:=grub2/host
21
22 include $(INCLUDE_DIR)/host-build.mk
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/grub2
26 SUBMENU:=Boot Loaders
27 CATEGORY:=Utilities
28 SECTION:=utils
29 TITLE:=GRand Unified Bootloader
30 URL:=http://www.gnu.org/software/grub/
31 DEPENDS:=@TARGET_x86||TARGET_x86_64
32 endef
33
34 define Package/grub2-editenv
35 CATEGORY:=Utilities
36 SECTION:=utils
37 TITLE:=Grub2 Environment editor
38 URL:=http://www.gnu.org/software/grub/
39 DEPENDS:=@TARGET_x86||TARGET_x86_64
40 endef
41
42 define Package/grub2-editenv/description
43 Edit grub2 environment files.
44 endef
45
46 CONFIGURE_ARGS += \
47 --target=$(REAL_GNU_TARGET_NAME) \
48 --disable-werror \
49 --disable-nls \
50 --disable-device-mapper \
51 --disable-grub-mkfont
52
53 HOST_CONFIGURE_ARGS += \
54 --target=$(REAL_GNU_TARGET_NAME) \
55 --sbindir="$(STAGING_DIR_HOST)/bin" \
56 --disable-werror \
57 --disable-nls
58
59 HOST_MAKE_FLAGS += \
60 TARGET_RANLIB=$(TARGET_RANLIB) \
61 LIBLZMA=$(STAGING_DIR_HOST)/lib/liblzma.a
62
63 define Host/Configure
64 $(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in
65 $(Host/Configure/Default)
66 endef
67
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
73 $(eval $(call HostBuild))
74 $(eval $(call BuildPackage,grub2))
75 $(eval $(call BuildPackage,grub2-editenv))