void-packages/srcpkgs/notmuch/template

105 lines
2.7 KiB
Bash

# Template file for 'notmuch'
pkgname=notmuch
version=0.28
revision=1
hostmakedepends="perl pkg-config python-Sphinx python-devel python3-Sphinx python3-devel"
makedepends="bash-completion gmime-devel talloc-devel xapian-core-devel"
short_desc="Thread-based email index, search, and tagging"
maintainer="Jan S. <jan.schreib@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://notmuchmail.org"
distfiles="${DEBIAN_SITE}/main/n/notmuch/notmuch_${version}.orig.tar.xz"
checksum=3b08a925f9fac87120a3aae9a0efbbc581894cd021cd8d6201056a74b59f7e11
subpackages="libnotmuch libnotmuch-devel notmuch-mutt notmuch-python notmuch-python3"
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*)
makedepends+=" emacs"
subpackages+=" notmuch-emacs"
_args="--emacslispdir=/usr/share/emacs/site-lisp/notmuch
--emacsetcdir=/usr/share/emacs/site-lisp/notmuch"
;;
*) _args="--without-emacs";;
esac
do_configure() {
# fool the endianess test
sed -i 's|\(util_byte_order\)=.*|\1=1234|' configure
./configure --prefix=/usr \
--bashcompletiondir=/usr/share/bash-completion/completions \
--zshcompletiondir=/usr/share/zsh/site-functions ${_args}
}
do_build() {
make ${makejobs} V=1
make -C contrib/notmuch-mutt
make -C bindings
cd bindings/python
python2 setup.py build --build-base=build-2
python3 setup.py build --build-base=build-3
}
do_install() {
make DESTDIR=${DESTDIR} install
cd bindings/python
python2 setup.py build --build-base=build-2 \
install --prefix=/usr --root=${DESTDIR}
python3 setup.py build --build-base=build-3 \
install --prefix=/usr --root=${DESTDIR}
}
libnotmuch_package() {
short_desc+=" - runtime library"
pkg_install() {
vmove usr/lib/*.so.*
}
}
libnotmuch-devel_package() {
short_desc+=" - development files"
depends="libnotmuch-${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/lib/*.so
}
}
notmuch-emacs_package() {
noarch=yes
short_desc+=" - Emacs interface"
depends="${sourcepkg}-${version}_${revision} virtual?emacs"
pkg_install() {
vmove usr/share/emacs/site-lisp
}
}
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() {
vbin contrib/notmuch-mutt/notmuch-mutt
vman contrib/notmuch-mutt/notmuch-mutt.1
}
}
notmuch-python_package() {
depends="libnotmuch-devel>=${version}_${revision}"
short_desc+=" - Python2 bindings"
pycompile_module="notmuch"
pkg_install() {
vmove ${py2_sitelib}
}
}
notmuch-python3_package() {
depends="libnotmuch-devel>=${version}_${revision}"
short_desc+=" - Python3 bindings"
pycompile_module="notmuch"
pkg_install() {
vmove ${py3_sitelib}
}
}