]> git.notmuchmail.org Git - notmuch/blobdiff - packaging/fedora/notmuch.spec
packaging: fedora: add ruby bindings
[notmuch] / packaging / fedora / notmuch.spec
index 6d32bddd9f43ec74419c99c3d5a46e91078f27e7..79994c9ae6234a19ef29af4247c303e8e8f2e0f3 100644 (file)
@@ -16,7 +16,7 @@
 
 Name:           notmuch
 Version:        0.15.2
-Release:        1%{?dist}
+Release:        3%{?dist}
 Summary:        Thread-based email index, search and tagging
 
 Group:          Applications/Internet
@@ -26,9 +26,7 @@ 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
-
-Requires:       emacs(bin) >= %{_emacs_version}
+BuildRequires:  zlib-devel emacs-el emacs-nox python ruby ruby-devel perl
 
 %description
 Fast system for indexing, searching, and tagging email.  Even if you
@@ -52,6 +50,43 @@ Requires:       %{name} = %{version}-%{release}
 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
 
@@ -60,34 +95,71 @@ developing applications that use %{name}.
     --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
-%defattr(-,root,root,-)
 %doc AUTHORS COPYING COPYING-GPL-3 INSTALL README
-
+%{_sysconfdir}/bash_completion.d/notmuch
+%{_datadir}/zsh/functions/Completion/Unix/_notmuch
 %{_bindir}/notmuch
-%{_libdir}/libnotmuch.so.3*
 %{_mandir}/man?/*
+%{_libdir}/libnotmuch.so.3*
 
+%files devel
+%{_libdir}/libnotmuch.so
+%{_includedir}/*
+
+%files -n emacs-notmuch
 %{_emacs_sitelispdir}/*
 
-%{_datarootdir}/zsh/functions/Completion/Unix/_notmuch
-%{_sysconfdir}/bash_completion.d/notmuch
+%files -n python-notmuch
+%doc bindings/python/README
+%{python_sitelib}/*
 
-%files devel
-%defattr(-,root,root,-)
-%doc AUTHORS COPYING COPYING-GPL-3 INSTALL README
-%{_includedir}/*
-%{_libdir}/*.so
+%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