]> git.pld-linux.org Git - packages/dict-ksocrat.git/blame - dict-ksocrat.spec
- rel 2 (use %service)
[packages/dict-ksocrat.git] / dict-ksocrat.spec
CommitLineData
2317010f
TP
1%define dictname ksocrat
2Summary: English<->Russian dictionary for dictd
8e757869 3Summary(pl.UTF-8): Słownik angielsko<->rosyjski dla dictd
2317010f
TP
4Name: dict-%{dictname}
5Version: 1.0.1
b106a4a7 6Release: 2
2317010f
TP
7License: for use with KSocrat only
8Group: Applications/Dictionaries
9Source0: http://webua.net/zavolzhsky/download/%{dictname}-enru-dic-%{version}.tar.bz2
10# Source0-md5: 54dc44d886961d79dc677f62f9fc0b02
11Source1: http://webua.net/zavolzhsky/download/%{dictname}-ruen-dic-%{version}.tar.bz2
12# Source1-md5: a6b2a0b365b65e2ced72707b8dc1ad5f
13URL: http://webua.net/zavolzhsky/english/programs.html
14Patch0: %{dictname}-enru.patch
15BuildRequires: dictfmt
16BuildRequires: dictzip
b106a4a7 17BuildRequires: rpmbuild(macros) >= 1.268
2317010f 18Requires: %{_sysconfdir}/dictd
78c3502c 19Requires: dictd
2317010f
TP
20BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22%description
23English<->Russian dictionary for dictd encoded in koi8-r. Start server
24with --locale ru_RU.KOI8-R option in order to use it.
25
f90523d3
JR
26%description -l pl.UTF-8
27Słownik angielsko<->rosyjski dla dictd kodowany w koi8-r. Uruchom
28serwer z opcją --locale ru_RU.KOI8-R, żeby móc go używać.
2317010f
TP
29
30%package enru
31Summary: English-Russian dictionary for dictd
8e757869 32Summary(pl.UTF-8): Słownik angielsko-rosyjski dla dictd
2317010f
TP
33Group: Applications/Dictionaries
34
35%description enru
36English-Russian dictionary for dictd encoded in koi8-r.
37
f90523d3
JR
38%description enru -l pl.UTF-8
39Słownik angielsko-rosyjski dla dictd kodowany w koi8-r.
2317010f
TP
40
41%package ruen
42Summary: Russian-English dictionary for dictd
8e757869 43Summary(pl.UTF-8): Słownik rosyjsko-angielski dla dictd
2317010f
TP
44Group: Applications/Dictionaries
45
46%description ruen
47Russian-English dictionary for dictd encoded in koi8-r. Start server
48with --locale ru_RU.KOI8-R option in order to use it.
49
f90523d3
JR
50%description ruen -l pl.UTF-8
51Słownik rosyjsko-angielski dla dictd kodowany w koi8-r. Uruchom serwer
52z opcją --locale ru_RU.KOI8-R, żeby móc go używać.
2317010f
TP
53
54%prep
55%setup -q -c -a1
56%patch0 -p0
57
58%build
59perl -pe 's/^(.*?)\s*--\s*(.*?)\s*$/:$1: - $2\n/' < usr/share/apps/ksocrat/enru.dic | \
60 dictfmt -j -u http://webua.net/zavolzhsky/english/programs.html -s \
61 "KSocrat English-Russian dictionary (%{version})" %{dictname}-enru
62
63perl -pe 's/^(.*?)\s*--\s*(.*?)\s*$/:$1: - $2\n/' < usr/share/apps/ksocrat/ruen.dic | \
64 dictfmt -j -u http://webua.net/zavolzhsky/english/programs.html -s \
65 "KSocrat Russian-English dictionary (%{version})" %{dictname}-ruen --locale ru_RU.KOI8-R
66
67dictzip %{dictname}*.dict
68
69%install
70rm -rf $RPM_BUILD_ROOT
71install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd}
72
73dictprefix=%{_datadir}/dictd/%{dictname}-enru
74echo "# KSocrat English-Russian dictionary
75database %{dictname}-enru {
76 data \"$dictprefix.dict.dz\"
77 index \"$dictprefix.index\"
78}" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}-enru.dictconf
79
80dictprefix=%{_datadir}/dictd/%{dictname}-ruen
81echo "# KSocrat Russian-English dictionary
82database %{dictname}-ruen {
83 data \"$dictprefix.dict.dz\"
84 index \"$dictprefix.index\"
85}" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}-ruen.dictconf
86mv %{dictname}* $RPM_BUILD_ROOT%{_datadir}/dictd
87
88%clean
89rm -rf $RPM_BUILD_ROOT
90
91%post enru
b106a4a7 92%service -q dictd restart
2317010f
TP
93
94%postun enru
b106a4a7
ER
95if [ "$1" = 0 ]; then
96 %service -q dictd restart
2317010f
TP
97fi
98
99%post ruen
b106a4a7 100%service -q dictd restart
2317010f
TP
101
102%postun ruen
b106a4a7
ER
103if [ "$1" = 0 ]; then
104 %service -q dictd restart
2317010f
TP
105fi
106
107%files enru
108%defattr(644,root,root,755)
109%doc usr/share/apps/ksocrat/*_ENG.txt
110%lang(ru) %doc usr/share/apps/ksocrat/*_RUS.txt
78c3502c 111%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-enru.dictconf
2317010f
TP
112%{_datadir}/dictd/%{dictname}-enru.*
113
114%files ruen
115%defattr(644,root,root,755)
116%doc usr/share/apps/ksocrat/*_ENG.txt
117%lang(ru) %doc usr/share/apps/ksocrat/*_RUS.txt
78c3502c 118%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-ruen.dictconf
2317010f 119%{_datadir}/dictd/%{dictname}-ruen.*
This page took 0.073657 seconds and 4 git commands to generate.