Commit bebec8f2 authored by Jakub Jirutka's avatar Jakub Jirutka

testing/postgresql-tsearch-czech: new aport

parent 7ac7b4f9
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=postgresql-tsearch-czech
_projname=ispell_czech
pkgver=0_git20120119
_gitrev=0d7722677b1a5e485eb0813c96c4ab13ac5ec7b0
pkgrel=0
pkgdesc="Czech ispell dictionary (UTF-8) for fulltext search in PostgreSQL"
url="https://github.com/tvondra/ispell_czech"
arch="noarch"
license="GPL-3.0"
makedepends="perl"
install="$pkgname.post-install"
# czech.stop is extracted from http://www.pgsql.cz/data/czech.tar.gz.
source="https://github.com/tvondra/ispell_czech/archive/$_gitrev/$pkgname-$_gitrev.tar.gz
czech.stop
tsearch_czech_create.sql
"
builddir="$srcdir/$_projname-$_gitrev"
options="!check" # N/A
build() {
make czech.dict
}
package() {
local pgshare="$pkgdir/usr/share/postgresql"
install -d "$pgshare"/tsearch_data
install -m 644 -t "$pgshare"/tsearch_data/ czech.dict czech.affix "$srcdir"/czech.stop
install -m 644 -t "$pgshare"/ "$srcdir"/tsearch_czech_create.sql
}
sha512sums="1adaad501b36408b8b05ad96a5c8c9e8e5cf1c6524a9ffb6c1fe0405c5d1dcce9ee3f332e83ea11e3a88e55d6978338400797f053cd8318702b3d0e46de02552 postgresql-tsearch-czech-0d7722677b1a5e485eb0813c96c4ab13ac5ec7b0.tar.gz
b546898e326a426c4fde79ab04a93d9510a3d9a7c0330f8ce264ae8002e005cb8e9bfc9a978070fe5e291af9d82efd59826cbb31cd0bbafd554e035993aa130b czech.stop
ac9de0b04ce73c547ac450c9d8e14275643c62c04669e7132bdca5e47f040c2d18fb9600b256536b5a972eb0016ce15acd72233fdba3aa4c752188e21ca4905d tsearch_czech_create.sql"
a
ale
ano
atd
by
být
co
čí
čím
do
i
jak
je
jeho
jemu
její
jejich
ji
jim
již
jsem
jsi
jsou
k
kde
kdo
kdy
který
mém
mne
mně
můj
my
na
nad
nám
náš
ne
o
on
ona
oni
ono
pak
po
pod
pro
proto
proč
před
s
se
sem
si
svůj
ta
tady
tak
také
tam
tato
teď
ten
ti
tím
to
tobě
tomu
tvůj
ty
tyto
u
v
ve
vám
váš
viz
vy
z
za
ze
že
#!/bin/sh
cat >&2 <<EOF
*
* Run as postgres user to create configuration for the Czech dictionary:
* psql < /usr/share/postgresql/tsearch_czech_create.sql
*
EOF
exit 0
-- Configure Czech ispell dictionary for fulltext search.
--
-- https://postgres.cz/wiki/Instalace_PostgreSQL#Instalace_Fulltextu
CREATE TEXT SEARCH DICTIONARY cspell (template=ispell, dictfile = czech, afffile=czech, stopwords=czech);
CREATE TEXT SEARCH CONFIGURATION cs (copy=english);
ALTER TEXT SEARCH CONFIGURATION cs ALTER MAPPING FOR word, asciiword WITH cspell, simple;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment