summaryrefslogtreecommitdiff
path: root/net-nds/nsscache/nsscache-0.47.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-14 11:10:11 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-14 11:10:11 +0100
commit81b8f20732954c4508baf2f77472b5435e3f851f (patch)
tree4180177cb7ba85eab50159ce96218c2419fb24a6 /net-nds/nsscache/nsscache-0.47.ebuild
parent946859e0e36904cffb3e0ccbccb6b7b1347c1cc8 (diff)
gentoo auto-resync : 14:09:2022 - 11:10:10
Diffstat (limited to 'net-nds/nsscache/nsscache-0.47.ebuild')
-rw-r--r--net-nds/nsscache/nsscache-0.47.ebuild72
1 files changed, 72 insertions, 0 deletions
diff --git a/net-nds/nsscache/nsscache-0.47.ebuild b/net-nds/nsscache/nsscache-0.47.ebuild
new file mode 100644
index 000000000000..9d67d529c0be
--- /dev/null
+++ b/net-nds/nsscache/nsscache-0.47.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+
+inherit distutils-r1
+
+DESCRIPTION="commandline tool to sync directory services to local cache"
+HOMEPAGE="https://github.com/google/nsscache"
+SCRIPT_A='nsscache-0.30-r3-gentoo-authorized-keys-command.py'
+SRC_URI="
+ https://github.com/google/nsscache/archive/version/${PV}.tar.gz -> ${P}.tar.gz
+ https://dev.gentoo.org/~robbat2/${SCRIPT_A}"
+
+LICENSE="GPL-2"
+SLOT="0"
+#KEYWORDS="~amd64 ~x86"
+KEYWORDS="" # pending infra testing
+IUSE="nsscache s3 test"
+RESTRICT="test" # requires network
+
+#test? ( dev-python/pytest-cov[${PYTHON_USEDEP}] dev-python/mox3[${PYTHON_USEDEP}] )
+DEPEND="
+ dev-python/ldap3[${PYTHON_USEDEP}]
+ dev-python/pycurl[${PYTHON_USEDEP}]
+ s3? ( dev-python/boto3[${PYTHON_USEDEP}] )"
+RDEPEND="${DEPEND}
+ nsscache? ( >=sys-auth/libnss-cache-0.10 )"
+
+S="${WORKDIR}/${PN}-version-${PV}"
+
+python_prepare_all() {
+ # If tests are disabled in the ebuild, disable in setup
+ if [[ "${RESTRICT/test}" != "$RESTRICT" ]]; then
+ sed -i \
+ -e "/setup_requires/s,'pytest-runner',,g" \
+ -e '/tests_require/s,\[.*\],[],g' \
+ setup.py || die
+ sed -i \
+ -e '/test=pytest/d' \
+ setup.cfg || die
+ sed -i \
+ -e '/pytest/d' \
+ requirements.txt || die
+ fi
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ distutils-r1_python_compile --verbose
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ python_scriptinto /usr/libexec/nsscache
+ python_newexe "${DISTDIR}"/"${SCRIPT_A}" authorized-keys-command.py
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ doman nsscache.1 nsscache.conf.5
+ dodoc THANKS nsscache.cron CONTRIBUTING.md README.md
+
+ keepdir /var/lib/nsscache
+}
+
+[[ "${RESTRICT/test}" != "$RESTRICT" ]] && distutils_enable_tests pytest