]>
Commit | Line | Data |
---|---|---|
6b5c6fb0 TP |
1 | %define dictname mueller24 |
2 | Summary: English-Russian dictionary for dictd | |
ec770120 | 3 | Summary(pl.UTF-8): Słownik angielsko-rosyjski dla dictd |
6b5c6fb0 TP |
4 | Name: dict-%{dictname} |
5 | Version: 1.6 | |
2f658ed1 | 6 | Release: 4 |
6b5c6fb0 TP |
7 | License: unknown |
8 | Group: Applications/Dictionaries | |
9 | Source0: http://mueller-dic.chat.ru/Mueller24.tgz | |
7171b28b | 10 | # Source0-md5: 386d71c149f3f793d3ff064fd4b16c65 |
2f658ed1 JR |
11 | #Source1: http://www.math.sunysb.edu/~comech/tools/to-dict |
12 | Source1: to-dict | |
6b5c6fb0 TP |
13 | URL: http://mueller-dic.chat.ru/ |
14 | BuildRequires: dictfmt | |
15 | BuildRequires: dictzip | |
2f658ed1 | 16 | BuildRequires: iconv |
13950cf5 | 17 | BuildRequires: rpmbuild(macros) >= 1.268 |
6b5c6fb0 | 18 | Requires: %{_sysconfdir}/dictd |
aaf1cc86 | 19 | Requires: dictd |
6b5c6fb0 TP |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
21 | ||
22 | %description | |
23 | Electronic version of 24th edition of English-Russian dictionary by V. | |
24 | K. Mueller. | |
25 | ||
8f36c192 JR |
26 | %description -l pl.UTF-8 |
27 | Elektroniczna wersja 24. wydania słownika angielsko rosyjskiego V. K. | |
6b5c6fb0 TP |
28 | Muellera. |
29 | ||
30 | %prep | |
31 | %setup -q -c | |
6b5c6fb0 TP |
32 | cp %{SOURCE1} . |
33 | chmod +x ./to-dict | |
13950cf5 ER |
34 | |
35 | %build | |
2f658ed1 JR |
36 | iconv -f koi8-r -t utf-8 usr/local/share/dict/Mueller24.koi >usr/local/share/dict/Mueller24.utf8 |
37 | iconv -f koi8-r -t utf-8 usr/local/share/mova/Mueller24_koi.txt >usr/local/share/mova/Mueller24_utf8.txt | |
38 | LC_ALL=ru_RU.utf-8 ./to-dict --src-data usr/local/share/dict/Mueller24.utf8 mueller24.data | |
39 | LC_ALL=ru_RU.utf-8 ./to-dict --data-dict mueller24.data mueller24 && rm -f mueller24.data | |
6b5c6fb0 TP |
40 | |
41 | %install | |
42 | rm -rf $RPM_BUILD_ROOT | |
43 | install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd} | |
44 | ||
45 | dictprefix=%{_datadir}/dictd/%{dictname} | |
5866f472 | 46 | echo "# Mueller English-Russian dictionary, 24-th edition (%{version}) |
6b5c6fb0 TP |
47 | database %{dictname} { |
48 | data \"$dictprefix.dict.dz\" | |
49 | index \"$dictprefix.index\" | |
50 | }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}.dictconf | |
51 | mv %{dictname}.* $RPM_BUILD_ROOT%{_datadir}/dictd | |
52 | ||
53 | %clean | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %post | |
13950cf5 | 57 | %service -q dictd restart |
6b5c6fb0 TP |
58 | |
59 | %postun | |
13950cf5 ER |
60 | if [ "$1" = 0 ]; then |
61 | %service -q dictd restart | |
6b5c6fb0 TP |
62 | fi |
63 | ||
64 | %files | |
65 | %defattr(644,root,root,755) | |
66 | %doc usr/local/share/mova/Mueller24.txt | |
2f658ed1 | 67 | %lang(ru) %doc usr/local/share/mova/Mueller24_utf8.txt |
aaf1cc86 | 68 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}.dictconf |
6b5c6fb0 | 69 | %{_datadir}/dictd/%{dictname}.* |