sys-apps/asahi-scripts: new package, add 20231219.1

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
James Calligeros
2024-02-24 15:33:26 +00:00
committed by Sam James
parent 918de5a594
commit fcd0c704fc
5 changed files with 80 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
DIST asahi-scripts-20231219.1.tar.gz 10696 BLAKE2B 1a3103f093fa87f33f7bdc64340dbd61705ac88832b1a9a2cb015ae8ff7ccfc138b91d0f38505dcdb916ccef03a0f788dd2bbaac66fc32118ce8acb536791bdd SHA512 ab4462bd8b98558f57a1edb4ac9fb21535e6a2b8396f6774a3ea1160ad2de4f64ffb65a93d08e6112ea2d90050a1a368fd32d8a6e5b0d7a545961c57ac9d0639
@@ -0,0 +1,46 @@
# Copyright 1999-2024 Gentoo Authors
# 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"
PATCHES=("${FILESDIR}/makefile.patch"
"${FILESDIR}/update-m1n1-dtbs.patch")
src_install() {
default
emake DESTDIR="${D}" SYS_PREFIX="" install-dracut
}
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
if [[ -e ${ROOT}/bin/update-m1n1 ]]; then
ewarn "You need to remove /bin/update-m1n1."
fi
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
}
@@ -0,0 +1,6 @@
--- a/Makefile 2022-10-31 17:46:24.536323376 +1000
+++ b/Makefile 2022-10-31 17:47:13.510116412 +1000
@@ -1,2 +1,2 @@
-PREFIX=/usr/local
+PREFIX=/usr
CONFIG_DIR=/etc/default
@@ -0,0 +1,13 @@
diff --git a/update-m1n1 b/update-m1n1
index 0e55ead..f014a52 100755
--- a/update-m1n1
+++ b/update-m1n1
@@ -17,7 +17,7 @@ fi
: ${M1N1:="$SOURCE/m1n1.bin"}
: ${U_BOOT:="$SOURCE/u-boot-nodtb.bin"}
: ${TARGET:="$1"}
-: ${DTBS:=$(/bin/ls -d /lib/modules/*-ARCH | sort -rV | head -1)/dtbs/*.dtb}
+: ${DTBS:=/usr/src/linux/arch/arm64/boot/dts/apple/*.dtb}
: ${CONFIG:=/etc/m1n1.conf}
umount=false
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>jcalligeros99@gmail.com</email>
<name>James Calligeros</name>
</maintainer>
<maintainer type="project">
<email>asahi@gentoo.org</email>
</maintainer>
<upstream>
<remote-id type="github">AsahiLinux/asahi-scripts</remote-id>
</upstream>
</pkgmetadata>