www-servers/automx2: Change category to net-mail
[gentoo.git] / net-mail / mu / mu-1.0-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit autotools elisp-common
7
8 DESCRIPTION="Set of tools to deal with Maildirs, in particular, searching and indexing"
9 HOMEPAGE="http://www.djcbsoftware.nl/code/mu/"
10 SRC_URI="https://github.com/djcb/mu/archive/v${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="GPL-3"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="emacs"
16
17 DEPEND="
18         dev-libs/gmime:2.6
19         dev-libs/xapian
20         dev-libs/glib:2
21         emacs? ( >=app-editors/emacs-23.1:* )"
22 RDEPEND="${DEPEND}"
23
24 SITEFILE="70mu-gentoo.el"
25
26 src_prepare() {
27         default
28         eautoreconf
29 }
30
31 src_configure() {
32         # Todo: Make a guile USE-flag as soon as >=guile-2 is avaiable
33         econf --disable-guile \
34                 --disable-gtk \
35                 --disable-webkit \
36                 $(use_enable emacs mu4e)
37 }
38
39 src_install() {
40         dobin mu/mu
41         dodoc AUTHORS HACKING NEWS NEWS.org TODO README README.org ChangeLog
42         if use emacs; then
43                 elisp-install ${PN} mu4e/*.el mu4e/*.elc
44                 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
45                 doinfo mu4e/mu4e.info
46         fi
47         # TODO: Add guile man page when guile-2 is available.
48         doman man/mu-add.1 man/mu-bookmarks.5 man/mu-cfind.1 man/mu-easy.1 \
49                   man/mu-extract.1 man/mu-find.1 man/mu-help.1 man/mu-index.1 \
50                   man/mu-mkdir.1 man/mu-remove.1 man/mu-server.1 man/mu-verify.1 \
51                   man/mu-view.1 man/mu.1
52 }
53
54 src_test() {
55         # Note: Fails with parallel make
56         emake -j1 check
57 }
58
59 pkg_postinst() {
60         if use emacs; then
61                 einfo "To use mu4e you need to configure it in your .emacs file"
62                 einfo "See the manual for more information:"
63                 einfo "http://www.djcbsoftware.nl/code/mu/mu4e/"
64         fi
65
66         elog "If you upgrade from an older major version,"
67         elog "then you need to rebuild your mail index."
68
69         use emacs && elisp-site-regen
70 }
71
72 pkg_postrm() {
73         use emacs && elisp-site-regen
74 }