1 %define dictname ksocrat
2 Summary: English<->Russian dictionary for dictd
3 Summary(pl.UTF-8): Słownik angielsko<->rosyjski dla dictd
7 License: for use with KSocrat only
8 Group: Applications/Dictionaries
9 Source0: http://webua.net/zavolzhsky/download/%{dictname}-enru-dic-%{version}.tar.bz2
10 # Source0-md5: 54dc44d886961d79dc677f62f9fc0b02
11 Source1: http://webua.net/zavolzhsky/download/%{dictname}-ruen-dic-%{version}.tar.bz2
12 # Source1-md5: a6b2a0b365b65e2ced72707b8dc1ad5f
13 URL: http://webua.net/zavolzhsky/english/programs.html
14 Patch0: %{dictname}-enru.patch
15 BuildRequires: dictfmt
16 BuildRequires: dictzip
17 Requires: %{_sysconfdir}/dictd
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 English<->Russian dictionary for dictd encoded in koi8-r. Start server
23 with --locale ru_RU.KOI8-R option in order to use it.
25 %description -l pl.UTF-8
26 Słownik angielsko<->rosyjski dla dictd kodowany w koi8-r. Uruchom
27 serwer z opcją --locale ru_RU.KOI8-R, żeby móc go używać.
30 Summary: English-Russian dictionary for dictd
31 Summary(pl.UTF-8): Słownik angielsko-rosyjski dla dictd
32 Group: Applications/Dictionaries
35 English-Russian dictionary for dictd encoded in koi8-r.
37 %description enru -l pl.UTF-8
38 Słownik angielsko-rosyjski dla dictd kodowany w koi8-r.
41 Summary: Russian-English dictionary for dictd
42 Summary(pl.UTF-8): Słownik rosyjsko-angielski dla dictd
43 Group: Applications/Dictionaries
46 Russian-English dictionary for dictd encoded in koi8-r. Start server
47 with --locale ru_RU.KOI8-R option in order to use it.
49 %description ruen -l pl.UTF-8
50 Słownik rosyjsko-angielski dla dictd kodowany w koi8-r. Uruchom serwer
51 z opcją --locale ru_RU.KOI8-R, żeby móc go używać.
58 perl -pe 's/^(.*?)\s*--\s*(.*?)\s*$/:$1: - $2\n/' < usr/share/apps/ksocrat/enru.dic | \
59 dictfmt -j -u http://webua.net/zavolzhsky/english/programs.html -s \
60 "KSocrat English-Russian dictionary (%{version})" %{dictname}-enru
62 perl -pe 's/^(.*?)\s*--\s*(.*?)\s*$/:$1: - $2\n/' < usr/share/apps/ksocrat/ruen.dic | \
63 dictfmt -j -u http://webua.net/zavolzhsky/english/programs.html -s \
64 "KSocrat Russian-English dictionary (%{version})" %{dictname}-ruen --locale ru_RU.KOI8-R
66 dictzip %{dictname}*.dict
69 rm -rf $RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd}
72 dictprefix=%{_datadir}/dictd/%{dictname}-enru
73 echo "# KSocrat English-Russian dictionary
74 database %{dictname}-enru {
75 data \"$dictprefix.dict.dz\"
76 index \"$dictprefix.index\"
77 }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}-enru.dictconf
79 dictprefix=%{_datadir}/dictd/%{dictname}-ruen
80 echo "# KSocrat Russian-English dictionary
81 database %{dictname}-ruen {
82 data \"$dictprefix.dict.dz\"
83 index \"$dictprefix.index\"
84 }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}-ruen.dictconf
85 mv %{dictname}* $RPM_BUILD_ROOT%{_datadir}/dictd
88 rm -rf $RPM_BUILD_ROOT
91 if [ -f /var/lock/subsys/dictd ]; then
92 /etc/rc.d/init.d/dictd restart 1>&2
96 if [ -f /var/lock/subsys/dictd ]; then
97 /etc/rc.d/init.d/dictd restart 1>&2 || true
101 if [ -f /var/lock/subsys/dictd ]; then
102 /etc/rc.d/init.d/dictd restart 1>&2
106 if [ -f /var/lock/subsys/dictd ]; then
107 /etc/rc.d/init.d/dictd restart 1>&2 || true
111 %defattr(644,root,root,755)
112 %doc usr/share/apps/ksocrat/*_ENG.txt
113 %lang(ru) %doc usr/share/apps/ksocrat/*_RUS.txt
114 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-enru.dictconf
115 %{_datadir}/dictd/%{dictname}-enru.*
118 %defattr(644,root,root,755)
119 %doc usr/share/apps/ksocrat/*_ENG.txt
120 %lang(ru) %doc usr/share/apps/ksocrat/*_RUS.txt
121 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-ruen.dictconf
122 %{_datadir}/dictd/%{dictname}-ruen.*