mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
build-tsearch-extras: Add support for Debian/Ubuntu.
This commit is contained in:
@@ -2,14 +2,13 @@
|
|||||||
set -x
|
set -x
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Has only been tested on Red Hat systems; gmake is wrong for others.
|
|
||||||
|
|
||||||
cd "$(mktemp -d)"
|
cd "$(mktemp -d)"
|
||||||
|
distro=$(lsb_release -is)
|
||||||
|
|
||||||
git clone https://github.com/zulip/tsearch_extras
|
git clone https://github.com/zulip/tsearch_extras
|
||||||
(cd tsearch_extras && gmake && make install)
|
if [ "$distro" = "Ubuntu" ] || [ "$distro" == "Debian" ]; then
|
||||||
|
make="make"
|
||||||
PGVER=10
|
else
|
||||||
# Link installed hunspell-en-US to tsearch data
|
make="gmake"
|
||||||
ln -sf /usr/share/myspell/en_US.dic "/usr/pgsql-$PGVER/share/tsearch_data/en_us.dict"
|
fi
|
||||||
ln -sf /usr/share/myspell/en_US.aff "/usr/pgsql-$PGVER/share/tsearch_data/en_us.affix"
|
(cd tsearch_extras && "$make" && "$make" install)
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__f
|
|||||||
|
|
||||||
sys.path.append(ZULIP_PATH)
|
sys.path.append(ZULIP_PATH)
|
||||||
from scripts.lib.zulip_tools import run, run_as_root, OKBLUE, ENDC, WARNING, \
|
from scripts.lib.zulip_tools import run, run_as_root, OKBLUE, ENDC, WARNING, \
|
||||||
get_dev_uuid_var_path, FAIL, parse_lsb_release, file_or_package_hash_updated
|
get_dev_uuid_var_path, FAIL, parse_lsb_release, file_or_package_hash_updated, \
|
||||||
|
overwrite_symlink
|
||||||
from scripts.lib.setup_venv import (
|
from scripts.lib.setup_venv import (
|
||||||
VENV_DEPENDENCIES, REDHAT_VENV_DEPENDENCIES,
|
VENV_DEPENDENCIES, REDHAT_VENV_DEPENDENCIES,
|
||||||
THUMBOR_VENV_DEPENDENCIES, YUM_THUMBOR_VENV_DEPENDENCIES,
|
THUMBOR_VENV_DEPENDENCIES, YUM_THUMBOR_VENV_DEPENDENCIES,
|
||||||
@@ -338,6 +339,12 @@ def install_yum_deps(deps_to_install, retry=False):
|
|||||||
run_as_root(["cp", "-a", "puppet/zulip/files/postgresql/centos_pg_hba.conf", pg_hba_conf])
|
run_as_root(["cp", "-a", "puppet/zulip/files/postgresql/centos_pg_hba.conf", pg_hba_conf])
|
||||||
# Later steps will ensure postgres is started
|
# Later steps will ensure postgres is started
|
||||||
|
|
||||||
|
# Link in tsearch data files
|
||||||
|
overwrite_symlink("/usr/share/myspell/en_US.dic", "/usr/pgsql-%s/share/tsearch_data/en_us.dict"
|
||||||
|
% (POSTGRES_VERSION,))
|
||||||
|
overwrite_symlink("/usr/share/myspell/en_US.aff", "/usr/pgsql-%s/share/tsearch_data/en_us.affix"
|
||||||
|
% (POSTGRES_VERSION,))
|
||||||
|
|
||||||
def main(options):
|
def main(options):
|
||||||
# type: (Any) -> int
|
# type: (Any) -> int
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user