############################################################################### # # # IPFire.org - A linux based firewall # # Copyright (C) 2007 Michael Tremer & Christian Schmidt # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program. If not, see . # # # ############################################################################### ############################################################################### # Definitions ############################################################################### include Config PKG_NAME = grub VER = 0.97 THISAPP = $(PKG_NAME)-$(VER) DL_FILE = $(THISAPP).tar.gz DIR_APP = $(DIR_SRC)/$(THISAPP) OBJECT = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) CFLAGS = CXXFLAGS = ############################################################################### # Top-level Rules ############################################################################### objects = $(DL_FILE) grub-0.94-i2o.patch grub-0.95-moreraid.patch \ grub-0.93-special-device-names.patch grub-0.95-splash-error-term.patch \ grub-0.95-xpmjunk.patch grub-0.93-graphics-bootterm.patch \ grub-0.91-splashimagehelp.patch grub-0.95-graphics.patch \ $(THISAPP)-disk_geometry-1.patch grub-0.93-configfile.patch \ $(THISAPP)-256byte_inode-1.patch grub-0.94-installcopyonly.patch \ $(THISAPP)-install.in.patch install : $(OBJECT) download : $(objects) $(objects) : @$(LOAD) ############################################################################### # Installation Details ############################################################################### $(OBJECT) : @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-disk_geometry-1.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.95-graphics.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.91-splashimagehelp.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.93-graphics-bootterm.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.95-xpmjunk.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.95-splash-error-term.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.93-special-device-names.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.95-moreraid.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.94-i2o.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.93-configfile.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-256byte_inode-1.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-install.in.patch cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/grub-0.94-installcopyonly.patch cd $(DIR_APP) && autoconf cd $(DIR_APP) && \ CC="gcc -fno-stack-protector -fno-pic -fno-pie -nopie" \ ./configure \ $(CONFIGURE_ARCH) \ --prefix=/usr cd $(DIR_APP) && make -j $(PRALLELISM) cd $(DIR_APP) && make install sed -e "s/pkgdatadir/pkglibdir/g" -i /usr/sbin/grub-install mkdir -vp /boot/grub for i in $(DIR_SRC)/config/bootloader/{grub.conf,splash.xpm.gz}; do \ [ -f $$i ] && cp -vf $$i /boot/grub; \ done ifeq "$(EMB)" "1" # Enable serial console on embedded build sed -e "s/^#serial/serial/" \ -e "s/@SERIAL@/console=ttyS0,9600n8/g" \ -i /boot/grub/grub.conf else # Remove the placeholder @SERIAL@ on non-embedded build sed -e "s/@SERIAL@//g" \ -i /boot/grub/grub.conf endif # Grub uses anonymous mapping and will be killed by PaX. # The following command changes Grub's PaX flags: paxctl -spm /usr/sbin/grub @rm -rf $(DIR_APP) @$(POSTBUILD)