# The naming scheme in non-Mandriva-based distros %if 0%{!?mklibname:1} %define mklibname(ds) lib%{1}%{?2:%{2}}%{-s:-static}%{-d:-devel} %endif %if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif %global sover 5 %define libname %mklibname %{name} %{sover} %define devname %mklibname %{name} -d %bcond_without ruby %if 0%{?fedora} > 41 || 0%{?epel} >= 11 || 0%{?suse_version} %bcond_without sfsexp %endif %if 0%{?_emacs_sitelispdir:1} && 0%{?_emacs_version:1} %bcond_without emacs %else %bcond_with emacs %endif %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.39 Release: %mkrel 1 Summary: Thread-based email index, search and tagging Group: Applications/Internet License: GPLv3+ URL: https://notmuchmail.org/ Source0: https://notmuchmail.org/releases/notmuch-%{version}.tar.xz BuildRequires: pkgconfig(bash-completion) >= 1.90 BuildRequires: pkgconfig(gmime-3.0) >= 3.0.3 BuildRequires: pkgconfig(glib-2.0) >= 2.22 BuildRequires: pkgconfig(gobject-2.0) BuildRequires: pkgconfig(python3) >= 3.5 BuildRequires: pkgconfig(talloc) BuildRequires: pkgconfig(xapian-core) >= 1.4.0 BuildRequires: pkgconfig(zlib) >= 1.2.5.2 BuildRequires: python3dist(cffi) BuildRequires: python3dist(pytest) >= 3.0 BuildRequires: python3dist(setuptools) BuildRequires: python3dist(sphinx) BuildRequires: chrpath BuildRequires: desktop-file-utils BuildRequires: doxygen BuildRequires: emacs >= 25 BuildRequires: perl BuildRequires: pkg-config BuildRequires: (texinfo or %{_bindir}/makeinfo) %if %{with ruby} buildRequires: pkgconfig(ruby) BuildRequires: ruby %endif %if %{with sfsexp} BuildRequires: pkgconfig(sfsexp) %endif #BuildRequires: xapian-core-devel gmime-devel libtalloc-devel #BuildRequires: zlib-devel emacs-el emacs-nox python ruby ruby-devel perl BuildRequires: make BuildRequires: gcc-c++ Requires: desktop-file-utils %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 -n %{libname} Summary: Runtime libraries files for %{name} Group: Applications/Internet %description -n %{libname} The %{libname} package contains libraries for running applications that use %{name}. %package -n %{devname} Summary: Development libraries and header files for %{name} Group: Development/Libraries Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel %description -n %{devname} The %{devname} package contains libraries and header files for developing applications that use %{name}. %if %{with emacs} %package -n emacs-notmuch Summary: Not much support for Emacs Group: Applications/Editors BuildArch: noarch Requires: %{name} = %{version}-%{release}, emacs >= %{_emacs_version} %description -n emacs-notmuch %{summary}. %endif %package -n python-notmuch Summary: Python bindings for notmuch Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description -n python-notmuch %{summary}. %if %{with ruby} %package -n notmuch-ruby Summary: Ruby bindings for notmuch Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description -n notmuch-ruby %{summary}. %endif %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 %autosetup -p1 %build %configure \ %if %{with emacs} --with-emacs --emacslispdir=%{_emacs_sitelispdir} \ %else --without-emacs \ %endif %if ! %{with ruby} --without-ruby \ %endif %nil %make_build pushd bindings/python-cffi %__python setup.py build popd %if %{with ruby} pushd bindings/ruby export CONFIGURE_ARGS="--with-cflags='%{optflags}'" export NOTMUCH_SRCDIR="%{_builddir}"/%{name}-%{version} ls $NOTMUCH_SRCDIR ruby extconf.rb --vendor || true %{__make} popd %endif pushd contrib/notmuch-mutt %{__make} popd %install %make_install pushd bindings/python-cffi %__python setup.py install -O1 --skip-build --root %{buildroot} popd %if %{with ruby} pushd bindings/ruby %make_install popd %endif install contrib/notmuch-mutt/notmuch-mutt %{buildroot}%{_bindir}/notmuch-mutt install contrib/notmuch-mutt/notmuch-mutt.1 %{buildroot}%{_mandir}/man1/notmuch-mutt.1 chrpath -d %{buildroot}%{_bindir}/%{name} chrpath -d %{buildroot}%{_libdir}/lib%{name}.so.%{sover}* rm -f %{buildroot}%{_datadir}/applications/mimeinfo.cache %post /sbin/ldconfig /bin/update-desktop-database %postun -p /sbin/ldconfig %files %doc AUTHORS COPYING COPYING-GPL-3 INSTALL README %{_datadir}/bash-completion/completions/notmuch %{_datadir}/zsh/site-functions/_notmuch %{_datadir}/zsh/site-functions/_email-notmuch %{_bindir}/notmuch %{_infodir}/ %{_mandir}/man?/* %files -n %{libname} %{_libdir}/libnotmuch.so.%{sover}* %files -n %{devname} %{_libdir}/libnotmuch.so %{_includedir}/* %if %{with emacs} %files -n emacs-notmuch %{_bindir}/%{name}-emacs-mua %{_emacs_sitelispdir}/* %{_datadir}/applications/%{name}-emacs-mua.desktop %endif %files -n python-notmuch %{_libdir}/python%{python3_version}/site-packages/* %if %{with ruby} %files -n notmuch-ruby %{ruby_vendorarchdir}/* %endif %files mutt %{_bindir}/notmuch-mutt %{_mandir}/man1/notmuch-mutt.1* %changelog * Sun Apr 28 2013 Felipe Contreras - 0.15.2-3 - Add ruby bingings * Sun Apr 28 2013 Felipe Contreras - 0.15.2-2 - Sync with Fedora * Sun Apr 28 2013 Felipe Contreras - 0.15.2-1 - Update to latest upstream * Tue Nov 2 2010 Scott Henson - 0.4-1 - New upstream release * Wed Nov 18 2009 Jeffrey C. Ollie - 0.0-0.3.306635c2 - First version