nsscache-0.31.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. SCRIPT_A='nsscache-0.30-r3-gentoo-authorized-keys-command.py'
  9. SRC_URI="
  10. https://github.com/google/nsscache/archive/version/${PV}.tar.gz -> ${P}.tar.gz
  11. https://dev.gentoo.org/~robbat2/${SCRIPT_A}"
  12. LICENSE="GPL-2"
  13. SLOT="0"
  14. KEYWORDS="~amd64 ~x86"
  15. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  16. IUSE="nssdb nsscache"
  17. DEPEND="${PYTHON_DEPS}
  18. dev-python/python-ldap[${PYTHON_USEDEP}]
  19. dev-python/pycurl[${PYTHON_USEDEP}]
  20. dev-python/bsddb3[${PYTHON_USEDEP}]"
  21. RDEPEND="${DEPEND}
  22. nssdb? ( sys-libs/nss-db )
  23. nsscache? ( >=sys-auth/libnss-cache-0.10 )"
  24. RESTRICT="test"
  25. S="${WORKDIR}/${PN}-version-${PV}"
  26. src_prepare() {
  27. find "${S}" -name '*.py' -exec \
  28. sed -i '/^import bsddb$/s,bsddb,bsddb3 as bsddb,g' \
  29. {} \+
  30. distutils-r1_src_prepare
  31. }
  32. src_install() {
  33. distutils-r1_src_install
  34. doman nsscache.1 nsscache.conf.5
  35. dodoc THANKS nsscache.cron CONTRIBUTING.md README.md
  36. exeinto /usr/libexec/nsscache
  37. newexe "${DISTDIR}"/"${SCRIPT_A}" authorized-keys-command.py
  38. keepdir /var/lib/nsscache
  39. }