aboutsummaryrefslogtreecommitdiffhomepage
path: root/packaging/fedora/notmuch.spec
blob: 79994c9ae6234a19ef29af4247c303e8e8f2e0f3 (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
%global git 6b9a717c
%global date %(date +%Y%m%d)

# If you are doing a git snapshot:
#
# Release should be 1%{git}%{?dist}
# Source0 should be notmuch-%{version}-%{git}.tar.gz
# git version is generated by 'git show-ref --hash=8 HEAD'
#
# To create a tarball:
#
# git clone git://notmuchmail.org/git/notmuch
# cd notmuch
# git archive --format=tar --prefix=notmuch-0.4/ HEAD | gzip > notmuch-0.4-`git show-ref --hash=8 HEAD`.tar.gz
#

Name:           notmuch
Version:        0.15.2
Release:        3%{?dist}
Summary:        Thread-based email index, search and tagging

Group:          Applications/Internet
License:        GPLv3+
URL:            http://notmuchmail.org/

Source0:        http://notmuchmail.org/releases/notmuch-%{version}.tar.gz

BuildRequires:  xapian-core-devel gmime-devel libtalloc-devel
BuildRequires:  zlib-devel emacs-el emacs-nox python ruby ruby-devel perl

%description
Fast system for indexing, searching, and tagging email.  Even if you
receive 12000 messages per month or have on the order of millions of
messages that you've been saving for decades, Notmuch will be able to
quickly search all of it.

Notmuch is not much of an email program. It doesn't receive messages
(no POP or IMAP support). It doesn't send messages (no mail composer,
no network code at all). And for what it does do (email search) that
work is provided by an external library, Xapian. So if Notmuch
provides no user interface and Xapian does all the heavy lifting, then
what's left here? Not much.

%package devel
Summary:        Development libraries and header files for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%package -n emacs-notmuch
Summary:        Not much support for Emacs
Group:          Applications/Editors
BuildArch:      noarch
Requires:       %{name} = %{version}-%{release}, emacs(bin) >= %{_emacs_version}

%description -n emacs-notmuch
%{summary}.

%package -n python-notmuch
Summary:        Python bindings for notmuch
Group:          Development/Libraries
BuildArch:      noarch
Requires:       %{name} = %{version}-%{release}

%description -n python-notmuch
%{summary}.

%package -n notmuch-ruby
Summary:        Ruby bindings for notmuch
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description -n notmuch-ruby
%{summary}.

%package mutt
Summary:        Notmuch (of a) helper for Mutt
Group:          Development/Libraries
BuildArch:      noarch
Requires:       %{name} = %{version}-%{release}
Requires:       perl(Term::ReadLine::Gnu)

%description mutt
notmuch-mutt provide integration among the Mutt mail user agent and
the Notmuch mail indexer.

%prep
%setup -q

%build
./configure --prefix=%{_prefix} --libdir=%{_libdir} --sysconfdir=%{_sysconfdir} \
    --mandir=%{_mandir} --includedir=%{_includedir} --emacslispdir=%{_emacs_sitelispdir}
make %{?_smp_mflags} CFLAGS="%{optflags}"

pushd bindings/python
    python setup.py build
popd

pushd bindings/ruby
    export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
    ruby extconf.rb --vendor
    make
popd

pushd contrib/notmuch-mutt
    make
popd

%install
make install DESTDIR=%{buildroot}

pushd bindings/python
    python setup.py install -O1 --skip-build --root %{buildroot}
popd

pushd bindings/ruby
    make install DESTDIR=%{buildroot}
popd

install contrib/notmuch-mutt/notmuch-mutt %{buildroot}%{_bindir}/notmuch-mutt
install contrib/notmuch-mutt/notmuch-mutt.1 %{buildroot}%{_mandir}/man1/notmuch-mutt.1

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%doc AUTHORS COPYING COPYING-GPL-3 INSTALL README
%{_sysconfdir}/bash_completion.d/notmuch
%{_datadir}/zsh/functions/Completion/Unix/_notmuch
%{_bindir}/notmuch
%{_mandir}/man?/*
%{_libdir}/libnotmuch.so.3*

%files devel
%{_libdir}/libnotmuch.so
%{_includedir}/*

%files -n emacs-notmuch
%{_emacs_sitelispdir}/*

%files -n python-notmuch
%doc bindings/python/README
%{python_sitelib}/*

%files -n notmuch-ruby
%{ruby_vendorarchdir}/*

%files mutt
%{_bindir}/notmuch-mutt
%{_mandir}/man1/notmuch-mutt.1*

%changelog
* Sun Apr 28 2013 Felipe Contreras <felipe.contreras@gmail.com> - 0.15.2-3
- Add ruby bingings

* Sun Apr 28 2013 Felipe Contreras <felipe.contreras@gmail.com> - 0.15.2-2
- Sync with Fedora

* Sun Apr 28 2013 Felipe Contreras <felipe.contreras@gmail.com> - 0.15.2-1
- Update to latest upstream

* Tue Nov  2 2010 Scott Henson <shenson@redhat.com> - 0.4-1
- New upstream release

* Wed Nov 18 2009 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.0-0.3.306635c2
- First version