]> git.pld-linux.org Git - packages/dict-mueller7.git/blob - dict-mueller7.spec
b2c9b3791b9b9908836ee36e999bcfa7d06e9fc5
[packages/dict-mueller7.git] / dict-mueller7.spec
1 %define         dictname mueller7
2 Summary:        English-Russian dictionary for dictd
3 Summary(pl):    S³ownik angielsko-rosyjski dla dictd
4 Name:           dict-%{dictname}
5 Version:        1.2
6 Release:        6
7 License:        GPL
8 Group:          Applications/Dictionaries
9 Source0:        http://mueller-dic.chat.ru/Mueller7GPL.tgz
10 # Source0-md5:  0b3cd75e916f078b2caa4f2dc59508e4
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
14 # Source1-md5:  3c1b69c290fb4c06bf3456baf5bf8b97
15 URL:            http://mueller-dic.chat.ru/
16 BuildRequires:  dictfmt
17 BuildRequires:  dictzip
18 %if "%(locale -a | grep '^ru_RU.koi8r$')" == ""
19 BuildRequires:  glibc-localedb-all
20 %endif
21 BuildRequires:  sed >= 4.0
22 Requires:       %{_sysconfdir}/dictd
23 Requires:       dictd
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 Electronic version of 7th edition of English-Russian dictionary by V.
28 K. Mueller.
29
30 %description -l pl
31 Elektroniczna wersja 7. wydania s³ownika angielsko rosyjskiego V. K.
32 Muellera.
33
34 %prep
35 %setup -q -c
36
37 cp %{SOURCE1} .
38 sed -i -e 's/dictfmt -p/dictfmt --locale ru_RU.koi8r -p/' to-dict
39
40 %build
41 chmod +x ./to-dict
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}
53 echo "# Mueller English-Russian dictionary, 7-th edition (%{version})
54 database %{dictname} {
55         data  \"$dictprefix.dict\"
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
64 if [ -f /var/lock/subsys/dictd ]; then
65         /etc/rc.d/init.d/dictd restart 1>&2
66 fi
67
68 %postun
69 if [ -f /var/lock/subsys/dictd ]; then
70         /etc/rc.d/init.d/dictd restart 1>&2 || true
71 fi
72
73 %files
74 %defattr(644,root,root,755)
75 %doc usr/local/share/mova/Mueller7.txt
76 %lang(ru) %doc usr/local/share/mova/Mueller7_koi.txt
77 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}.dictconf
78 %{_datadir}/dictd/%{dictname}.*
This page took 0.115603 seconds and 2 git commands to generate.