Skip to content

Commit

Permalink
Add zhparser
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Dec 20, 2024
1 parent 2725953 commit 24e887c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
19 changes: 19 additions & 0 deletions contrib/zhparser/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# Install dependency.
USER root
RUN wget http://www.xunsearch.com/scws/down/scws-1.2.3.tar.bz2 \
&& tar xvf scws-1.2.3.tar.bz2 \
&& cd scws-1.2.3 \
&& ./configure \
&& make install \
&& cd .. \
&& rm -rf scws-1.2.3.tar.bz2 scws-1.2.3 \
&& ln -s /usr/local/lib/libscws.so /usr/lib/x86_64-linux-gnu/libscws.so

# Clone and build the extension.
ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN git clone --depth 1 --branch "V$(perl -E 'print shift =~ s/[.]0$//gr' "${EXTENSION_VERSION}")" https://github.com/amutu/${EXTENSION_NAME}.git \
&& make -C ${EXTENSION_NAME}
17 changes: 17 additions & 0 deletions contrib/zhparser/Trunk.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[extension]
name = "zhparser"
version = "2.2.0"
repository = "https://github.com/amutu/zhparser"
license = "PostgreSQL"
description = "PostgreSQL extension for full-text search of Chinese language."
documentation = "https://github.com/amutu/zhparser"
categories = ["search"]

[dependencies]
apt = ["libc6"]

[build]
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = "make -C zhparser install"

0 comments on commit 24e887c

Please sign in to comment.