diff options
author | Ulrich Müller <ulm@gentoo.org> | 2022-12-16 19:03:16 +0100 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2022-12-16 19:05:12 +0100 |
commit | e7c3de949b9565006c50eebcc50fdf9f66791fb5 (patch) | |
tree | 3d272954b9f733ed608834a0b6ae9dc34502297c /x11-misc | |
parent | www-apps/chromedriver-bin: drop 106.0.5249.61 (diff) | |
download | gentoo-e7c3de949b9565006c50eebcc50fdf9f66791fb5.tar.gz gentoo-e7c3de949b9565006c50eebcc50fdf9f66791fb5.tar.bz2 gentoo-e7c3de949b9565006c50eebcc50fdf9f66791fb5.zip |
x11-misc/emacs-desktop-mail: Initial import
Ebuild contributed by me.
Closes: https://bugs.gentoo.org/885981
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'x11-misc')
-rw-r--r-- | x11-misc/emacs-desktop-mail/emacs-desktop-mail-1.0.ebuild | 53 | ||||
-rw-r--r-- | x11-misc/emacs-desktop-mail/metadata.xml | 9 |
2 files changed, 62 insertions, 0 deletions
diff --git a/x11-misc/emacs-desktop-mail/emacs-desktop-mail-1.0.ebuild b/x11-misc/emacs-desktop-mail/emacs-desktop-mail-1.0.ebuild new file mode 100644 index 000000000000..07495faea5b4 --- /dev/null +++ b/x11-misc/emacs-desktop-mail/emacs-desktop-mail-1.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +NEED_EMACS=28 + +inherit elisp desktop xdg-utils + +DESCRIPTION="Desktop entries for handling mailto URIs with GNU Emacs" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Emacs" +S="${WORKDIR}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +src_compile() { :; } + +src_install() { + newmenu - emacs-mail.desktop <<-EOF + [Desktop Entry] + Type=Application + Name=GNU Emacs (mail) + NoDisplay=true + Exec=${EPREXIX}/usr/bin/emacs -f message-mailto %u + Terminal=false + MimeType=x-scheme-handler/mailto; + EOF + + newmenu - emacsclient-mail.desktop <<-EOF + [Desktop Entry] + Type=Application + Name=Emacsclient (mail) + NoDisplay=true + Exec=${EPREFIX}/usr/libexec/emacs/emacsclient-mail-wrapper.sh %u + Terminal=false + MimeType=x-scheme-handler/mailto; + EOF + + exeinto /usr/libexec/emacs + newexe - emacsclient-mail-wrapper.sh <<-EOF + #!${EPREXIX}/bin/bash + exec ${EPREFIX}/usr/bin/emacsclient --eval "(message-mailto \\"\$1\\")" + EOF +} + +pkg_postinst() { + xdg_desktop_database_update +} + +pkg_postrm() { + xdg_desktop_database_update +} diff --git a/x11-misc/emacs-desktop-mail/metadata.xml b/x11-misc/emacs-desktop-mail/metadata.xml new file mode 100644 index 000000000000..986088003fe1 --- /dev/null +++ b/x11-misc/emacs-desktop-mail/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>gnu-emacs@gentoo.org</email> + <name>Gentoo GNU Emacs project</name> +</maintainer> +<stabilize-allarches/> +</pkgmetadata> |