aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-util/mock/Manifest1
-rw-r--r--dev-util/mock/mock-5.6.ebuild95
2 files changed, 96 insertions, 0 deletions
diff --git a/dev-util/mock/Manifest b/dev-util/mock/Manifest
index e4d83fea5..723943e43 100644
--- a/dev-util/mock/Manifest
+++ b/dev-util/mock/Manifest
@@ -1 +1,2 @@
DIST mock-5.5.tar.gz 178460 BLAKE2B b97bd621676b3142c782ff4c61c12a18a65bb2196925c2e4383a38e98547805f23db08e6c92e62cf2f207c9347378f692524b5a64d92299842f80bc1ccff1c1b SHA512 40739f4cd480e43d990650046c91da423422917362accdb0b6ce103833b6929af6b5bd17c8477bf36dcf8c1aabb1cbcdf43ece08559ec87edd9d9c76aaa7f3a9
+DIST mock-5.6.tar.gz 179325 BLAKE2B 752d07d8dbc8627648764459fab818941999ae874e83c9787a7c7b3f1d526d7ad9840adb31b18a2ea9c83144c3c6dfe7195f48334a0e5ed1bff04723af7b1fa3 SHA512 96dea8001ad1cb1509730175b6874078369313ba0f911b7d44e896686d945cb819d0cc3604da31a20d51ae3cf3538bdd39073f27fd7f8c88fe8843c9059efd04
diff --git a/dev-util/mock/mock-5.6.ebuild b/dev-util/mock/mock-5.6.ebuild
new file mode 100644
index 000000000..3041eb78a
--- /dev/null
+++ b/dev-util/mock/mock-5.6.ebuild
@@ -0,0 +1,95 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..12} )
+
+inherit bash-completion-r1 optfeature python-single-r1
+
+DESCRIPTION="Simple chroot build environment manager for building RPMs"
+HOMEPAGE="
+ https://rpm-software-management.github.io/mock/
+ https://github.com/rpm-software-management/mock/
+"
+SRC_URI="https://github.com/rpm-software-management/mock/releases/download/${P}-1/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep '
+ app-arch/rpm[python,${PYTHON_SINGLE_USEDEP}]
+ dev-python/backoff[${PYTHON_USEDEP}]
+ dev-python/distro[${PYTHON_USEDEP}]
+ dev-python/pyroute2[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/rpmautospec-core[${PYTHON_USEDEP}]
+ dev-python/templated-dictionary[${PYTHON_USEDEP}]
+ ')
+ acct-group/mock
+ app-containers/podman
+ dev-util/distribution-gpg-keys
+ dev-util/mock-core-configs
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ test? ( $(python_gen_cond_dep 'dev-python/pytest[${PYTHON_USEDEP}]') )
+"
+
+src_prepare() {
+ default
+
+ sed -i -e "s|^VERSION\s*=.*|VERSION=\"${PV}\"|" \
+ -e "s|^SYSCONFDIR\s*=.*|SYSCONFDIR=\"${EPREFIX}/etc\"|" \
+ -e "s|^PYTHONDIR\s*=.*|PYTHONDIR=\"$(python_get_sitedir)\"|" \
+ -e "s|^PKGPYTHONDIR\s*=.*|PKGPYTHONDIR=\"$(python_get_sitedir)/mockbuild\"|" \
+ py/mockbuild/constants.py py/mock-parse-buildlog.py || die
+
+ sed -i -e "s|^_MOCK_NVR = None$|_MOCK_NVR = \"${P}-1\"|" py/mock.py || die
+ sed -i -e "s|@VERSION@|${PV}|" docs/mock.1 docs/mock-parse-buildlog.1 || die
+
+ sed -i -e 's|"/bin/free"|"/usr/bin/free"|' py/mockbuild/plugins/hw_info.py || die
+}
+
+src_compile() { :; }
+
+src_install() {
+ python_domodule py/mockbuild
+ python_newscript py/mock.py mock
+ python_newscript py/mock-parse-buildlog.py mock-parse-buildlog
+ dobin mockchain
+
+ exeinto /usr/libexec/mock
+ doexe create_default_route_in_container.sh
+
+ dobashcomp etc/bash_completion.d/mock
+ bashcomp_alias mock mock-parse-buildlog
+ dodoc docs/site-defaults.cfg
+ doman docs/mock.1 docs/mock-parse-buildlog.1
+
+ insinto /etc/mock
+ doins etc/mock/*
+ insinto /etc/pki/mock
+ doins etc/pki/*
+
+ diropts -m0775 -o root -g mock
+ keepdir /var/lib/mock
+}
+
+src_test() {
+ PYTHONPATH=py epytest tests
+}
+
+pkg_postinst() {
+ optfeature "chain mode support" app-arch/createrepo_c
+ optfeature "pigz in root_cache plugin" app-arch/pigz
+ optfeature "nspawn instead of chroot" sys-apps/systemd
+ optfeature "lvm_root plugin support" sys-fs/lvm2
+ optfeature "procenv plugin support" sys-process/procenv
+}