123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- set -e
- program=grub
- version=2.06
- release=4
- pkgcategory=boot
- tarname=${program}-${version}.tar.gz
- fetch=https://ftp.gnu.org/gnu/grub/$tarname
- description="
- A multiboot boot loader.
- GNU GRUB is a Multiboot boot loader. It was derived from GRUB,
- the GRand Unified Bootloader, which was originally designed and
- implemented by Erich Stefan Boleyn.
- "
- homepage=https://www.gnu.org/software/grub
- license=GPLv3+
- docs="AUTHORS BUGS COPYING NEWS README THANKS TODO"
- docsdir="${docdir}/${program}-${version}"
- build()
- {
- unpack "${tardir}/$tarname"
- cd "$srcdir"
-
- patch -Np1 -i "${worktree}/patches/grub/initrd_naming.diff"
-
- patch -Np1 -i "${worktree}/patches/grub/grub-mkconfig-enable-os-prober.diff"
-
- chmod -R u+w,go-w,a+rX-s .
- ./configure \
- $configure_args \
- --libdir=/usr/lib${libSuffix} \
- --infodir=$infodir \
- --mandir=$mandir \
- --docdir=$docsdir \
- --enable-device-mapper \
- --enable-grub-mount \
- --enable-liblzma \
- --disable-grub-mkfont \
- --disable-werror \
- --disable-efiemu \
- --build="$(gcc -dumpmachine)"
- make -j${jobs} V=1
- make -j${jobs} DESTDIR="$destdir" \
- bashcompletiondir=/usr/share/bash-completion/completions \
- install-strip
-
- rm -f "${destdir}/usr/lib${libSuffix}/charset.alias"
-
- mkdir -p "${destdir}/boot/grub/" "${destdir}/etc/default"
-
- cp -p "${worktree}/archive/grub/etc/default/grub" "${destdir}/etc/default/"
- chmod 644 "${destdir}/etc/default/grub"
-
- touch "${destdir}/etc/default/.graft-config" \
- "${destdir}/etc/grub.d/.graft-config" \
- "${destdir}/usr/share/bash-completion/completions/.graft-config"
-
- if test -d "${destdir}/$infodir"
- then
- rm -f "${destdir}/${infodir}/dir"
- lzip -9 "${destdir}/${infodir}"/*
- fi
-
- if test -d "${destdir}/$mandir"
- then
- (
- cd "${destdir}/$mandir"
- find . -type f -exec lzip -9 {} +
- find . -type l | while read -r file
- do
- ln -sf "$(readlink -- "$file").lz" "${file}.lz"
- rm -- "$file"
- done
- )
- fi
-
- mkdir -p "${destdir}/$docsdir"
- cp -p $docs "${destdir}/$docsdir"
- }
|