]> git.pld-linux.org Git - packages/dict-dalf.git/blame - dict-dalf.spec
- release 4
[packages/dict-dalf.git] / dict-dalf.spec
CommitLineData
0be7a20a
TP
1%define dictname dalf
2Summary: Russian monolingual dictionary dalf for dictd
fbce6b72 3Summary(pl.UTF-8): Słownik rosyjsko-rosyjski dalf dla dictd
0be7a20a
TP
4Name: dict-%{dictname}
5Version: 1.0
2b470b9a 6Release: 4
0be7a20a
TP
7License: unknown
8Group: Applications/Dictionaries
9Source0: http://www.chat.ru/~muller_dic/dalf.gz
9939714c 10# Source0-md5: 395ca06b4e38399e1a91bf89d51ae289
0be7a20a
TP
11Patch0: %{dictname}.patch
12URL: http://www.chat.ru/~muller_dic/
13BuildRequires: dictfmt
14BuildRequires: dictzip
29869526 15BuildRequires: rpmbuild(macros) >= 1.268
0be7a20a 16Requires: %{_sysconfdir}/dictd
18f92dcb 17Requires: dictd
0be7a20a
TP
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20%description
a8f718ff
TP
21Russian monolingual dictionary for dictd encoded in koi8-r. Start
22server with --locale ru_RU.KOI8-R option in order to use it.
0be7a20a 23
dfdcbc70
JR
24%description -l pl.UTF-8
25Słownik rosyjsko-rosyjski dla dictd kodowany w koi8-r. Uruchom serwer
26z opcją --locale ru_RU.KOI8-R, żeby móc go używać.
0be7a20a 27
dfdcbc70
JR
28%description -l ru.UTF-8
29Словарь Даля, переработанный из CD источника "Библиотека в Кармане".
0be7a20a
TP
30
31%prep
3f166420 32%setup -q -c -T
0be7a20a
TP
33%{__gzip} -dc %{SOURCE0} > dalf
34%patch0 -p0
35
36%build
37LC_ALL=ru_RU.KOI8-R perl -ne 'use locale; /^(.*?)[\.,;\?]* (.*)\n/; $def=$2; $word=$1; $word=~s/[\?,]+ /|/g; print ":".lc($word).":\n$def\n"' < dalf | \
a8f718ff 38 dictfmt -j -u http://www.chat.ru/~muller_dic/ -s %{dictname} --locale ru_RU.KOI8-R --headword-separator \| %{dictname}
0be7a20a
TP
39dictzip %{dictname}.dict
40
41%install
42rm -rf $RPM_BUILD_ROOT
43install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd}
44
45dictprefix=%{_datadir}/dictd/%{dictname}
46echo "# dalf russian monolingual dictionary
47database %{dictname} {
48 data \"$dictprefix.dict.dz\"
49 index \"$dictprefix.index\"
50}" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}.dictconf
51mv %{dictname}.* $RPM_BUILD_ROOT%{_datadir}/dictd
52
53%clean
54rm -rf $RPM_BUILD_ROOT
55
56%post
29869526 57%service -q dictd restart
0be7a20a
TP
58
59%postun
29869526
ER
60if [ "$1" = 0 ]; then
61 %service -q dictd restart
0be7a20a
TP
62fi
63
64%files
65%defattr(644,root,root,755)
18f92dcb 66%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}.dictconf
0be7a20a 67%{_datadir}/dictd/%{dictname}.*
This page took 0.080674 seconds and 4 git commands to generate.