# Do we build in/for the distro or in copr? %bcond distrobuild 0 # We do not conditionalise this block and the one in sources because we do not include rpkg macros in distro spec: ## Pull in upstream source: # cee41bccc054617b0cffe12759b209ff66066563 source (0.40) # %global gitversion cee41bccc054617b0cffe12759b209ff66066563 %global gitshortversion cee41bcc %global gitdescribefedversion 0.40 # We used to set these based on fedora/rhel versions. Keep them in case for now. %bcond tests 1 %bcond sfsexp 1 %bcond mutt 1 %bcond vim 1 Name: notmuch Version: %{gitdescribefedversion} Release: %autorelease Summary: System for indexing, searching, and tagging email License: GPL-3.0-or-later URL: https://notmuchmail.org/ # rpkg's git_pack does not cope well with submodules, so we force it to assume a dirty tree. # The tree is unmodified (before possibly applying patches). Source: notmuch-c7ad71ba.tar.gz Patch: 0001-test-correct-comparison-order-in-T380.patch Patch: 0002-test-do-not-pass-T380.1-for-the-wrong-reasons.patch Patch: 0003-test-reword-T380.2-to-be-clearer.patch Patch: 0004-test-set-up-the-outcount-for-T380.1.patch BuildRequires: make BuildRequires: bash-completion-devel BuildRequires: desktop-file-utils BuildRequires: emacs BuildRequires: emacs-el BuildRequires: emacs-nox Buildrequires: gcc gcc-c++ BuildRequires: libtool BuildRequires: doxygen BuildRequires: texinfo BuildRequires: gnupg2 BuildRequires: gnupg2-smime BuildRequires: gmime30-devel BuildRequires: libtalloc-devel BuildRequires: perl-interpreter BuildRequires: perl-generators BuildRequires: perl-podlators BuildRequires: ruby-devel %if %{with sfsexp} BuildRequires: pkgconfig(sfsexp) %endif BuildRequires: xapian-core-devel BuildRequires: zlib-devel BuildRequires: python3-devel BuildRequires: python3-cffi BuildRequires: python3-docutils BuildRequires: python3-sphinx %if %{with tests} BuildRequires: python3-pytest BuildRequires: python3-pytest-shutil BuildRequires: dtach BuildRequires: gdb %if %{with sfsexp} BuildRequires: git-core %endif %endif BuildRequires: man BuildRequires: openssl # You might also want to rebuild with valgrind-devel libasan libasan-static. Requires(post): /sbin/install-info Requires(postun): /sbin/install-info %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 the Notmuch library Requires: %{name} = %{version}-%{release} %description devel Notmuch-devel contains the development libraries and header files for Notmuch email program. These libraries and header files are necessary if you plan to do development using Notmuch. Install notmuch-devel if you are developing C programs which will use the Notmuch library. You'll also need to install the notmuch package. %if %{with sfsexp} %package git Summary: Manage notmuch tags with git Requires: %{name} = %{version}-%{release} Requires: git-core Recommends: python3-notmuch2 %description git This package contains a simple tool to save, restore, and synchronize notmuch tags via git repositories. %endif %package -n emacs-notmuch Summary: Not much support for Emacs BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: emacs(bin) >= %{_emacs_version} %description -n emacs-notmuch %{summary}. %package -n python3-notmuch2 Summary: Python3 bindings for notmuch (cffi) Requires: %{name} = %{version}-%{release} Requires: python3 %{?python_provide:%python_provide python3-notmuch2} %description -n python3-notmuch2 %{summary}. %package -n ruby-notmuch Summary: Ruby bindings for notmuch Requires: %{name} = %{version}-%{release} %description -n ruby-notmuch %{summary}. %if %{with mutt} %package mutt Summary: Notmuch (of a) helper for Mutt BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires: perl(Digest::SHA) Requires: perl(Mail::Box) Requires: perl(Mail::Header) Requires: perl(Term::ReadLine::Gnu) %description mutt notmuch-mutt provide integration among the Mutt mail user agent and the Notmuch mail indexer. %endif %if %{with vim} %package vim Summary: A Vim plugin for notmuch Requires: ruby-%{name} = %{version}-%{release} Requires: rubygem-mail Requires: vim-enhanced # Required for updating helptags in scriptlets. Requires(post): vim-enhanced Requires(postun): vim-enhanced %description vim notmuch-vim is a Vim plugin that provides a fully usable mail client interface, utilizing the notmuch framework. %endif %prep %if %{with distrobuild} %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %autosetup -p1 %else # unversioned dir for git build, no check %autosetup -n notmuch -p1 %endif # we build the wheel using pyproject macros instead sed -i -e '/setup.py build/ d' bindings/Makefile.local # Generate _notmuch_config.py needed by setup.py: cat >bindings/python-cffi/_notmuch_config.py <