因为对全部软件包逐一核对上游后发现 42 个的 `LICENSE=` 与上游实际授权不符,所以按上游的授权文件与源码文件头改正,并为其中被误标为开源、实为专有的软件补上 `RESTRICT`。 最严重的一类是专有软件被标成开源:`deepin-wine-helper` 与 `deepin-wine-plugin` 的 deb 内 copyright 写着 `All rights reserved by Wuhan Deepin Technology Co., Ltd.`,`app-misc/z-library` 的 deb control 写 `License: unknown`,`media-sound/qqmusic` 用的 `CC0-1.0` 是公共领域捐弃、与腾讯的服务协议完全相反。 `net-proxy/clash-rs` 此前只有 `LICENSE+=`、没有基底 `LICENSE=`,主程序的 Apache-2.0 完全没有声明。 `sys-kernel/xanmod-sources` 的 `LICENSE+=" CDDL"` 在 xanmod patch 与 genpatches 中都找不到依据,一并删除。 Signed-off-by: Zakk <zakk@gentoozh.org>
65 lines
1.5 KiB
Bash
65 lines
1.5 KiB
Bash
# Copyright 1999-2026 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI="8"
|
|
ETYPE="sources"
|
|
K_WANT_GENPATCHES="base extras"
|
|
# Note: to bump xanmod, check K_GENPATCHES_VER in sys-kernel/gentoo-sources
|
|
K_GENPATCHES_VER="5"
|
|
|
|
inherit check-reqs kernel-2
|
|
detect_version
|
|
detect_arch
|
|
|
|
MY_P=linux-${PV%.*}
|
|
DESCRIPTION="Full XanMod source, including the Gentoo patchset and other patch options"
|
|
HOMEPAGE="https://xanmod.org"
|
|
|
|
XANMOD_VERSION="1"
|
|
XANMOD_URI="https://downloads.sourceforge.net/project/xanmod/releases/main"
|
|
OKV="${OKV}-xanmod"
|
|
SRC_URI="
|
|
${KERNEL_BASE_URI}/linux-${KV_MAJOR}.${KV_MINOR}.tar.xz
|
|
${GENPATCHES_URI}
|
|
${XANMOD_URI}/${PV}-xanmod${XANMOD_VERSION}/patch-${PV}-xanmod${XANMOD_VERSION}.xz
|
|
"
|
|
S="${WORKDIR}/linux-${OKV}${XANMOD_VERSION}"
|
|
|
|
KEYWORDS="~amd64"
|
|
|
|
pkg_pretend() {
|
|
CHECKREQS_DISK_BUILD="4G"
|
|
check-reqs_pkg_pretend
|
|
}
|
|
|
|
src_unpack() {
|
|
default
|
|
mv "${WORKDIR}/${MY_P}" "${WORKDIR}/linux-${OKV}${XANMOD_VERSION}"
|
|
}
|
|
|
|
src_prepare() {
|
|
kernel-2_src_prepare
|
|
rm "${S}/tools/testing/selftests/tc-testing/action-ebpf"
|
|
# delete linux version patches (xanmod already includes stable bump)
|
|
rm "${WORKDIR}"/*"${MY_P}"*.patch 2>/dev/null || :
|
|
|
|
local PATCHES=(
|
|
# xanmod patches
|
|
"${WORKDIR}"/patch-${PV}-xanmod${XANMOD_VERSION}
|
|
# genpatches
|
|
"${WORKDIR}"/*.patch
|
|
)
|
|
default
|
|
}
|
|
|
|
pkg_postinst() {
|
|
elog "MICROCODES"
|
|
elog "Use xanmod-sources with microcodes"
|
|
elog "Read https://wiki.gentoo.org/wiki/Intel_microcode"
|
|
kernel-2_pkg_postinst
|
|
}
|
|
|
|
pkg_postrm() {
|
|
kernel-2_pkg_postrm
|
|
}
|