]>
Commit | Line | Data |
---|---|---|
30bb16af TP |
1 | %define dictname mueller7 |
2 | Summary: English-Russian dictionary for dictd | |
426eec3a | 3 | Summary(pl.UTF-8): Słownik angielsko-rosyjski dla dictd |
30bb16af TP |
4 | Name: dict-%{dictname} |
5 | Version: 1.2 | |
13b816c2 | 6 | Release: 7 |
30bb16af TP |
7 | License: GPL |
8 | Group: Applications/Dictionaries | |
9 | Source0: http://mueller-dic.chat.ru/Mueller7GPL.tgz | |
2c55afd5 | 10 | # Source0-md5: 0b3cd75e916f078b2caa4f2dc59508e4 |
30bb16af TP |
11 | # This one is compressed with bzip2 (do not trust tgz!) |
12 | #Source0: http://www.geocities.com/mueller_dic/Mueller7GPL.tgz | |
13 | Source1: http://www.math.sunysb.edu/~comech/tools/to-dict | |
2c55afd5 | 14 | # Source1-md5: 3c1b69c290fb4c06bf3456baf5bf8b97 |
30bb16af | 15 | URL: http://mueller-dic.chat.ru/ |
13b816c2 | 16 | BuildRequires: rpmbuild(macros) >= 1.268 |
30bb16af TP |
17 | BuildRequires: dictfmt |
18 | BuildRequires: dictzip | |
10d63367 JB |
19 | %if "%(locale -a | grep '^ru_RU.koi8r$')" == "" |
20 | BuildRequires: glibc-localedb-all | |
21 | %endif | |
22 | BuildRequires: sed >= 4.0 | |
30bb16af | 23 | Requires: %{_sysconfdir}/dictd |
91da0d36 | 24 | Requires: dictd |
30bb16af TP |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %description | |
28 | Electronic version of 7th edition of English-Russian dictionary by V. | |
29 | K. Mueller. | |
30 | ||
fcae89d3 JR |
31 | %description -l pl.UTF-8 |
32 | Elektroniczna wersja 7. wydania słownika angielsko rosyjskiego V. K. | |
30bb16af TP |
33 | Muellera. |
34 | ||
35 | %prep | |
36 | %setup -q -c | |
30bb16af | 37 | cp %{SOURCE1} . |
1f9e9e2e | 38 | sed -i -e 's/dictfmt -p/dictfmt --locale ru_RU.koi8r -p/' to-dict |
13b816c2 | 39 | chmod +x ./to-dict |
10d63367 JB |
40 | |
41 | %build | |
30bb16af TP |
42 | ./to-dict --no-trans usr/local/share/dict/Mueller7GPL.koi mueller7.notr |
43 | ./to-dict --src-data mueller7.notr mueller7.data && rm -f mueller7.notr | |
44 | ./to-dict --data-dict mueller7.data mueller7 && rm -f mueller7.data | |
45 | ./to-dict --expand-index mueller7.index mueller7.index.exp | |
46 | mv -f mueller7.index.exp mueller7.index | |
47 | ||
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd} | |
51 | ||
52 | dictprefix=%{_datadir}/dictd/%{dictname} | |
60b49f5d | 53 | echo "# Mueller English-Russian dictionary, 7-th edition (%{version}) |
30bb16af | 54 | database %{dictname} { |
5305b5c1 | 55 | data \"$dictprefix.dict.dz\" |
30bb16af TP |
56 | index \"$dictprefix.index\" |
57 | }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}.dictconf | |
58 | mv %{dictname}.* $RPM_BUILD_ROOT%{_datadir}/dictd | |
59 | ||
60 | %clean | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %post | |
13b816c2 | 64 | %service -q dictd restart |
30bb16af TP |
65 | |
66 | %postun | |
13b816c2 ER |
67 | if [ "$1" = 0 ]; then |
68 | %service -q dictd restart | |
30bb16af TP |
69 | fi |
70 | ||
71 | %files | |
72 | %defattr(644,root,root,755) | |
73 | %doc usr/local/share/mova/Mueller7.txt | |
74 | %lang(ru) %doc usr/local/share/mova/Mueller7_koi.txt | |
91da0d36 | 75 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}.dictconf |
30bb16af | 76 | %{_datadir}/dictd/%{dictname}.* |