sys-apps/config-site: Add from Gentoo

It's from Gentoo commit 940fa400354017ec9cc840f3e2cb897f73bce9c6.
This commit is contained in:
Krzesimir Nowak 2023-06-06 17:51:57 +02:00 committed by Flatcar Buildbot
parent dfbf82098c
commit eca45840ca
3 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,24 @@
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="config.site to load dropins from config.site.d"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Base"
S=${WORKDIR}
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
RDEPEND="!<sys-devel/crossdev-20230209-r1"
src_configure() {
sed -e "s|@datarootdir@|${EPREFIX}/usr/share|" \
"${FILESDIR}/config.site.in" > config.site || die
}
src_install() {
insinto /usr/share
doins config.site
}

View File

@ -0,0 +1,10 @@
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
for script in "@datarootdir@/config.site.d"/*.conf; do
test -f "${script}" || continue
test -r "${script}" || continue
echo "${0##*/}: loading site script ${script}"
. "${script}" || break
done
unset script

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>base-system@gentoo.org</email>
</maintainer>
</pkgmetadata>