forked from pool/notmuch
274 lines
7.2 KiB
RPMSpec
274 lines
7.2 KiB
RPMSpec
|
#
|
||
|
# spec file for package
|
||
|
#
|
||
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||
|
#
|
||
|
# All modifications and additions to the file contributed by third parties
|
||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||
|
# upon. The license for this file, and modifications and additions to the
|
||
|
# file, is the same license as for the pristine package itself (unless the
|
||
|
# license for the pristine package is not an Open Source License, in which
|
||
|
# case the license is the MIT License). An "Open Source License" is a
|
||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||
|
# published by the Open Source Initiative.
|
||
|
|
||
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||
|
#
|
||
|
|
||
|
%{bcond_without python}
|
||
|
%{bcond_without python3}
|
||
|
%{bcond_without emacs}
|
||
|
|
||
|
%{bcond_with ruby}
|
||
|
%{bcond_with go}
|
||
|
|
||
|
Name: notmuch
|
||
|
Version: 0.15.2
|
||
|
Release: 0
|
||
|
License: GPL-3.0+
|
||
|
Summary: The mail indexer
|
||
|
Url: http://notmuchmail.org
|
||
|
Group: Productivity/Networking/Email/Utilities
|
||
|
Source0: http://notmuchmail.org/releases/%{name}-%{version}.tar.gz
|
||
|
Source1: http://notmuchmail.org/releases/%{name}-%{version}.tar.gz.sha1.asc
|
||
|
Source2: notmuch.keyring
|
||
|
|
||
|
BuildRequires: libxapian-devel
|
||
|
BuildRequires: pkg-config
|
||
|
BuildRequires: pkgconfig(gmime-2.6)
|
||
|
BuildRequires: pkgconfig(talloc)
|
||
|
|
||
|
%if 0%{?suse_version} >= 1230
|
||
|
BuildRequires: gpg-offline
|
||
|
%endif
|
||
|
|
||
|
%if %{with emacs}
|
||
|
BuildRequires: emacs-el
|
||
|
BuildRequires: emacs-nox
|
||
|
%endif
|
||
|
%if %{with python}
|
||
|
BuildRequires: python-devel
|
||
|
BuildRequires: python-Sphinx
|
||
|
%endif
|
||
|
%if %{with python3}
|
||
|
BuildRequires: python3-devel
|
||
|
%endif
|
||
|
%if %{with ruby}
|
||
|
BuildRequires: ruby-devel
|
||
|
%endif
|
||
|
%if %{with go}
|
||
|
BuildRequires: go
|
||
|
%endif
|
||
|
BuildRequires: zsh
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||
|
|
||
|
%description
|
||
|
Because dealing with your mail can be so much better.
|
||
|
|
||
|
"Not much mail" is what Notmuch thinks about your email collection. Even if
|
||
|
you receive 12000 messages per month or have on the order of millions of
|
||
|
messages that you've been saving for decades. Regardless, Notmuch will be
|
||
|
able to quickly search all of it. It's just plain not much mail.
|
||
|
|
||
|
"Not much mail" is also what you should have in your inbox at any time.
|
||
|
Notmuch gives you what you need, (tags and fast search), so that you can
|
||
|
keep your inbox tamed and focus on what really matters in your life, (which
|
||
|
is surely not email).
|
||
|
|
||
|
Notmuch is an answer to Sup. Sup is a very good email program written by
|
||
|
William Morgan (and others) and is the direct inspiration for Notmuch.
|
||
|
Notmuch began as an effort to rewrite performance-critical pieces of Sup in
|
||
|
C rather than ruby. From there, it grew into a separate project. One
|
||
|
significant contribution Notmuch makes compared to Sup is the separation of
|
||
|
the indexer/searcher from the user interface. (Notmuch provides a library
|
||
|
interface so that its indexing/searching/tagging features can be integrated
|
||
|
into any email program.)
|
||
|
|
||
|
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 files for %{name}
|
||
|
Group: Development/Libraries/C and C++
|
||
|
Requires: libnotmuch3 = %{version}-%{release}
|
||
|
|
||
|
%description devel
|
||
|
The %{name}-devel package contains libraries and header files for
|
||
|
developing applications that use %{name}.
|
||
|
|
||
|
%package -n libnotmuch3
|
||
|
Summary: A shared library for %{name}
|
||
|
Group: Productivity/Networking/Email/Utilities
|
||
|
|
||
|
%description -n libnotmuch3
|
||
|
The libnotmuch3 package contains shared libraries for %{name}.
|
||
|
|
||
|
%if %{with python}
|
||
|
%package -n python-%{name}
|
||
|
Summary: Python bindings for %{name}
|
||
|
Group: Development/Libraries/Python
|
||
|
#py_requires is useless as it was not designed for sub-packages
|
||
|
#BR: python-devel is on the top of spec file
|
||
|
Requires: python = %{py_ver}
|
||
|
Recommends: python-%{name}-doc = %{version}
|
||
|
|
||
|
%description -n python-%{name}
|
||
|
Python interface (bindings) for %{name}
|
||
|
|
||
|
%package -n python-%{name}-doc
|
||
|
Summary: Documentation of Python bindings for %{name}
|
||
|
Group: Development/Documentation/HTML
|
||
|
|
||
|
%description -n python-%{name}-doc
|
||
|
Documentation of Python interface (bindings) for %{name}
|
||
|
%endif
|
||
|
|
||
|
%if %{with python3}
|
||
|
%package -n python3-%{name}
|
||
|
Summary: Python3 bindings for %{name}
|
||
|
Group: Development/Libraries/Python
|
||
|
Requires: python = %{py3_ver}
|
||
|
%if %{with python}
|
||
|
#documentation is built only when python2 is installed
|
||
|
#this shall be fixed once python2 disappear from openSUSE
|
||
|
Recommends: python-%{name}-doc = %{version}
|
||
|
%endif
|
||
|
|
||
|
%description -n python3-%{name}
|
||
|
Python3 interface (bindings) for %{name}
|
||
|
%endif
|
||
|
|
||
|
%if %{with emacs}
|
||
|
%package mail
|
||
|
Summary: Emacs lisp email client based on %{name}
|
||
|
Group: Productivity/Networking/Email/Utilities
|
||
|
Provides: %{name}-emacs = %{version}-%{release}
|
||
|
Requires: %{name} = %{version}-%{release}
|
||
|
Requires: emacs
|
||
|
Requires: emacs-el
|
||
|
|
||
|
%description mail
|
||
|
%{name}-based email client written in emacs lisp
|
||
|
%endif
|
||
|
|
||
|
%prep
|
||
|
%if 0%{?suse_version} >= 1230
|
||
|
%gpg_verify %{S:1}
|
||
|
%endif
|
||
|
%setup -q
|
||
|
|
||
|
find contrib -name '.*' -delete
|
||
|
|
||
|
%build
|
||
|
#hand-made configure script
|
||
|
export CFLAGS="%{optflags}"
|
||
|
./configure \
|
||
|
%if %{without emacs}
|
||
|
--without-emacs \
|
||
|
%endif
|
||
|
--prefix=%{_prefix} \
|
||
|
--libdir=%{_libdir} \
|
||
|
--includedir=%{_includedir} \
|
||
|
--mandir=%{_mandir} \
|
||
|
--sysconfdir=%{_sysconfdir}
|
||
|
|
||
|
#XXX: failed to build with smp_flags
|
||
|
#make %{?_smp_mflags}
|
||
|
make
|
||
|
|
||
|
#TODO: bindings - go, ruby
|
||
|
pushd bindings
|
||
|
|
||
|
%if %{with python3}
|
||
|
cp -r python python3
|
||
|
pushd python3
|
||
|
python3 setup.py build
|
||
|
popd
|
||
|
%endif
|
||
|
|
||
|
%if %{with python}
|
||
|
pushd python
|
||
|
python2 setup.py build
|
||
|
pushd docs
|
||
|
make dirhtml
|
||
|
rm -f build/dirhtml/.buildinfo
|
||
|
popd
|
||
|
popd
|
||
|
%endif
|
||
|
|
||
|
popd
|
||
|
|
||
|
%install
|
||
|
%make_install
|
||
|
|
||
|
%if %{with python3}
|
||
|
pushd bindings/python3
|
||
|
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||
|
popd
|
||
|
%endif
|
||
|
|
||
|
%if %{with python}
|
||
|
pushd bindings/python
|
||
|
python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||
|
popd
|
||
|
%endif
|
||
|
|
||
|
%post -n libnotmuch3 -p /sbin/ldconfig
|
||
|
%postun -n libnotmuch3 -p /sbin/ldconfig
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root)
|
||
|
%doc contrib/ AUTHORS COPYING COPYING-GPL-3 NEWS README
|
||
|
%{_bindir}/notmuch
|
||
|
%{_sysconfdir}/bash_completion.d/notmuch
|
||
|
#TODO: add zsh to BR
|
||
|
%dir %{_datadir}/zsh/
|
||
|
%dir %{_datadir}/zsh/functions/
|
||
|
%dir %{_datadir}/zsh/functions/Completion/
|
||
|
%dir %{_datadir}/zsh/functions/Completion/Unix/
|
||
|
%{_datadir}/zsh/functions/Completion/Unix/_%{name}
|
||
|
%{_mandir}/man1/notmuch*.1*
|
||
|
%{_mandir}/man5/notmuch-hooks.5*
|
||
|
%{_mandir}/man7/notmuch-search-terms.7*
|
||
|
|
||
|
%files -n libnotmuch3
|
||
|
%defattr(-,root,root)
|
||
|
%{_libdir}/libnotmuch.so.3*
|
||
|
|
||
|
%files devel
|
||
|
%defattr(-,root,root)
|
||
|
%{_includedir}/notmuch.h
|
||
|
%{_libdir}/libnotmuch.so
|
||
|
|
||
|
%if %{with python}
|
||
|
%files -n python-%{name}
|
||
|
%defattr(-,root,root)
|
||
|
%doc bindings/python/README
|
||
|
%{python_sitelib}/%{name}/
|
||
|
%{python_sitelib}/%{name}*egg-info
|
||
|
|
||
|
%files -n python-%{name}-doc
|
||
|
%defattr(-,root,root)
|
||
|
%doc bindings/python/docs/build/dirhtml/
|
||
|
%endif
|
||
|
|
||
|
%if %{with python3}
|
||
|
%files -n python3-%{name}
|
||
|
%defattr(-,root,root)
|
||
|
%doc bindings/python/README
|
||
|
%{python3_sitelib}/%{name}/
|
||
|
%{python3_sitelib}/%{name}*egg-info
|
||
|
%endif
|
||
|
|
||
|
%if %{with emacs}
|
||
|
%files mail
|
||
|
%defattr(-,root,root)
|
||
|
%{_datadir}/emacs/site-lisp/
|
||
|
%endif
|
||
|
|
||
|
%changelog
|