wok-6.x annotate grub2/receipt @ rev 25080
updated os-prober (1.79 -> 1.80)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Jun 15 16:08:36 2022 +0100 (2022-06-15) |
parents | 77181abaf3f8 |
children |
rev | line source |
---|---|
pascal@4478 | 1 # SliTaz package receipt. |
pascal@4478 | 2 |
pascal@4478 | 3 PACKAGE="grub2" |
Hans-G?nter@22404 | 4 VERSION="2.04" |
pascal@4478 | 5 CATEGORY="base-system" |
pascal@4478 | 6 SHORT_DESC="GRUB2 boot loader." |
pascal@4478 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@14999 | 8 LICENSE="GPL3" |
Hans-G?nter@22404 | 9 WEB_SITE="https://www.gnu.org/software/grub/" |
Hans-G?nter@22404 | 10 |
Hans-G?nter@22404 | 11 SOURCE="grub" |
pascal@13114 | 12 TARBALL="$SOURCE-$VERSION.tar.xz" |
pascal@24415 | 13 WGET_URL="http://ftp.gnu.org/gnu/grub/$TARBALL" |
pascal@14999 | 14 |
Hans-G?nter@22404 | 15 DEPENDS="freetype grep libdevmapper libusb libusb-compat ncurses zlib" |
Hans-G?nter@24888 | 16 BUILD_DEPENDS="automake bison flex freetype-dev fuse2-dev libdevmapper-dev |
Hans-G?nter@22404 | 17 libusb-compat-dev libusb-dev ncurses-dev xz-dev zlib-dev" |
pascal@4478 | 18 |
Hans-G?nter@24065 | 19 CONFIG_FILES="/etc/default/grub /etc/grub.d/40_custom" |
Hans-G?nter@24065 | 20 |
Hans-G?nter@24029 | 21 SUGGESTED="os-prober" |
Hans-G?nter@24029 | 22 |
pascal@24415 | 23 # What is the latest version available today? |
pascal@24415 | 24 current_version() |
pascal@24415 | 25 { |
pascal@24415 | 26 wget -O - ${WGET_URL%/*} 2>/dev/null | \ |
pascal@24415 | 27 sed "/$SOURCE-/!d;/tar/!d;s|.*$SOURCE-||;s|.tar.*||" | sort -Vr | sed q |
pascal@24415 | 28 } |
pascal@24415 | 29 |
pascal@4478 | 30 # Rules to configure and make the package. |
pascal@4478 | 31 compile_rules() |
pascal@4478 | 32 { |
Hans-G?nter@24889 | 33 sed -i 's|fprintf(...) |&(void)|' grub-core/script/yylex.l |
Hans-G?nter@24888 | 34 |
Hans-G?nter@24888 | 35 # Avoid grub-mkimage error: decompressor is too big: |
Hans-G?nter@24888 | 36 patch --strip=1 --input=$stuff/patches/gentpl.py-2.04 |
Hans-G?nter@24888 | 37 # see also: http://git.savannah.gnu.org/cgit/grub.git/commit/?id=6643507ce30f775008e093580f0c9499dfb2c485 |
Hans-G?nter@24888 | 38 |
Hans-G?nter@24888 | 39 ./autogen.sh && |
Hans-G?nter@22404 | 40 ./configure \ |
Hans-G?nter@22404 | 41 --prefix=/usr \ |
Hans-G?nter@22404 | 42 --sysconfdir=/etc \ |
Hans-G?nter@22404 | 43 --mandir=/usr/share/man \ |
Hans-G?nter@22404 | 44 $CONFIGURE_ARGS && |
pascal@15265 | 45 make $MAKEFLAGS && |
Hans-G?nter@24888 | 46 make install DESTDIR=$DESTDIR |
pascal@4478 | 47 } |
pascal@4478 | 48 |
pascal@4478 | 49 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@4478 | 50 genpkg_rules() |
pascal@4478 | 51 { |
Hans-G?nter@22404 | 52 mkdir -p $fs/boot/grub |
Hans-G?nter@24028 | 53 mkdir -p $fs/etc/default |
Hans-G?nter@22404 | 54 mkdir -p $fs/usr |
Hans-G?nter@22404 | 55 |
Hans-G?nter@22404 | 56 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@22404 | 57 cp -a $install/usr/sbin $fs/usr |
Hans-G?nter@22404 | 58 cp -a $install/usr/share $fs/usr |
Hans-G?nter@22404 | 59 cp -a $install/usr/lib $fs/usr |
Hans-G?nter@22404 | 60 cp -a $install/etc $fs |
Hans-G?nter@24028 | 61 |
Hans-G?nter@24028 | 62 cp -a stuff/etc-default-grub $fs/etc/default/grub |
Hans-G?nter@24888 | 63 |
Hans-G?nter@22404 | 64 # Example configuration file (grub.cfg). |
Hans-G?nter@22404 | 65 cp stuff/example-grub.cfg $fs/boot/grub |
pascal@13842 | 66 } |
pascal@13842 | 67 |
pascal@13842 | 68 post_install() |
pascal@13842 | 69 { |
pascal@13841 | 70 cat <<EOT |
Hans-G?nter@24888 | 71 |
Hans-G?nter@24888 | 72 # To install grub to MBR on device sda enter: |
pascal@13841 | 73 grub-install /dev/sda |
pascal@13841 | 74 |
Hans-G?nter@24028 | 75 # To modify GRUB defaults, edit |
Hans-G?nter@24028 | 76 /etc/default/grub |
Hans-G?nter@24028 | 77 |
Hans-G?nter@24888 | 78 # To generate a configuration file enter: |
pascal@13841 | 79 grub-mkconfig -o /boot/grub/grub.cfg |
pascal@13841 | 80 |
pascal@13841 | 81 # You can learn from /boot/grub/example-grub.cfg too. |
pascal@13841 | 82 EOT |
pascal@4478 | 83 } |