]> git.pld-linux.org Git - packages/dict-idp.git/blob - dict-idp.spec
- rel 4 (use %service)
[packages/dict-idp.git] / dict-idp.spec
1 %define         dictname        IDP
2 %define         dict1           French
3 %define         dict2           German
4 %define         dict3           Italian
5 %define         dict4           Latin
6 %define         dict5           Portuguese
7 %define         dict6           Spanish
8 %define         dictionaries    %{dict1} %{dict2} %{dict3} %{dict4} %{dict5} %{dict6}
9
10 Summary:        The free dictionaries for dictd made from IDP project
11 Summary(pl.UTF-8):      Darmowe słowniki dla dictd z projektu IDP
12 Name:           dict-%{dictname}
13 Version:        19990219
14 # Last update on their site
15 Release:        4
16 License:        GPL
17 # is this '#This file is free to use and modify. Thank you for using the IDP.'
18 # compatible w/ Gnu GPL ???
19 Group:          Applications/Dictionaries
20 Source0:        http://www.aracnet.com/~tyler/IDP/files/%{dict1}.txt
21 # Source0-md5:  893caf92b6b0bde075faa610cdcad162
22 Source1:        http://www.aracnet.com/~tyler/IDP/files/%{dict2}.txt
23 # Source1-md5:  2228f34eef12289a0aec6892e503fd1f
24 Source2:        http://www.aracnet.com/~tyler/IDP/files/%{dict3}.txt
25 # Source2-md5:  39637589eaed62612a97f721c8b42cab
26 Source3:        http://www.aracnet.com/~tyler/IDP/files/%{dict4}.txt
27 # Source3-md5:  eca10dc263c32ea0090c49cef70a3a5f
28 Source4:        http://www.aracnet.com/~tyler/IDP/files/%{dict5}.txt
29 # Source4-md5:  a90cd624de7c6afb5aea70153af05ad6
30 Source5:        http://www.aracnet.com/~tyler/IDP/files/%{dict6}.txt
31 # Source5-md5:  4a9b422b98e957627d3d143ab7f26743
32 #Source91:      http://www.wh9.tu-dresden.de/~heinrich/dict/dict_idp/idp2dict.sh
33 # copyright info:
34 Source98:       http://www.june29.com/IDP/IDPcopyright.html
35 # Source98-md5: 5128ae048e20870c549807eecd8031ac
36 Source99:       http://www.june29.com/IDP/IDPdisclaimer.html
37 # Source99-md5: d2062ea10b27d0b4c59446600b3bb3b1
38 URL:            http://www.june29.com/IDP/
39 BuildRequires:  dictfmt
40 BuildRequires:  dictzip
41 BuildRequires:  rpmbuild(macros) >= 1.268
42 Requires:       %{_sysconfdir}/dictd
43 Requires:       dictd
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
47 This package contains The Internet Dictionary Project's dictionaries,
48 formatted for use by the dictionary server in the dictd package. The
49 Internet Dictionary Project's goal is to create royalty-free
50 translating dictionaries through the help of the Internet's citizens.
51 The IDP site allows individuals from all over the world to visit and
52 assist in the translation of English words into other languages. The
53 resulting lists of English words and their translated counterparts are
54 then made available through this site to anyone, with no restrictions
55 on their use.
56
57 %description -l pl.UTF-8
58 Ten pakiet zawiera darmowe słowniki z Internet Dictionary Project
59 sformatowane do użytku z serwerem słownika dictd. Celem Internet
60 Dictionary Project jest stworzenie wolnych od opłat słowników
61 tłumaczeń w oparciu o pomoc społeczności internetowej. Serwis IDP
62 pozwala ludziom z całego świata na pomoc przy tłumaczeniu angielskich
63 słów na inne języki. Powstałe w ten sposób listy angielskich słów i
64 ich tłumaczeń są udostępniane wszystkim, do nieograniczonego użytku.
65
66 %package %{dict1}
67 Summary:        The %{dict1} dictionary for dictd
68 Summary(pl.UTF-8):      Słownik %{dict1} dla dictd
69 Group:          Applications/Dictionaries
70 Requires:       %{_sysconfdir}/dictd
71 Requires:       dictd
72
73 %description %{dict1}
74 This package contains %{dict1} dictionaries for use by the dictionary
75 server in the dictd package.
76
77 %description %{dict1} -l pl.UTF-8
78 Ten pakiet zawiera słownik %{dict1} do używania z serwerem słownika
79 dictd.
80
81 %package %{dict2}
82 Summary:        The %{dict2} dictionary for dictd
83 Summary(pl.UTF-8):      Słownik %{dict2} dla dictd
84 Group:          Applications/Dictionaries
85 Requires:       %{_sysconfdir}/dictd
86 Requires:       dictd
87
88 %description %{dict2}
89 This package contains %{dict2} dictionaries for use by the dictionary
90 server in the dictd package.
91
92 %description %{dict2} -l pl.UTF-8
93 Ten pakiet zawiera słownik %{dict2} do używania z serwerem słownika
94 dictd.
95
96 %package %{dict3}
97 Summary:        The %{dict3} dictionary for dictd
98 Summary(pl.UTF-8):      Słownik %{dict3} dla dictd
99 Group:          Applications/Dictionaries
100 Requires:       %{_sysconfdir}/dictd
101 Requires:       dictd
102
103 %description %{dict3}
104 This package contains %{dict3} dictionaries for use by the dictionary
105 server in the dictd package.
106
107 %description %{dict3} -l pl.UTF-8
108 Ten pakiet zawiera słownik %{dict3} do używania z serwerem słownika
109 dictd.
110
111 %package %{dict4}
112 Summary:        The %{dict4} dictionary for dictd
113 Summary(pl.UTF-8):      Słownik %{dict4} dla dictd
114 Group:          Applications/Dictionaries
115 Requires:       %{_sysconfdir}/dictd
116 Requires:       dictd
117
118 %description %{dict4}
119 This package contains %{dict4} dictionaries for use by the dictionary
120 server in the dictd package.
121
122 %description %{dict4} -l pl.UTF-8
123 Ten pakiet zawiera słownik %{dict4} do używania z serwerem słownika
124 dictd.
125
126 %package %{dict5}
127 Summary:        The %{dict5} dictionary for dictd
128 Summary(pl.UTF-8):      Słownik %{dict5} dla dictd
129 Group:          Applications/Dictionaries
130 Requires:       %{_sysconfdir}/dictd
131 Requires:       dictd
132
133 %description %{dict5}
134 This package contains %{dict5} dictionaries for use by the dictionary
135 server in the dictd package.
136
137 %description %{dict5} -l pl.UTF-8
138 Ten pakiet zawiera słownik %{dict5} do używania z serwerem słownika
139 dictd.
140
141 %package %{dict6}
142 Summary:        The %{dict6} dictionary for dictd
143 Summary(pl.UTF-8):      Słownik %{dict6} dla dictd
144 Group:          Applications/Dictionaries
145 Requires:       %{_sysconfdir}/dictd
146 Requires:       dictd
147
148 %description %{dict6}
149 This package contains %{dict6} dictionaries for use by the dictionary
150 server in the dictd package.
151
152 %description %{dict6} -l pl.UTF-8
153 Ten pakiet zawiera słownik %{dict6} do używania z serwerem słownika
154 dictd.
155
156 %prep
157 %setup -q -c -T
158 cp -f %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} .
159
160 %build
161 echo "Making %{dictionaries}"
162 all_targets=""
163 for x in *.txt; do
164         target=%{dictname}_`echo $x | cut -f1 -d.`
165         all_targets="$all_targets $target"
166         echo '%h 00-database-info' > $target
167         echo '%d' >> $target
168         grep '^#' $x >> $target
169         grep -v '^#' $x | awk 'BEGIN{FS="\t"}{print "%h "$1; print "%d" ; print "\t"$2"\n" }' >> $target
170 done
171
172 for x in $all_targets ; do
173         dictfmt -p -u "%url" -s "Internet Dictionary Project" $x < $x
174         dictzip $x.dict
175 done
176
177 %install
178 rm -rf $RPM_BUILD_ROOT
179 install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd}
180
181 for i in %{dictionaries}; do
182         dictprefix=%{_datadir}/dictd/%{dictname}_$i
183         echo "# The Internet Dictionary Project dictionaries
184 database $i {
185         data  \"$dictprefix.dict.dz\"
186         index \"$dictprefix.index\"
187 }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}-$i.dictconf
188         mv %{dictname}_$i.* $RPM_BUILD_ROOT%{_datadir}/dictd
189 done
190
191 %clean
192 rm -rf $RPM_BUILD_ROOT
193
194 %post %{dict1}
195 %service -q dictd restart
196
197 %postun %{dict1}
198 if [ "$1" = 0 ]; then
199         %service -q dictd restart
200 fi
201
202 %post %{dict2}
203 %service -q dictd restart
204
205 %postun %{dict2}
206 if [ "$1" = 0 ]; then
207         %service -q dictd restart
208 fi
209
210 %post %{dict3}
211 %service -q dictd restart
212
213 %postun %{dict3}
214 if [ "$1" = 0 ]; then
215         %service -q dictd restart
216 fi
217
218 %post %{dict4}
219 %service -q dictd restart
220
221 %postun %{dict4}
222 if [ "$1" = 0 ]; then
223         %service -q dictd restart
224 fi
225
226 %post %{dict5}
227 %service -q dictd restart
228
229 %postun %{dict5}
230 if [ "$1" = 0 ]; then
231         %service -q dictd restart
232 fi
233
234 %post %{dict6}
235 %service -q dictd restart
236
237 %postun %{dict6}
238 if [ "$1" = 0 ]; then
239         %service -q dictd restart
240 fi
241
242 %files %{dict1}
243 %defattr(644,root,root,755)
244 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-%{dict1}.dictconf
245 %{_datadir}/dictd/%{dictname}_%{dict1}.*
246
247 %files %{dict2}
248 %defattr(644,root,root,755)
249 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-%{dict2}.dictconf
250 %{_datadir}/dictd/%{dictname}_%{dict2}.*
251
252 %files %{dict3}
253 %defattr(644,root,root,755)
254 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-%{dict3}.dictconf
255 %{_datadir}/dictd/%{dictname}_%{dict3}.*
256
257 %files %{dict4}
258 %defattr(644,root,root,755)
259 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-%{dict4}.dictconf
260 %{_datadir}/dictd/%{dictname}_%{dict4}.*
261
262 %files %{dict5}
263 %defattr(644,root,root,755)
264 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-%{dict5}.dictconf
265 %{_datadir}/dictd/%{dictname}_%{dict5}.*
266
267 %files %{dict6}
268 %defattr(644,root,root,755)
269 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-%{dict6}.dictconf
270 %{_datadir}/dictd/%{dictname}_%{dict6}.*
This page took 0.068007 seconds and 3 git commands to generate.