wok-current view grub2/receipt @ rev 24569

sokojs: add shrink.sh (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 26 18:46:53 2022 +0000 (2022-02-26)
parents 3260e959c015
children 72f2704d3ae0
line source
1 # SliTaz package receipt.
3 PACKAGE="grub2"
4 VERSION="2.04"
5 CATEGORY="base-system"
6 SHORT_DESC="GRUB2 boot loader."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL3"
9 WEB_SITE="https://www.gnu.org/software/grub/"
11 SOURCE="grub"
12 TARBALL="$SOURCE-$VERSION.tar.xz"
13 WGET_URL="http://ftp.gnu.org/gnu/grub/$TARBALL"
15 DEPENDS="freetype grep libdevmapper libusb libusb-compat ncurses zlib"
16 BUILD_DEPENDS="bison flex freetype-dev fuse-dev libdevmapper-dev
17 libusb-compat-dev libusb-dev ncurses-dev xz-dev zlib-dev"
19 CONFIG_FILES="/etc/default/grub /etc/grub.d/40_custom"
21 SUGGESTED="os-prober"
23 # What is the latest version available today?
24 current_version()
25 {
26 wget -O - ${WGET_URL%/*} 2>/dev/null | \
27 sed "/$SOURCE-/!d;/tar/!d;s|.*$SOURCE-||;s|.tar.*||" | sort -Vr | sed q
28 }
30 # Rules to configure and make the package.
31 compile_rules()
32 {
33 sed -i 's|fprintf(...) |&(void)|' \
34 grub-core/script/yylex.l
35 ./configure \
36 --prefix=/usr \
37 --sysconfdir=/etc \
38 --mandir=/usr/share/man \
39 $CONFIGURE_ARGS &&
40 make $MAKEFLAGS &&
41 make DESTDIR=$DESTDIR install
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 mkdir -p $fs/boot/grub
48 mkdir -p $fs/etc/default
49 mkdir -p $fs/usr
51 cp -a $install/usr/bin $fs/usr
52 cp -a $install/usr/sbin $fs/usr
53 cp -a $install/usr/share $fs/usr
54 cp -a $install/usr/lib $fs/usr
55 cp -a $install/etc $fs
57 cp -a stuff/etc-default-grub $fs/etc/default/grub
59 # Example configuration file (grub.cfg).
60 cp stuff/example-grub.cfg $fs/boot/grub
61 }
63 post_install()
64 {
65 cat <<EOT
66 # To install GRUB to MBR on device sda
67 grub-install /dev/sda
69 # To modify GRUB defaults, edit
70 /etc/default/grub
72 # To generate a configuration file
73 grub-mkconfig -o /boot/grub/grub.cfg
75 # You can learn from /boot/grub/example-grub.cfg too.
76 EOT
77 }