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