build-tsearch-extras: Add support for Debian/Ubuntu.

This commit is contained in:
Tim Abbott
2019-03-05 15:34:02 -08:00
parent 32d26c8aad
commit 5c20ee998c
2 changed files with 15 additions and 9 deletions

View File

@@ -2,14 +2,13 @@
set -x
set -e
# Has only been tested on Red Hat systems; gmake is wrong for others.
cd "$(mktemp -d)"
distro=$(lsb_release -is)
git clone https://github.com/zulip/tsearch_extras
(cd tsearch_extras && gmake && make install)
PGVER=10
# Link installed hunspell-en-US to tsearch data
ln -sf /usr/share/myspell/en_US.dic "/usr/pgsql-$PGVER/share/tsearch_data/en_us.dict"
ln -sf /usr/share/myspell/en_US.aff "/usr/pgsql-$PGVER/share/tsearch_data/en_us.affix"
if [ "$distro" = "Ubuntu" ] || [ "$distro" == "Debian" ]; then
make="make"
else
make="gmake"
fi
(cd tsearch_extras && "$make" && "$make" install)