pass-9999.ebuild 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit bash-completion-r1 git-2 elisp-common
  5. DESCRIPTION="Stores, retrieves, generates, and synchronizes passwords securely"
  6. HOMEPAGE="https://www.passwordstore.org/"
  7. EGIT_REPO_URI="https://git.zx2c4.com/password-store"
  8. SLOT="0"
  9. LICENSE="GPL-2"
  10. KEYWORDS=""
  11. IUSE="+git X zsh-completion fish-completion emacs dmenu importers elibc_Darwin"
  12. RDEPEND="
  13. app-crypt/gnupg
  14. media-gfx/qrencode
  15. >=app-text/tree-1.7.0
  16. git? ( dev-vcs/git )
  17. X? ( x11-misc/xclip )
  18. elibc_Darwin? ( app-misc/getopt )
  19. zsh-completion? ( app-shells/gentoo-zsh-completions )
  20. fish-completion? ( app-shells/fish )
  21. dmenu? ( x11-misc/dmenu x11-misc/xdotool )
  22. emacs? ( virtual/emacs )
  23. "
  24. S="${WORKDIR}/password-store-${PV}"
  25. src_prepare() {
  26. use elibc_Darwin || return
  27. # use coreutils'
  28. sed -i -e 's/openssl base64/base64/g' src/platform/darwin.sh || die
  29. # host getopt isn't cool, and we aren't brew (rip out brew reference)
  30. sed -i -e '/^GETOPT=/s/=.*$/=getopt-long/' src/platform/darwin.sh || die
  31. # make sure we can find "mount"
  32. sed -i -e 's:mount -t:/sbin/mount -t:' src/platform/darwin.sh || die
  33. }
  34. src_compile() {
  35. :;
  36. }
  37. src_install() {
  38. emake install \
  39. DESTDIR="${D}" \
  40. PREFIX="${EPREFIX}/usr" \
  41. BASHCOMPDIR="$(get_bashcompdir)" \
  42. WITH_BASHCOMP=yes \
  43. WITH_ZSHCOMP=$(usex zsh-completion) \
  44. WITH_FISHCOMP=$(usex fish-completion)
  45. use dmenu && dobin contrib/dmenu/passmenu
  46. if use emacs; then
  47. elisp-install ${PN} contrib/emacs/*.el
  48. elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
  49. fi
  50. if use importers; then
  51. exeinto /usr/share/${PN}/importers
  52. doexe contrib/importers/*
  53. fi
  54. }
  55. pkg_postinst() {
  56. use emacs && elisp-site-regen
  57. if use importers; then
  58. einfo "To import passwords from other password managers, you may use the"
  59. einfo "various importer scripts found in:"
  60. einfo " ${ROOT}usr/share/${PN}/importers/"
  61. fi
  62. }
  63. pkg_postrm() {
  64. use emacs && elisp-site-regen
  65. }