From d51e09a6d7a9c66e20595c2dd258e68a8b4d2d61 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Mon, 29 Apr 2024 18:37:35 +0200 Subject: [PATCH] sys-apps/asahi-scripts: add 20240429 Signed-off-by: Janne Grunau --- sys-apps/asahi-scripts/Manifest | 1 + .../asahi-scripts-20240429.ebuild | 53 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 sys-apps/asahi-scripts/asahi-scripts-20240429.ebuild diff --git a/sys-apps/asahi-scripts/Manifest b/sys-apps/asahi-scripts/Manifest index c39af7b..ced97e6 100644 --- a/sys-apps/asahi-scripts/Manifest +++ b/sys-apps/asahi-scripts/Manifest @@ -1 +1,2 @@ DIST asahi-scripts-20240411.tar.gz 10700 BLAKE2B a625556f8bf1636c187705012ade561e83edc5ab358cd22c8d5b8b9f36cf8c1c1abf4087978c87e44eafb625b8513eeefb846155b7e3d68f5397dc3580bd971a SHA512 7757a929de535c0c506655daa03cce2d34c2608bd3a2d012772e6de0c1e5a9cae5717b421fecc54c66a44c3983535013116ba1205c7555eed6bb58f958c46e17 +DIST asahi-scripts-20240429.tar.gz 10899 BLAKE2B f024151d59a260f9e7b6104a0be4814f456a5952e21da59176c196685bd85702374c79c804b0c08d60538b37dedaa053e53ec094f0d7fd64eb1fd286ebe41d4a SHA512 c722c82b0bf4f41114129d5b88cb269e0a4c9143acae7c7ba23b2b21c86428d8fdbb38bbdd6cd2f81b631e8ca5d0617b2d0ce3efe5d72986d2e9dc01bbe4cb5d diff --git a/sys-apps/asahi-scripts/asahi-scripts-20240429.ebuild b/sys-apps/asahi-scripts/asahi-scripts-20240429.ebuild new file mode 100644 index 0000000..2b7ab70 --- /dev/null +++ b/sys-apps/asahi-scripts/asahi-scripts-20240429.ebuild @@ -0,0 +1,53 @@ +# Copyright 2022 James Calligeros +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +DESCRIPTION="Apple Silicon support scripts" +HOMEPAGE="https://asahilinux.org/" +SRC_URI="https://github.com/AsahiLinux/${PN}/archive/refs/tags/${PV}.tar.gz -> ${PN}-${PV}.tar.gz" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~arm64" + +BDEPEND=" + dev-build/make" + +src_prepare() { + default +} + +src_compile() { + emake || die "Could not invoke emake" +} + +src_install() { + emake DESTDIR="${D}" PREFIX="/usr" SYS_PREFIX="" install-dracut + + # install gentoo sys config + insinto /etc/default + newins "${FILESDIR}"/update-m1n1.gentoo.conf update-m1n1 +} + +pkg_postinst() { + if [[ ! -e ${ROOT}/usr/lib/asahi-boot ]]; then + ewarn "These scripts are intended for use on Apple Silicon" + ewarn "machines with the Asahi tooling installed! Please" + ewarn "install sys-boot/m1n1, sys-boot/u-boot and" + ewarn "sys-firmware/asahi-firmware!" + fi + + elog "Asahi scripts have been installed to /usr/. For more" + elog "information on how to use them, please visit the Wiki." + + if [[ -e ${ROOT}/usr/local/share/asahi-scripts/functions.sh ]]; then + ewarn "You have upgraded to a new version of ${PN}. Please" + ewarn "remove /usr/local/share/asahi-scripts/," + ewarn " /usr/local/bin/update-m1n1, and" + ewarn "/usr/local/bin/update-vendor-firmware." + fi + + if [[ -e ${ROOT}/etc/dracut.conf.d/10-apple.conf ]]; then + ewarn "Please remove /etc/dracut.conf.d/10-apple.conf" + fi +}