faf1b1e
%if 0%{?fedora}
faf1b1e
%global with_python3 1
faf1b1e
%endif
faf1b1e
f0087bb
%if 0%{?rhel} && 0%{?rhel} <= 6
f0087bb
%{!?__python2: %global __python2 /usr/bin/python2}
f0087bb
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
f0087bb
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
f0087bb
%endif
Luke Macken edb925d
cd274ed
Name:           notmuch
8fbfcd1
Version:        0.21
14d488d
Release:        4%{?dist}
cd274ed
Summary:        System for indexing, searching, and tagging email
cd274ed
Group:          Applications/Internet
cd274ed
License:        GPLv3+
cd274ed
URL:            http://notmuchmail.org/
cd274ed
Source0:        http://notmuchmail.org/releases/notmuch-%{version}.tar.gz
9f11f23
9f11f23
# These should be removed in Fedora 26
9f11f23
Obsoletes:      notmuch-deliver < 0.19-5
9f11f23
Provides:       notmuch-deliver >= 0.19-5
9f11f23
cd274ed
BuildRequires:  bash-completion
cd274ed
BuildRequires:  emacs
cd274ed
BuildRequires:  emacs-el
cd274ed
BuildRequires:  emacs-nox
cd274ed
BuildRequires:  glib libtool
cd274ed
BuildRequires:  gmime-devel
cd274ed
BuildRequires:  libtalloc-devel
cd274ed
BuildRequires:  perl
cd274ed
BuildRequires:  perl-podlators
cd274ed
BuildRequires:  python2-devel
faf1b1e
BuildRequires:  python-docutils
9f11f23
BuildRequires:  python-sphinx
cd274ed
BuildRequires:  ruby-devel
cd274ed
BuildRequires:  xapian-core-devel
cd274ed
BuildRequires:  zlib-devel
Karel Klic 7a586b7
faf1b1e
%if 0%{?with_python3}
faf1b1e
BuildRequires:  python3-devel
faf1b1e
BuildRequires:  python3-docutils
faf1b1e
BuildRequires:  python3-sphinx
faf1b1e
%endif
faf1b1e
Karel Klic 7a586b7
%description
Karel Klic 7a586b7
Fast system for indexing, searching, and tagging email.  Even if you
Karel Klic 7a586b7
receive 12000 messages per month or have on the order of millions of
Karel Klic 7a586b7
messages that you've been saving for decades, Notmuch will be able to
Karel Klic 7a586b7
quickly search all of it.
Karel Klic 7a586b7
Karel Klic 7a586b7
Notmuch is not much of an email program. It doesn't receive messages
Karel Klic 7a586b7
(no POP or IMAP support). It doesn't send messages (no mail composer,
Karel Klic 7a586b7
no network code at all). And for what it does do (email search) that
Karel Klic 7a586b7
work is provided by an external library, Xapian. So if Notmuch
Karel Klic 7a586b7
provides no user interface and Xapian does all the heavy lifting, then
Karel Klic 7a586b7
what's left here? Not much.
Karel Klic 7a586b7
cd274ed
%package    devel
cd274ed
Summary:    Development libraries and header files for the Notmuch library
cd274ed
Group:      Development/Libraries
cd274ed
Requires:   %{name} = %{version}-%{release}
Karel Klic 7a586b7
Karel Klic 7a586b7
%description devel
Karel Klic 7a586b7
Notmuch-devel contains the development libraries and header files for
Karel Klic 7a586b7
Notmuch email program.  These libraries and header files are
Karel Klic 7a586b7
necessary if you plan to do development using Notmuch.
Karel Klic 7a586b7
Karel Klic 7a586b7
Install notmuch-devel if you are developing C programs which will use the
Karel Klic 7a586b7
Notmuch library.  You'll also need to install the notmuch package.
Karel Klic 7a586b7
Karel Klic 7a586b7
%package -n emacs-notmuch
cd274ed
Summary:    Not much support for Emacs
cd274ed
Group:      Applications/Editors
cd274ed
BuildArch:  noarch
cd274ed
Requires:   %{name} = %{version}-%{release}
cd274ed
Requires:   emacs(bin) >= %{_emacs_version}
Karel Klic 7a586b7
Karel Klic 7a586b7
%description -n emacs-notmuch
Karel Klic 7a586b7
%{summary}.
Karel Klic 7a586b7
faf1b1e
%package -n python2-notmuch
faf1b1e
Summary:    Python2 bindings for notmuch
faf1b1e
%{?python_provide:%python_provide python2-notmuch}
Luke Macken edb925d
faf1b1e
Requires:       python2
faf1b1e
faf1b1e
%description -n python2-notmuch
Luke Macken edb925d
%{summary}.
Luke Macken edb925d
faf1b1e
%if 0%{?with_python3}
faf1b1e
%package -n python3-notmuch
faf1b1e
Summary:    Python3 bindings for notmuch
faf1b1e
%{?python_provide:%python_provide python3-notmuch}
faf1b1e
faf1b1e
Requires:       python3
faf1b1e
faf1b1e
%description -n python3-notmuch
faf1b1e
%{summary}.
faf1b1e
%endif
faf1b1e
Luke Macken 9d5e62c
%package -n ruby-notmuch
cd274ed
Summary:    Ruby bindings for notmuch
cd274ed
Group:      Development/Libraries
cd274ed
Requires:   %{name} = %{version}-%{release}
Luke Macken 9d5e62c
Luke Macken 9d5e62c
%description -n ruby-notmuch
Luke Macken 9d5e62c
%{summary}.
Luke Macken 9d5e62c
cd274ed
%package    mutt
cd274ed
Summary:    Notmuch (of a) helper for Mutt
cd274ed
Group:      Development/Libraries
cd274ed
BuildArch:  noarch
cd274ed
Requires:   %{name} = %{version}-%{release}
cd274ed
Requires:   perl(Term::ReadLine::Gnu)
Karel Klic b465405
Karel Klic b465405
%description mutt
Karel Klic b465405
notmuch-mutt provide integration among the Mutt mail user agent and
Karel Klic b465405
the Notmuch mail indexer.
Karel Klic b465405
36f9bf3
%package    vim
36f9bf3
Summary:    A Vim plugin for notmuch
36f9bf3
Group:      Applications/Editors
36f9bf3
Requires:   %{name} = %{version}-%{release}
36f9bf3
Requires:   rubygem-mail
36f9bf3
Requires:   vim-enhanced
36f9bf3
# Required for updating helptags in scriptlets.
36f9bf3
Requires(post):    vim-enhanced
36f9bf3
Requires(postun):  vim-enhanced
36f9bf3
36f9bf3
%description vim
36f9bf3
notmuch-vim is a Vim plugin that provides a fully usable mail client
36f9bf3
interface, utilizing the notmuch framework.
36f9bf3
Karel Klic 7a586b7
%prep
Karel Klic 7a586b7
%setup -q
Karel Klic 7a586b7
Karel Klic 7a586b7
%build
Karel Klic 7a586b7
# The %%configure macro cannot be used because notmuch doesn't support
Karel Klic 7a586b7
# some arguments the macro adds to the ./configure call.
Karel Klic 7a586b7
./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} \
Karel Klic 7a586b7
   --libdir=%{_libdir} --mandir=%{_mandir} --includedir=%{_includedir} \
Karel Klic 7a586b7
   --emacslispdir=%{_emacs_sitelispdir}
8fbfcd1
make %{?_smp_mflags} CFLAGS="%{optflags} -fPIC"
Karel Klic 7a586b7
Luke Macken edb925d
# Build the python bindings
Luke Macken edb925d
pushd bindings/python
faf1b1e
    %py2_build
faf1b1e
    %if 0%{?with_python3}
faf1b1e
    %py3_build
faf1b1e
    %endif
Luke Macken edb925d
popd
Luke Macken edb925d
Karel Klic b465405
# Build notmuch-mutt
Karel Klic b465405
pushd contrib/notmuch-mutt
Karel Klic b465405
    make
Karel Klic b465405
popd
Karel Klic b465405
Karel Klic 7a586b7
%install
Karel Klic 7a586b7
make install DESTDIR=%{buildroot}
Karel Klic 7a586b7
Karel Klic 7a586b7
# Enable dynamic library stripping.
Karel Klic 7a586b7
find %{buildroot}%{_libdir} -name *.so* -exec chmod 755 {} \;
Karel Klic 7a586b7
Luke Macken edb925d
# Install the python bindings and documentation
Luke Macken edb925d
pushd bindings/python
faf1b1e
    %py2_install
faf1b1e
    %if 0%{?with_python3}
faf1b1e
    %py3_install
faf1b1e
    %endif
Luke Macken edb925d
popd
Luke Macken edb925d
Luke Macken 9d5e62c
# Install the ruby bindings
Luke Macken 9d5e62c
pushd bindings/ruby
Luke Macken 9d5e62c
    make install DESTDIR=%{buildroot}
Luke Macken 9d5e62c
popd
Luke Macken 9d5e62c
Karel Klic b465405
# Install notmuch-mutt
f0087bb
install -m0755 contrib/notmuch-mutt/notmuch-mutt \
f0087bb
    %{buildroot}%{_bindir}/notmuch-mutt
f0087bb
install -m0644 contrib/notmuch-mutt/notmuch-mutt.1 \
f0087bb
    %{buildroot}%{_mandir}/man1/notmuch-mutt.1
Karel Klic b465405
36f9bf3
# Install notmuch-vim
36f9bf3
pushd vim
36f9bf3
    make install DESTDIR=%{buildroot} prefix="%{_datadir}/vim/vimfiles"
36f9bf3
popd
36f9bf3
9f11f23
ls -lR %{buildroot}%{_mandir}
9f11f23
Karel Klic 7a586b7
%post -p /sbin/ldconfig
Karel Klic 7a586b7
Karel Klic 7a586b7
%postun -p /sbin/ldconfig
Karel Klic 7a586b7
36f9bf3
%post vim
36f9bf3
cd %{_datadir}/vim/vimfiles/doc
36f9bf3
vim -u NONE -esX -c "helptags ." -c quit
36f9bf3
36f9bf3
%postun vim
36f9bf3
cd %{_datadir}/vim/vimfiles/doc
36f9bf3
vim -u NONE -esX -c "helptags ." -c quit
36f9bf3
Karel Klic 7a586b7
%files
f0087bb
%doc AUTHORS COPYING COPYING-GPL-3 README
f0087bb
%config(noreplace) %{_sysconfdir}/bash_completion.d/notmuch
Karel Klic 77312fd
%{_datadir}/zsh/functions/Completion/Unix/_notmuch
Karel Klic 7a586b7
%{_bindir}/notmuch
Karel Klic b465405
%{_mandir}/man1/notmuch.1*
e0439e4
%{_mandir}/man1/notmuch-address.1*
Karel Klic b465405
%{_mandir}/man1/notmuch-config.1*
Karel Klic b465405
%{_mandir}/man1/notmuch-count.1*
Karel Klic b465405
%{_mandir}/man1/notmuch-dump.1*
Luke Macken fd6b017
%{_mandir}/man1/notmuch-insert.1*
Karel Klic b465405
%{_mandir}/man1/notmuch-new.1*
Karel Klic b465405
%{_mandir}/man1/notmuch-reply.1*
Karel Klic b465405
%{_mandir}/man1/notmuch-restore.1*
Karel Klic b465405
%{_mandir}/man1/notmuch-search.1*
Karel Klic b465405
%{_mandir}/man1/notmuch-setup.1*
Karel Klic b465405
%{_mandir}/man1/notmuch-show.1*
Karel Klic b465405
%{_mandir}/man1/notmuch-tag.1*
1d6a0c6
%{_mandir}/man1/notmuch-compact.1*
Karel Klic 249d02a
%{_mandir}/man5/notmuch*.5*
Karel Klic 249d02a
%{_mandir}/man7/notmuch*.7*
e0439e4
%{_libdir}/libnotmuch.so.4*
Karel Klic 7a586b7
Karel Klic 7a586b7
%files devel
Karel Klic 7a586b7
%{_libdir}/libnotmuch.so
Karel Klic 7a586b7
%{_includedir}/*
Karel Klic 7a586b7
Karel Klic 7a586b7
%files -n emacs-notmuch
Karel Klic 249d02a
%{_emacs_sitelispdir}/*.el
Karel Klic 7a586b7
%{_emacs_sitelispdir}/*.elc
Karel Klic 7a586b7
%{_emacs_sitelispdir}/notmuch-logo.png
9f11f23
%{_mandir}/man1/notmuch-emacs-mua.1*
Karel Klic 7a586b7
faf1b1e
%files -n python2-notmuch
faf1b1e
%doc bindings/python/README
faf1b1e
%{python2_sitelib}/notmuch*
faf1b1e
faf1b1e
%files -n python3-notmuch
Luke Macken edb925d
%doc bindings/python/README
faf1b1e
%{python3_sitelib}/notmuch*
Luke Macken edb925d
Luke Macken 9d5e62c
%files -n ruby-notmuch
Luke Macken 9d5e62c
%{ruby_vendorarchdir}/*
Luke Macken 9d5e62c
Karel Klic b465405
%files mutt
Karel Klic b465405
%{_bindir}/notmuch-mutt
Karel Klic b465405
%{_mandir}/man1/notmuch-mutt.1*
Karel Klic b465405
36f9bf3
%files vim
36f9bf3
%{_datadir}/vim/vimfiles/doc/notmuch.txt
36f9bf3
%{_datadir}/vim/vimfiles/plugin/notmuch.vim
36f9bf3
%{_datadir}/vim/vimfiles/syntax/notmuch-compose.vim
36f9bf3
%{_datadir}/vim/vimfiles/syntax/notmuch-folders.vim
36f9bf3
%{_datadir}/vim/vimfiles/syntax/notmuch-git-diff.vim
36f9bf3
%{_datadir}/vim/vimfiles/syntax/notmuch-search.vim
36f9bf3
%{_datadir}/vim/vimfiles/syntax/notmuch-show.vim
36f9bf3
Karel Klic 7a586b7
%changelog
faf1b1e
* Mon Apr 04 2016 Ralph Bean <rbean@redhat.com> - 0.21-4
faf1b1e
- Modernized python macros and added a python3 subpackage.
faf1b1e
094c617
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-3
094c617
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
094c617
d6bd631
* Tue Jan 12 2016 Vít Ondruch <vondruch@redhat.com> - 0.21-2
d6bd631
- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.3
d6bd631
8fbfcd1
* Fri Nov 27 2015 Jonathan Underwood <jonathan.underwood@gmail.com> - 0.21-1
8fbfcd1
- Update to 0.21
8fbfcd1
- Remove sha1 files - unused
8fbfcd1
- Ruby bindings are now built by default, so don't build them explicitly (thanks Jan Synáček)
8fbfcd1
- Add -fPIC to compiler flags
8fbfcd1
9f11f23
* Wed Sep 16 2015 Jonathan Underwood <jonathan.underwood@gmail.com> - 0.20.2-1
9f11f23
- Update to 0.20.2
9f11f23
- No longer build notmuch-deliver (no longer shipped upstream)
9f11f23
- Add python-sphinx to BuildRequires so man pages are built
9f11f23
2fe1e2a
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.19-4
2fe1e2a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2fe1e2a
a81b40d
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.19-3
a81b40d
- Rebuilt for GCC 5 C++11 ABI change
a81b40d
6a463c6
* Sat Jan 17 2015 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.19-2
6a463c6
- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_2.2
6a463c6
e0439e4
* Sat Nov 29 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.19-1
e0439e4
- update to upstream release 0.19
36f9bf3
- add notmuch-vim subpackage
760dd92
- fix "self-obsoletion" due to incorrect Provides for emacs-notmuch subpackage
760dd92
  (and we can remove both Obsoletes and Provides anyway as no longer relevant)
f0087bb
- fix "non-conffile-in-etc /etc/bash_completion.d/notmuch"
f0087bb
- fix "install-file-in-docs /usr/share/doc/notmuch/INSTALL"
f0087bb
- fix "spurious-executable-perm /usr/share/man/man1/notmuch-mutt.1.gz"
f0087bb
- {__python} is deprecated
e0439e4
61da191
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.18.1-4
61da191
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
61da191
Luke Macken 9d5e62c
* Wed Aug 13 2014 Luke Macken <lmacken@redhat.com> - 0.18.1-3
Luke Macken 9d5e62c
- Build a ruby-notmuch subpackage (#947571)
Luke Macken 9d5e62c
Luke Macken 0ef42fc
* Wed Aug 13 2014 Luke Macken <lmacken@redhat.com> - 0.18.1-2
Luke Macken 0ef42fc
- Add bash-completion, emacs, and python-docutils to the build requirements
Luke Macken 0ef42fc
Luke Macken 0ef42fc
* Mon Jul 28 2014 Luke Macken <lmacken@redhat.com> - 0.18.1-1
Luke Macken 7880d84
- Update to 0.18.1 (#1094701)
Luke Macken 7880d84
93d1964
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.17-2
93d1964
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
93d1964
1d6a0c6
* Thu Feb 13 2014 Ralph Bean <rbean@redhat.com> - 0.17-1
1d6a0c6
- Latest upstream.
1d6a0c6
e9fcf3e
* Wed Feb 12 2014 Ralph Bean <rbean@redhat.com> - 0.16-2
e9fcf3e
- Added install of notmuch-deliver.
e9fcf3e
Luke Macken fd6b017
* Fri Sep 27 2013 Lars Kellogg-Stedman <lars@redhat.com> - 0.16-1
Luke Macken fd6b017
- Updated to notmuch 0.16.
Luke Macken fd6b017
c9ba112
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13.2-7
c9ba112
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c9ba112
57e85e2
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 0.13.2-6
57e85e2
- Perl 5.18 rebuild
57e85e2
987023b
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13.2-5
987023b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
987023b
Karel Klic a441203
* Mon Sep 17 2012 Karel Klíč <kklic@redhat.com> - 0.13.2-4
Karel Klic a441203
- notmuch-mutt requires perl(Term::Readline::Gnu)
Karel Klic a441203
73e03df
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13.2-3
73e03df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
73e03df
Karel Klic b465405
* Fri Jul 13 2012 Karel Klíč <kklic@redhat.com> - 0.13.2-2
Karel Klic b465405
- Packaged notmuch-mutt from contrib
Karel Klic b465405
Karel Klic 249d02a
* Fri Jul 13 2012 Karel Klíč <kklic@redhat.com> - 0.13.2-1
Karel Klic 249d02a
- Update to the newest release
Karel Klic 249d02a
- Merge emacs-notmuch-el into emacs-el to conform to the packaging
Karel Klic 249d02a
  guidelines
Karel Klic 249d02a
Karel Klic 13e95a1
* Wed Mar  7 2012 Karel Klíč <kklic@redhat.com> - 0.11.1-1
Karel Klic 13e95a1
- Update to newest release, which fixes CVE-2011-1103
Karel Klic 13e95a1
Stanislav Ochotnicky 5005490
* Mon Jan 30 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.11-1
Stanislav Ochotnicky 5005490
- Latest upstream release
Stanislav Ochotnicky 5005490
- Update patch so it applies
Stanislav Ochotnicky 5005490
174532a
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
174532a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
174532a
Luke Macken a72944d
* Thu Oct 20 2011 Luke Macken <lmacken@redhat.com> - 0.9-1
Luke Macken a72944d
- Latest upstream release
Luke Macken a72944d
Luke Macken edb925d
* Tue Aug 09 2011 Luke Macken <lmacken@redhat.com> - 0.6.1-2
Luke Macken edb925d
- Create a subpackage for the Python bindings
Luke Macken edb925d
Karel Klic 77312fd
* Thu Jul 28 2011 Karel Klíč <kklic@redhat.com> - 0.6.1-1
Karel Klic 77312fd
- Latest upstream release
Karel Klic 77312fd
- Added -gmime patch to compile with GMime 2.5.x (upstream uses GMime 2.4.x)
Karel Klic 77312fd
9c9b55b
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-4
9c9b55b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
9c9b55b
Karel Klic e15c65f
* Thu Dec 09 2010 Karel Klic <kklic@redhat.com> - 0.5-3
Karel Klic e15c65f
- Removed local emacs %%globals, as they are not needed
Karel Klic e15c65f
Karel Klic 245ea35
* Thu Nov 25 2010 Karel Klic <kklic@redhat.com> - 0.5-2
Karel Klic 245ea35
- Removed BuildRoot tag
Karel Klic 245ea35
- Removed %%clean section
Karel Klic 245ea35
Karel Klic 7a586b7
* Mon Nov 15 2010 Karel Klic <kklic@redhat.com> - 0.5-1
Karel Klic 7a586b7
- New upstream release
Karel Klic 7a586b7
Karel Klic 7a586b7
* Fri Oct 15 2010 Karel Klic <kklic@redhat.com> - 0.3.1-3
Karel Klic 7a586b7
- Improved the main package description.
Karel Klic 7a586b7
- Various spec file improvements.
Karel Klic 7a586b7
Karel Klic 7a586b7
* Fri Oct  8 2010 Karel Klic <kklic@redhat.com> - 0.3.1-2
Karel Klic 7a586b7
- Added patch that fixes linking on F13+
Karel Klic 7a586b7
Karel Klic 7a586b7
* Thu Oct  7 2010 Karel Klic <kklic@redhat.com> - 0.3.1-1
Karel Klic 7a586b7
- New version
Karel Klic 7a586b7
- Splitted notmuch into several packages
Karel Klic 7a586b7
Karel Klic 7a586b7
* Wed Nov 18 2009 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.0-0.3.306635c2
Karel Klic 7a586b7
- First version