]> git.pld-linux.org Git - packages/dict-idp.git/blob - dict-idp.spec
- cosmetics.
[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):    Darmowe S³owniki dla dictd z projektu IDP
12 Name:           dict-%{dictname}
13 Version:        19990219
14 # Last update on their site
15 Release:        1
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 Source1:        http://www.aracnet.com/~tyler/IDP/files/%{dict1}.txt
21 Source2:        http://www.aracnet.com/~tyler/IDP/files/%{dict1}.txt
22 Source3:        http://www.aracnet.com/~tyler/IDP/files/%{dict1}.txt
23 Source4:        http://www.aracnet.com/~tyler/IDP/files/%{dict1}.txt
24 Source5:        http://www.aracnet.com/~tyler/IDP/files/%{dict1}.txt
25 Source6:        http://www.aracnet.com/~tyler/IDP/files/%{dict1}.txt
26 #Source91:   www.wh9.tu-dresden.de/%7Eheinrich/dict/dict_idp/idp2dict.sh
27 # copyright info:
28 Source98:       http://www.june29.com/IDP/IDPcopyright.html
29 Source99:       http://www.june29.com/IDP/IDPdisclaimer.html
30 URL:            http://www.june29.com/IDP/
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 BuildRequires:  dictzip
33 BuildRequires:  autoconf
34 Requires:       dictd
35 Requires:       %{_sysconfdir}/dictd
36
37 %description
38 This package contains The Internet Dictionary Project's dictionaries,
39 version %version formatted for use by the dictionary server in the
40 dictd package. The Internet Dictionary Project's goal is to create
41 royalty-free translating dictionaries through the help of the
42 Internet's citizens. This site allows individuals from all over the
43 world to visit and assist in the translation of English words into
44 other languages. The resulting lists of English words and their
45 translated counterparts are then made available through this site to
46 anyone, with no restrictions on their use. Please enjoy your visit,
47 and thank you for donating your time to this project.
48
49 %description -l pl
50 Ten pakiet zawiera darmowe s³owniki z Internet Dictionary Project w
51 wersji %version sformatowane do u¿ytku z serwerem s³ownika dictd.
52
53 %package %{dict1}
54 Summary:        The %{dict1} Dictionary for dictd
55 Summary(pl):    S³ownik %{dict1} dla dictd
56 Group:          Applications/Dictionaries
57 Requires:       dictd
58 Requires:       %{_sysconfdir}/dictd
59
60 %description %{dict1}
61 This package contains %{dict1} dictionaries for use by the dicitonary
62 server in the dictd package.
63
64 %description %{dict1} -l pl
65 Ten pakiet zawiera s³ownik %{dict1} do u¿ywania z serwerem s³ownika
66 dictd.
67
68 %package %{dict2}
69 Summary:        The %{dict2} Dictionary for dictd
70 Summary(pl):    S³ownik %{dict2} dla dictd
71 Group:          Applications/Dictionaries
72 Requires:       dictd
73 Requires:       %{_sysconfdir}/dictd
74
75 %description %{dict2}
76 This package contains %{dict2} dictionaries for use by the dicitonary
77 server in the dictd package.
78
79 %description %{dict2} -l pl
80 Ten pakiet zawiera s³ownik %{dict2} do u¿ywania z serwerem s³ownika
81 dictd.
82
83 %package %{dict3}
84 Summary:        The %{dict3} Dictionary for dictd
85 Summary(pl):    S³ownik %{dict3} dla dictd
86 Group:          Applications/Dictionaries
87 Requires:       dictd
88 Requires:       %{_sysconfdir}/dictd
89
90 %description %{dict3}
91 This package contains %{dict3} dictionaries for use by the dicitonary
92 server in the dictd package.
93
94 %description %{dict3} -l pl
95 Ten pakiet zawiera s³ownik %{dict3} do u¿ywania z serwerem s³ownika
96 dictd.
97
98 %package %{dict4}
99 Summary:        The %{dict4} Dictionary for dictd
100 Summary(pl):    S³ownik %{dict4} dla dictd
101 Group:          Applications/Dictionaries
102 Requires:       dictd
103 Requires:       %{_sysconfdir}/dictd
104
105 %description %{dict4}
106 This package contains %{dict4} dictionaries for use by the dicitonary
107 server in the dictd package.
108
109 %description %{dict4} -l pl
110 Ten pakiet zawiera s³ownik %{dict4} do u¿ywania z serwerem s³ownika
111 dictd.
112
113 %package %{dict5}
114 Summary:        The %{dict5} Dictionary for dictd
115 Summary(pl):    S³ownik %{dict5} dla dictd
116 Group:          Applications/Dictionaries
117 Requires:       dictd
118 Requires:       %{_sysconfdir}/dictd
119
120 %description %{dict5}
121 This package contains %{dict5} dictionaries for use by the dicitonary
122 server in the dictd package.
123
124 %description %{dict5} -l pl
125 Ten pakiet zawiera s³ownik %{dict5} do u¿ywania z serwerem s³ownika
126 dictd.
127
128 %package %{dict6}
129 Summary:        The %{dict6} Dictionary for dictd
130 Summary(pl):    S³ownik %{dict6} dla dictd
131 Group:          Applications/Dictionaries
132 Requires:       dictd
133 Requires:       %{_sysconfdir}/dictd
134
135 %description %{dict6}
136 This package contains %{dict6} dictionaries for use by the dicitonary
137 server in the dictd package.
138
139 %description %{dict6} -l pl
140 Ten pakiet zawiera s³ownik %{dict6} do u¿ywania z serwerem s³ownika
141 dictd.
142
143 %package %{dict7}
144 Summary:        The %{dict7} Dictionary for dictd
145 Summary(pl):    S³ownik %{dict7} dla dictd
146 Group:          Applications/Dictionaries
147 Requires:       dictd
148 Requires:       %{_sysconfdir}/dictd
149
150 %description %{dict7}
151 This package contains %{dict7} dictionaries for use by the dicitonary
152 server in the dictd package.
153
154 %setup
155 mkdir idp
156 cp %{Source1} idp/
157 cp %{Source2} idp/
158 cp %{Source3} idp/
159 cp %{Source4} idp/
160 cp %{Source5} idp/
161 cp %{Source6} idp/
162
163 %build
164 echo "Making %{dictionaries}"
165 all_targets=""
166 for x in *.txt ; do
167         target=idp_`echo $x | cut -f1 -d.`
168         all_targets=$all_targets" "$target
169         echo '%h 00-database-info' > $target
170         echo '%d' >> $target
171         grep '^#' $x >> $target
172         grep -v '^#' $x | awk 'BEGIN{FS="\t"}{print "%h "$1; print "%d" ; print "\t"$2"\n" }' >> $target
173 done
174
175 for x in $all_targets ; do
176         dictfmt -p -u "%{URL}" -s "Internet Dictionary Project"  $x < $x
177         dictzip  $x'.dict'
178 done
179
180 %install
181 rm -rf $RPM_BUILD_ROOT
182 install -d $RPM_BUILD_ROOT{%{_datadir}/dictd/,%{_sysconfdir}/dictd}
183
184 for i in %{dictionaries}; do
185         dictprefix=%{_datadir}/dictd/%{dictname}_$i
186         echo "# The Internet Dictionary Project dictionaries
187         database $i {
188                 data \"$dictprefix.dict.dz\"
189                 index \"$dictprefix.index\"
190         }
191         " > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}-$i.dictconf
192         install %{dictname}_$i* $RPM_BUILD_ROOT%{_datadir}/dictd/
193 done
194
195 %clean
196 rm -rf $RPM_BUILD_ROOT
197
198 %postun
199 if [ -f /var/lock/subsys/dictd ]; then
200         /etc/rc.d/init.d/dictd restart 1>&2
201 fi
202
203 %post
204 if [ -f /var/lock/subsys/dictd ]; then
205         /etc/rc.d/init.d/dictd restart 1>&2
206 fi
207
208 %postun %{dict1}
209 if [ -f /var/lock/subsys/dictd ]; then
210         /etc/rc.d/init.d/dictd restart 1>&2 || true
211 fi
212
213 %post %{dict1}
214 if [ -f /var/lock/subsys/dictd ]; then
215         /etc/rc.d/init.d/dictd restart 1>&2
216 fi
217
218 %postun %{dict2}
219 if [ -f /var/lock/subsys/dictd ]; then
220         /etc/rc.d/init.d/dictd restart 1>&2 || true
221 fi
222
223 %post %{dict2}
224 if [ -f /var/lock/subsys/dictd ]; then
225         /etc/rc.d/init.d/dictd restart 1>&2
226 fi
227 %postun %{dict3}
228 if [ -f /var/lock/subsys/dictd ]; then
229 /etc/rc.d/init.d/dictd restart 1>&2 || true
230 fi
231
232 %post %{dict3}
233   if [ -f /var/lock/subsys/dictd ]; then
234   /etc/rc.d/init.d/dictd restart 1>&2
235 fi
236
237 %postun %{dict4}
238 if [ -f /var/lock/subsys/dictd ]; then
239         /etc/rc.d/init.d/dictd restart 1>&2 || true
240 fi
241
242 %post %{dict4}
243 if [ -f /var/lock/subsys/dictd ]; then
244         /etc/rc.d/init.d/dictd restart 1>&2
245 fi
246
247 %postun %{dict5}
248 if [ -f /var/lock/subsys/dictd ]; then
249         /etc/rc.d/init.d/dictd restart 1>&2 || true
250 fi
251
252 %post %{dict5}
253 if [ -f /var/lock/subsys/dictd ]; then
254         /etc/rc.d/init.d/dictd restart 1>&2
255 fi
256
257 %postun %{dict6}
258 if [ -f /var/lock/subsys/dictd ]; then
259 /etc/rc.d/init.d/dictd restart 1>&2 || true
260 fi
261
262 %post %{dict6}
263 if [ -f /var/lock/subsys/dictd ]; then
264         /etc/rc.d/init.d/dictd restart 1>&2
265 fi
266
267 %postun %{dict7}
268 if [ -f /var/lock/subsys/dictd ]; then
269         /etc/rc.d/init.d/dictd restart 1>&2 || true
270 fi
271
272 %post %{dict7}
273 if [ -f /var/lock/subsys/dictd ]; then
274         /etc/rc.d/init.d/dictd restart 1>&2
275 fi
276
277 %files %{dict1}
278 %defattr(644,root,root,755)
279 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}-%{dict1}.dictconf
280 %{_datadir}/dictd/%{dictname}_%{dict1}*
281
282 %files %{dict2}
283 %defattr(644,root,root,755)
284 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}-%{dict2}.dictconf
285 %{_datadir}/dictd/%{dictname}_%{dict2}*
286
287 %files %{dict3}
288 %defattr(644,root,root,755)
289 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}-%{dict3}.dictconf
290 %{_datadir}/dictd/%{dictname}_%{dict3}*
291
292 %files %{dict4}
293 %defattr(644,root,root,755)
294 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}-%{dict4}.dictconf
295 %{_datadir}/dictd/%{dictname}_%{dict4}*
296
297 %files %{dict5}
298 %defattr(644,root,root,755)
299 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}-%{dict5}.dictconf
300 %{_datadir}/dictd/%{dictname}_%{dict5}*
301
302 %files %{dict6}
303 %defattr(644,root,root,755)
304 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}-%{dict6}.dictconf
305 %{_datadir}/dictd/%{dictname}_%{dict6}*
306
307 %files %{dict7}
308 %defattr(644,root,root,755)
309 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}-%{dict7}.dictconf
310 %{_datadir}/dictd/%{dictname}_%{dict7}*
This page took 0.130898 seconds and 3 git commands to generate.