67 lines
1.4 KiB
Bash
67 lines
1.4 KiB
Bash
#!/usr/bin/env bash
|
|
name='grub'
|
|
release='1'
|
|
version='2.06'
|
|
url='https://ftp.gnu.org/gnu/grub'
|
|
description='GNU GRand Unified Bootloader'
|
|
email='parduscix@yandex.ru'
|
|
maintainer='sulincix'
|
|
license=('GPLv3')
|
|
source=("https://ftp.gnu.org/gnu/grub/grub-$version.tar.xz")
|
|
depends=()
|
|
makedepends=()
|
|
md5sums=('cf0fd928b1e5479c8108ee52cb114363')
|
|
group=()
|
|
uses=()
|
|
arch=('x86_64')
|
|
dontstrip=1
|
|
|
|
target=(efi ia32 bios)
|
|
|
|
|
|
get_grub_opt(){
|
|
if [[ "$1" == "efi" ]] ; then
|
|
echo -n "--with-platform=efi --disable-efiemu"
|
|
elif [[ "$1" == "ia32" ]] ; then
|
|
echo -n "--with-platform=efi --target=i386 --disable-efiemu"
|
|
elif [[ "$1" == "bios" ]] ; then
|
|
echo -n "--with-platform=pc"
|
|
fi
|
|
}
|
|
|
|
prepare(){
|
|
for tgt in ${target[@]} ; do
|
|
cp -prfv $name-$version $tgt
|
|
done
|
|
}
|
|
|
|
setup(){
|
|
for tgt in ${target[@]} ; do
|
|
cd $tgt
|
|
autoreconf -fvi
|
|
./configure --prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--libdir=/usr/lib64/ \
|
|
--disable-nls \
|
|
--disable-werror \
|
|
--disable-grub-themes \
|
|
$(get_grub_opt $tgt)
|
|
cd ..
|
|
done
|
|
}
|
|
|
|
build(){
|
|
for tgt in ${target[@]} ; do
|
|
make $jobs -C $tgt
|
|
done
|
|
}
|
|
|
|
package(){
|
|
for tgt in ${target[@]} ; do
|
|
make $jobs -C $tgt install
|
|
done
|
|
# remove gfx modules
|
|
find $DESTDIR -type f | grep "gfx" | xargs rm -fv
|
|
}
|
|
|