blob: 90e8e23a9e6d93bc0486333572b7fa90ba3dfe41 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emacs/easypg/easypg-0.0.16-r1.ebuild,v 1.3 2010/05/13 19:41:31 ulm Exp $
NEED_EMACS=22
inherit elisp
MY_PN=epg
DESCRIPTION="GnuPG interface for Emacs"
HOMEPAGE="http://www.easypg.org/"
SRC_URI="mirror://sourceforge.jp/epg/29289/${MY_PN}-${PV}.tar.gz
gnus? ( mirror://sourceforge.jp/epg/25608/pgg-${MY_PN}.el )"
LICENSE="GPL-2 FDL-1.1"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="gnus"
DEPEND="app-crypt/gnupg"
RDEPEND="${DEPEND}"
S="${WORKDIR}/${MY_PN}-${PV}"
SITEFILE="50${PN}-gentoo.el"
pkg_setup() {
EMACS_VERSION=$(elisp-emacs-version)
einfo "Emacs version: ${EMACS_VERSION}"
if [ "${EMACS_VERSION%%.*}" -ge 23 ]; then
echo
elog "Please note that \"${PN}\" is already included with Emacs 23 or"
elog "later, so ${CATEGORY}/${PN} is only needed for lower versions."
elog "You may select the active Emacs version with \"eselect emacs\"."
fi
}
src_unpack() {
unpack ${A}
use gnus && cp "${DISTDIR}/pgg-epg.el" "${S}"
}
src_compile() {
econf
emake || die "emake failed"
elisp-make-autoload-file || die
if use gnus; then
elisp-compile pgg-epg.el || die
fi
}
src_install() {
einstall || die "einstall failed"
elisp-install ${MY_PN} ${PN}-autoloads.el || die
elisp-site-file-install "${FILESDIR}/${SITEFILE}" ${MY_PN} || die
if use gnus; then
elisp-install ${MY_PN} pgg-epg.el* || die
fi
# prevent inclusion of package dir by subdirs.el
touch "${D}${SITELISP}/${MY_PN}/.nosearch" || die
dodoc AUTHORS ChangeLog NEWS README || die
}
pkg_postinst() {
elisp-site-regen
elog "See the epa info page for more information"
if use gnus; then
elog "To use, add (setq pgg-scheme 'epg) to your ~/.gnus"
fi
}
|