pass-1.6.5.ebuild 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 elisp-common
  5. DESCRIPTION="Stores, retrieves, generates, and synchronizes passwords securely"
  6. HOMEPAGE="https://www.passwordstore.org/"
  7. SRC_URI="https://git.zx2c4.com/password-store/snapshot/password-store-${PV}.tar.xz"
  8. SLOT="0"
  9. LICENSE="GPL-2"
  10. KEYWORDS="amd64 x86 ~x86-macos"
  11. IUSE="+git X zsh-completion fish-completion emacs dmenu importers elibc_Darwin"
  12. RDEPEND="
  13. app-crypt/gnupg
  14. app-admin/pwgen
  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. use zsh-completion && export FORCE_ZSHCOMP=1
  39. use fish-completion && export FORCE_FISHCOMP=1
  40. emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
  41. use dmenu && dobin contrib/dmenu/passmenu
  42. newbashcomp src/completion/pass.bash-completion pass
  43. if use emacs; then
  44. elisp-install ${PN} contrib/emacs/*.el
  45. elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
  46. fi
  47. if use importers; then
  48. exeinto /usr/share/${PN}/importers
  49. doexe contrib/importers/*
  50. fi
  51. }
  52. pkg_postinst() {
  53. use emacs && elisp-site-regen
  54. if use importers; then
  55. einfo "To import passwords from other password managers, you may use the"
  56. einfo "various importer scripts found in:"
  57. einfo " ${ROOT}usr/share/${PN}/importers/"
  58. fi
  59. }
  60. pkg_postrm() {
  61. use emacs && elisp-site-regen
  62. }