From 82fa213b2f0e78bbebd045dc634cbd9bcb165a24 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Tue, 9 Sep 2014 22:22:09 +0200 Subject: [PATCH] notmuch: add notmuch-{deliver,emacs,mutt,python,python3.4,ruby,vim} subpkgs --- srcpkgs/notmuch-deliver | 1 + srcpkgs/notmuch-emacs | 1 + srcpkgs/notmuch-mutt | 1 + srcpkgs/notmuch-python | 1 + srcpkgs/notmuch-python3.4 | 1 + srcpkgs/notmuch-ruby | 1 + srcpkgs/notmuch-vim | 1 + srcpkgs/notmuch/template | 136 +++++++++++++++++++++++++++++++++++--- 8 files changed, 135 insertions(+), 8 deletions(-) create mode 120000 srcpkgs/notmuch-deliver create mode 120000 srcpkgs/notmuch-emacs create mode 120000 srcpkgs/notmuch-mutt create mode 120000 srcpkgs/notmuch-python create mode 120000 srcpkgs/notmuch-python3.4 create mode 120000 srcpkgs/notmuch-ruby create mode 120000 srcpkgs/notmuch-vim diff --git a/srcpkgs/notmuch-deliver b/srcpkgs/notmuch-deliver new file mode 120000 index 00000000000..67778b7eb37 --- /dev/null +++ b/srcpkgs/notmuch-deliver @@ -0,0 +1 @@ +notmuch \ No newline at end of file diff --git a/srcpkgs/notmuch-emacs b/srcpkgs/notmuch-emacs new file mode 120000 index 00000000000..67778b7eb37 --- /dev/null +++ b/srcpkgs/notmuch-emacs @@ -0,0 +1 @@ +notmuch \ No newline at end of file diff --git a/srcpkgs/notmuch-mutt b/srcpkgs/notmuch-mutt new file mode 120000 index 00000000000..67778b7eb37 --- /dev/null +++ b/srcpkgs/notmuch-mutt @@ -0,0 +1 @@ +notmuch \ No newline at end of file diff --git a/srcpkgs/notmuch-python b/srcpkgs/notmuch-python new file mode 120000 index 00000000000..67778b7eb37 --- /dev/null +++ b/srcpkgs/notmuch-python @@ -0,0 +1 @@ +notmuch \ No newline at end of file diff --git a/srcpkgs/notmuch-python3.4 b/srcpkgs/notmuch-python3.4 new file mode 120000 index 00000000000..67778b7eb37 --- /dev/null +++ b/srcpkgs/notmuch-python3.4 @@ -0,0 +1 @@ +notmuch \ No newline at end of file diff --git a/srcpkgs/notmuch-ruby b/srcpkgs/notmuch-ruby new file mode 120000 index 00000000000..67778b7eb37 --- /dev/null +++ b/srcpkgs/notmuch-ruby @@ -0,0 +1 @@ +notmuch \ No newline at end of file diff --git a/srcpkgs/notmuch-vim b/srcpkgs/notmuch-vim new file mode 120000 index 00000000000..67778b7eb37 --- /dev/null +++ b/srcpkgs/notmuch-vim @@ -0,0 +1 @@ +notmuch \ No newline at end of file diff --git a/srcpkgs/notmuch/template b/srcpkgs/notmuch/template index ef685e10cb1..5c7171a505a 100644 --- a/srcpkgs/notmuch/template +++ b/srcpkgs/notmuch/template @@ -1,12 +1,15 @@ # Template file for 'notmuch' pkgname=notmuch version=0.18.1 -revision=1 -hostmakedepends="pkg-config" -makedepends="xapian-core-devel gmime-devel talloc-devel" +revision=2 +hostmakedepends="automake libtool pkg-config" +makedepends=" + xapian-core-devel gmime-devel talloc-devel perl emacs bash-completion + ruby-devel python-devel python3.4-devel python-docutils" build_style=gnu-configure -configure_args="--bashcompletiondir=/usr/share/bash-completion/completions --without-emacs" -short_desc="notmuch -- the mail indexer" +configure_args="--bashcompletiondir=/usr/share/bash-completion/completions + --without-zsh-completion" # zsh completion is part of zsh itself +short_desc="The mail indexer" maintainer="Jan S. " license="GPL-3" homepage="http://notmuchmail.org" @@ -14,6 +17,63 @@ distfiles="http://notmuchmail.org/releases/${pkgname}-${version}.tar.gz" checksum=f2d53dc1916283123d008a6084de860340a436631e83b1a41b2d9ced0f4db7dd nocross=yes +pre_build() { + cp -a bindings/python{,3.4} +} + +post_build() { + # Build notmuch-mutt + make -C contrib/${pkgname}-mutt + + # Build notmuch-deliver + cd ${wrksrc}/contrib/${pkgname}-deliver + ./autogen.sh + LDFLAGS="-L$(pwd)/../../lib/" CPPFLAGS="-I$(pwd)/../../lib/" \ + ./configure --prefix=/usr --sysconfdir=/etc --includedir=/usr/include + make ${makejobs} + + # Build ruby bindings + cd ${wrksrc}/bindings/ruby + ruby extconf.rb --vendor + make ${makejobs} + + # Build python bindings + cd ${wrksrc}/bindings/python + python setup.py build + cd ${wrksrc}/bindings/python3.4 + python3.4 setup.py build +} + +post_install() { + # Install notmuch-mutt + vbin contrib/${pkgname}-mutt/${pkgname}-mutt + vman contrib/${pkgname}-mutt/${pkgname}-mutt.1 + + # Install notmuch-deliver + make -C contrib/${pkgname}-deliver DESTDIR=${DESTDIR} install + + # Install ruby bindings + make -C bindings/ruby DESTDIR=${DESTDIR} install + + # Install python bindings + cd ${wrksrc}/bindings/python + python setup.py install --root=${DESTDIR} + cd ${wrksrc}/bindings/python3.4 + python3.4 setup.py install --root=${DESTDIR} + + # Install vim interface + vmkdir usr/share/vim/vimfiles + cd ${wrksrc}/contrib/${pkgname}-vim + vcopy "plugin syntax" usr/share/vim/vimfiles +} + +libnotmuch_package() { + short_desc+=" - runtime library" + pkg_install() { + vmove "usr/lib/*.so.*" + } +} + libnotmuch-devel_package() { short_desc+=" - development files" depends="libnotmuch>=${version}_${revision}" @@ -23,9 +83,69 @@ libnotmuch-devel_package() { } } -libnotmuch_package() { - short_desc+=" - runtime library" +notmuch-python_package() { + noarch=yes + short_desc+=" - Python2 bindings" + depends="libnotmuch>=${version}_${revision} python" + pycompile_module="notmuch" pkg_install() { - vmove "usr/lib/*.so.*" + vmove usr/lib/python2.7 + } +} + +notmuch-python3.4_package() { + noarch=yes + short_desc+=" - Python3.4 bindings" + depends="libnotmuch>=${version}_${revision} python3.4" + pycompile_version="3.4" + pycompile_module="notmuch" + pkg_install() { + vmove usr/lib/python3.4 + } +} + +notmuch-ruby_package() { + short_desc+=" - Ruby bindings" + pkg_install() { + vmove usr/lib/ruby + } +} + +notmuch-deliver_package() { + short_desc+=" - Maildir delivery tool" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/bin/notmuch-deliver + vmove usr/share/doc/notmuch-deliver + } +} + +notmuch-emacs_package() { + noarch=yes + short_desc+=" - Emacs interface" + depends="${sourcepkg}>=${version}_${revision} virtual?emacs" + pkg_install() { + vmove usr/share/emacs/site-lisp + } +} + +notmuch-vim_package() { + noarch=yes + short_desc+=" - Vim interface" + depends="${sourcepkg}>=${version}_${revision} notmuch-ruby vim-huge" + pkg_install() { + vmove usr/share/vim/vimfiles + } +} + +notmuch-mutt_package() { + noarch=yes + short_desc+=" - Mutt interface" + depends=" + ${sourcepkg}>=${version}_${revision} perl-Mail-Box perl-MailTools + perl-String-ShellQuote perl-Term-ReadLine-Gnu perl-File-Which" + pkg_install() { + vmove usr/bin/notmuch-mutt + vmove usr/share/man/man1/notmuch-mutt.1 } }