notmuch: add binding for ruby

cross-compiling ruby binding is failed for now.
This commit is contained in:
Doan Tran Cong Danh 2019-06-11 21:28:20 +07:00 committed by Juan RP
parent dfd8cc3887
commit 57c108f2fb
2 changed files with 19 additions and 2 deletions

1
srcpkgs/notmuch-ruby Symbolic link
View file

@ -0,0 +1 @@
notmuch

View file

@ -26,6 +26,11 @@ case "$XBPS_TARGET_MACHINE" in
*) _args="--without-emacs";;
esac
if [ ! "$CROSS_BUILD" ]; then
makedepends+=" ruby-devel"
subpackages+=" notmuch-ruby"
fi
do_configure() {
./configure --prefix=/usr \
--bashcompletiondir=/usr/share/bash-completion/completions \
@ -35,7 +40,6 @@ do_configure() {
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
@ -43,11 +47,15 @@ do_build() {
do_install() {
make DESTDIR=${DESTDIR} install
cd bindings/python
pushd 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}
popd
if [ ! "$CROSS_BUILD" ]; then
make DESTDIR=${DESTDIR} -C bindings/ruby install
fi
}
libnotmuch_package() {
@ -109,3 +117,11 @@ notmuch-python3_package() {
vmove ${py3_sitelib}
}
}
notmuch-ruby_package() {
depends="libnotmuch>=${version}_${revision} ruby"
short_desc+=" - Ruby bindings"
pkg_install() {
vmove usr/lib/ruby
}
}