84 lines
2.2 KiB
Bash
84 lines
2.2 KiB
Bash
# Template file for 'refind'
|
|
pkgname=refind
|
|
version=0.13.3.1
|
|
revision=1
|
|
archs="x86_64* i686* aarch64*"
|
|
makedepends="gnu-efi-libs"
|
|
depends="bash dosfstools efibootmgr"
|
|
short_desc="EFI boot manager utility"
|
|
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
|
|
license="GPL-3.0-only, BSD-3-Clause, BSD-2-Clause, GPL-2.0-only, LGPL-2.1-only"
|
|
homepage="https://sourceforge.net/projects/refind/"
|
|
distfiles="${SOURCEFORGE_SITE}/refind/refind-src-${version}.tar.gz"
|
|
checksum=7a3e3f0f81bd4ae95f24e120f44e01319231f488fef7cc8bf03a1aea23c6cfd1
|
|
python_version=2
|
|
conf_files="/etc/default/refind-kernel-hook.conf"
|
|
make_dirs="/etc/refind.d/keys 0755 root root"
|
|
|
|
do_build() {
|
|
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*) _ARCH="ia32";;
|
|
*) _ARCH="${XBPS_TARGET_MACHINE%-musl}";;
|
|
esac
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
export CROSS_COMPILE="${XBPS_CROSS_TRIPLET}-"
|
|
fi
|
|
|
|
make ARCH=${_ARCH} \
|
|
EFIINC=${XBPS_CROSS_BASE}/usr/include/efi \
|
|
GNUEFILIB=${XBPS_CROSS_BASE}/usr/lib \
|
|
EFILIB=${XBPS_CROSS_BASE}/usr/lib \
|
|
EFICRT0=${XBPS_CROSS_BASE}/usr/lib \
|
|
gnuefi fs_gnuefi
|
|
}
|
|
|
|
do_install() {
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*) _EFI_ARCH="ia32";;
|
|
x86_64*) _EFI_ARCH="x64";;
|
|
aarch64*) _EFI_ARCH="aa64";;
|
|
esac
|
|
|
|
vbin mkrlconf
|
|
vbin mvrefind
|
|
vbin refind-mkdefault
|
|
vbin refind-install
|
|
vbin fonts/mkfont.sh refind-mkfont
|
|
|
|
vlicense LICENSE.txt
|
|
|
|
vdoc COPYING.txt
|
|
vdoc README.txt
|
|
vdoc CREDITS.txt
|
|
vdoc NEWS.txt
|
|
vcopy docs/refind usr/share/doc/refind
|
|
vcopy docs/Styles usr/share/doc/refind
|
|
|
|
vman docs/man/mkrlconf.8
|
|
vman docs/man/mvrefind.8
|
|
vman docs/man/refind-install.8
|
|
vman docs/man/refind-mkdefault.8
|
|
|
|
vinstall refind/refind_${_EFI_ARCH}.efi 644 usr/share/refind/
|
|
vinstall refind.conf-sample 644 usr/share/refind/
|
|
vcopy keys usr/share/refind
|
|
vcopy fonts usr/share/refind/
|
|
vcopy icons usr/share/refind/
|
|
vcopy banners usr/share/refind/
|
|
vcopy images usr/share/refind/
|
|
vcopy drivers_${_EFI_ARCH} usr/share/refind/
|
|
vinstall gptsync/gptsync_${_EFI_ARCH}.efi 644 \
|
|
usr/share/refind/tools_${_EFI_ARCH}/
|
|
|
|
|
|
vinstall "${FILESDIR}/refind-kernel-hook.conf" 644 etc/default
|
|
vinstall ${FILESDIR}/kernel.post-install 744 \
|
|
etc/kernel.d/post-install 50-refind
|
|
vinstall ${FILESDIR}/kernel.post-remove 744 \
|
|
etc/kernel.d/post-remove 50-refind
|
|
}
|