]> git.pld-linux.org Git - packages/dict-dalf.git/blob - dict-dalf.spec
- massive attack: adding Source-md5
[packages/dict-dalf.git] / dict-dalf.spec
1 %define         dictname dalf
2 Summary:        Russian monolingual dictionary dalf for dictd
3 Summary(pl):    S³ownik rosyjsko-rosyjski dalf dla dictd
4 Name:           dict-%{dictname}
5 Version:        1.0
6 Release:        1
7 License:        unknown
8 Group:          Applications/Dictionaries
9 Source0:        http://www.chat.ru/~muller_dic/dalf.gz
10 # Source0-md5:  395ca06b4e38399e1a91bf89d51ae289
11 Patch0:         %{dictname}.patch
12 URL:            http://www.chat.ru/~muller_dic/
13 BuildRequires:  dictfmt
14 BuildRequires:  dictzip
15 Requires:       dictd
16 Requires:       %{_sysconfdir}/dictd
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %description
20 Russian monolingual dictionary for dictd encoded in koi8-r. Start
21 server with --locale ru_RU.KOI8-R option in order to use it.
22
23 %description -l pl
24 S³ownik rosyjsko-rosyjski dla dictd kodowany w koi8-r. Uruchom serwer
25 z opcj± --locale ru_RU.KOI8-R, ¿eby móc go u¿ywaæ.
26
27 %description -l ru
28 óÌÏ×ÁÒØ äÁÌÑ, ÐÅÒÅÒÁÂÏÔÁÎÎÙÊ ÉÚ CD ÉÓÔÏÞÎÉËÁ "âÉÂÌÉÏÔÅËÁ × ëÁÒÍÁÎÅ".
29
30 %prep
31 %setup -c -T
32 %{__gzip} -dc %{SOURCE0} > dalf
33 %patch0 -p0
34
35 %build
36 LC_ALL=ru_RU.KOI8-R perl -ne 'use locale; /^(.*?)[\.,;\?]*  (.*)\n/; $def=$2; $word=$1; $word=~s/[\?,]+ /|/g; print ":".lc($word).":\n$def\n"' < dalf | \
37         dictfmt -j -u http://www.chat.ru/~muller_dic/ -s %{dictname} --locale ru_RU.KOI8-R --headword-separator \| %{dictname}
38 dictzip %{dictname}.dict
39
40 %install
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd}
43
44 dictprefix=%{_datadir}/dictd/%{dictname}
45 echo "# dalf russian monolingual dictionary
46 database %{dictname} {
47         data  \"$dictprefix.dict.dz\"
48         index \"$dictprefix.index\"
49 }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}.dictconf
50 mv %{dictname}.* $RPM_BUILD_ROOT%{_datadir}/dictd
51
52 %clean
53 rm -rf $RPM_BUILD_ROOT
54
55 %post
56 if [ -f /var/lock/subsys/dictd ]; then
57         /etc/rc.d/init.d/dictd restart 1>&2
58 fi
59
60 %postun
61 if [ -f /var/lock/subsys/dictd ]; then
62         /etc/rc.d/init.d/dictd restart 1>&2 || true
63 fi
64
65 %files
66 %defattr(644,root,root,755)
67 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}.dictconf
68 %{_datadir}/dictd/%{dictname}.*
This page took 0.082967 seconds and 3 git commands to generate.