nsscache-0.30-r2.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit eutils distutils-r1
  6. DESCRIPTION="commandline tool to sync directory services to local cache"
  7. HOMEPAGE="https://github.com/google/nsscache"
  8. SRC_URI="
  9. https://github.com/google/nsscache/archive/version/${PV}.tar.gz -> ${P}.tar.gz
  10. https://dev.gentoo.org/~robbat2/nsscache-0.30-gentoo-authorized-keys-command.py"
  11. LICENSE="GPL-2"
  12. SLOT="0"
  13. KEYWORDS="~amd64 ~x86"
  14. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  15. IUSE="nssdb nsscache"
  16. DEPEND="${PYTHON_DEPS}
  17. dev-python/python-ldap[${PYTHON_USEDEP}]
  18. dev-python/pycurl[${PYTHON_USEDEP}]
  19. dev-python/bsddb3[${PYTHON_USEDEP}]"
  20. RDEPEND="${DEPEND}
  21. nssdb? ( sys-libs/nss-db )
  22. nsscache? ( >=sys-auth/libnss-cache-0.10 )"
  23. RESTRICT="test"
  24. S="${WORKDIR}/${PN}-version-${PV}"
  25. src_prepare() {
  26. find "${S}" -name '*.py' -exec \
  27. sed -i '/^import bsddb$/s,bsddb,bsddb3 as bsddb,g' \
  28. {} \+
  29. distutils-r1_src_prepare
  30. }
  31. src_install() {
  32. distutils-r1_src_install
  33. doman nsscache.1 nsscache.conf.5
  34. dodoc THANKS nsscache.cron CONTRIBUTING.md README.md
  35. exeinto /usr/libexec/nsscache
  36. newexe "${DISTDIR}"/nsscache-0.30-gentoo-authorized-keys-command.py authorized-keys-command.py
  37. keepdir /var/lib/nsscache
  38. }