ca94b1878a44b926e83f8d62da57587dbc437f84
[openwrt/staging/dedeckeh.git] / package / boot / grub2 / Makefile
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
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=grub
12 PKG_VERSION:=2.02~beta3
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 http://gnualpha.uib.no/grub/ \
18 http://mirrors.fe.up.pt/pub/gnu-alpha/grub/ \
19 http://www.nic.funet.fi/pub/gnu/alpha/gnu/grub/
20 PKG_HASH:=30ec3d555e52a702c3eef449872ef874eff28b320f40b55ffc47f70db8e5ada1
21
22 PKG_FIXUP:=autoreconf
23 HOST_BUILD_PARALLEL:=1
24 PKG_BUILD_DEPENDS:=grub2/host
25
26 PKG_SSP:=0
27
28 PKG_FLAGS:=nonshared
29
30 include $(INCLUDE_DIR)/host-build.mk
31 include $(INCLUDE_DIR)/package.mk
32
33 define Package/grub2
34 CATEGORY:=Boot Loaders
35 SECTION:=boot
36 TITLE:=GRand Unified Bootloader
37 URL:=http://www.gnu.org/software/grub/
38 DEPENDS:=@TARGET_x86||TARGET_x86_64
39 endef
40
41 define Package/grub2-editenv
42 CATEGORY:=Utilities
43 SECTION:=utils
44 SUBMENU:=Boot Loaders
45 TITLE:=Grub2 Environment editor
46 URL:=http://www.gnu.org/software/grub/
47 DEPENDS:=@TARGET_x86||TARGET_x86_64
48 endef
49
50 define Package/grub2-editenv/description
51 Edit grub2 environment files.
52 endef
53
54 HOST_BUILD_PREFIX := $(STAGING_DIR_HOST)
55
56 CONFIGURE_VARS += \
57 grub_build_mkfont_excuse="don't want fonts"
58
59 CONFIGURE_ARGS += \
60 --target=$(REAL_GNU_TARGET_NAME) \
61 --disable-werror \
62 --disable-nls \
63 --disable-device-mapper \
64 --disable-libzfs \
65 --disable-grub-mkfont
66
67 HOST_CONFIGURE_VARS += \
68 grub_build_mkfont_excuse="don't want fonts"
69
70 HOST_CONFIGURE_ARGS += \
71 --disable-grub-mkfont \
72 --target=$(REAL_GNU_TARGET_NAME) \
73 --sbindir="$(STAGING_DIR_HOST)/bin" \
74 --disable-werror \
75 --disable-libzfs \
76 --disable-nls
77
78 HOST_MAKE_FLAGS += \
79 TARGET_RANLIB=$(TARGET_RANLIB) \
80 LIBLZMA=$(STAGING_DIR_HOST)/lib/liblzma.a
81
82 define Host/Configure
83 $(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in
84 $(Host/Configure/Default)
85 endef
86
87 define Package/grub2-editenv/install
88 $(INSTALL_DIR) $(1)/usr/sbin
89 $(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
90 endef
91
92 $(eval $(call HostBuild))
93 $(eval $(call BuildPackage,grub2))
94 $(eval $(call BuildPackage,grub2-editenv))