dev-python/sigstore-protobuf-specs: Bump to 0.4.0
[gentoo/gentoo.git] / app-admin / pass / pass-1.7.4-r2.ebuild
blobddac8d5bcc2d8495b41baf1f7d6f3504c47ff0ce
1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=7
6 inherit bash-completion-r1 elisp-common
8 DESCRIPTION="Stores, retrieves, generates, and synchronizes passwords securely"
9 HOMEPAGE="https://www.passwordstore.org/"
10 SRC_URI="https://git.zx2c4.com/password-store/snapshot/password-store-${PV}.tar.xz"
11 S="${WORKDIR}/password-store-${PV}"
13 LICENSE="GPL-2+"
14 SLOT="0"
15 KEYWORDS="amd64 ~arm arm64 ppc64 ~riscv x86 ~arm64-macos ~x64-macos"
16 IUSE="+git wayland X emacs dmenu importers"
18 RDEPEND="
19         app-crypt/gnupg
20         media-gfx/qrencode[png(+)]
21         >=app-text/tree-1.7.0
22         git? ( dev-vcs/git )
23         wayland? ( gui-apps/wl-clipboard )
24         X? ( x11-misc/xclip )
25         elibc_Darwin? ( app-misc/getopt )
26         dmenu? ( x11-misc/dmenu x11-misc/xdotool )
27         emacs? ( >=app-editors/emacs-23.1:* >=app-emacs/f-0.11.0 >=app-emacs/s-1.9.0 >=app-emacs/with-editor-2.5.11 )
30 src_prepare() {
31         default
33         use elibc_Darwin || return
35         # use coreutils'
36         sed -i -e 's/openssl base64/base64/g' src/platform/darwin.sh || die
37         # host getopt isn't cool, and we aren't brew (rip out brew reference)
38         sed -i -e '/^GETOPT=/s/=.*$/=getopt-long/' src/platform/darwin.sh || die
39         # make sure we can find "mount"
40         sed -i -e 's:mount -t:/sbin/mount -t:' src/platform/darwin.sh || die
43 src_compile() {
44         use emacs && elisp-compile contrib/emacs/*.el
47 src_install() {
48         emake install \
49                 DESTDIR="${D}" \
50                 PREFIX="${EPREFIX}/usr" \
51                 BASHCOMPDIR="$(get_bashcompdir)" \
52                 WITH_BASHCOMP=yes \
53                 WITH_ZSHCOMP=yes \
54                 WITH_FISHCOMP=yes
56         use dmenu && dobin contrib/dmenu/passmenu
58         if use emacs; then
59                 elisp-install ${PN} contrib/emacs/*.{el,elc}
60                 elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
61         fi
63         if use importers; then
64                 exeinto /usr/share/${PN}/importers
65                 doexe contrib/importers/*
66         fi
69 pkg_postinst() {
70         use emacs && elisp-site-regen
71         if use importers; then
72                 einfo "To import passwords from other password managers, you may use the"
73                 einfo "various importer scripts found in:"
74                 einfo "    ${EROOT}/usr/share/${PN}/importers/"
75         fi
78 pkg_postrm() {
79         use emacs && elisp-site-regen