net-misc/alist: add 3.42.0, drop 3.41.0
[gentoo-zh.git] / app-emulation / la-ow-syscall / la-ow-syscall-0.1.0-r1.ebuild
blob0c1c9156215296c459f3025e0663ff70579d9412
1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit linux-mod-r1
8 MODULES_KERNEL_MIN=6.1
9 MY_COMMIT="1b837fd8bc99ea0cfd74e7d85bb4357542f5e1f2"
11 DESCRIPTION="Linux kernel module for compatibility with LoongArch's old-world ABI"
12 HOMEPAGE="https://github.com/AOSC-Dev/la_ow_syscall"
14 case ${PV} in
15 9999)
16         EGIT_REPO_URI="https://github.com/AOSC-Dev/la_ow_syscall"
17         inherit git-r3
18         ;;
20         MY_P="la_ow_syscall-${MY_COMMIT}"
21         SRC_URI="https://codeload.github.com/AOSC-Dev/la_ow_syscall/zip/${MY_COMMIT} -> ${MY_P}.zip"
22         S="${WORKDIR}/${MY_P}"
23         KEYWORDS="-* ~loong"
24         ;;
25 esac
27 LICENSE="GPL-2"
28 SLOT="0"
29 RESTRICT="mirror test"
31 BDEPEND="app-arch/unzip"
33 CONFIG_CHECK="
34 KALLSYMS
35 KPROBES
38 src_compile() {
39         # otherwise the build script uses `uname -r` that will break if the
40         # target kernel version differs from the running one
41         export KVER="${KV_FULL}"
43         local modlist=(
44                 la_ow_syscall
45         )
46         linux-mod-r1_src_compile
49 src_install() {
50         linux-mod-r1_src_install
52         insinto /usr/lib/modules-load.d
53         doins "${FILESDIR}/la-ow-syscall.conf"
56 pkg_postinst() {
57         linux-mod-r1_pkg_postinst
59         elog "Be sure to load the kernel module before running any old-world program:"
60         elog
61         elog "# modprobe la_ow_syscall"
62         elog
63         elog "A config file has been installed under /usr/lib/modules-load.d for"
64         elog "automatic loading of the compatibility patch on system start-up."