]> git.pld-linux.org Git - packages/dict-idp.git/blob - dict-idp.spec
7941cc2da215333fc2ccc6a699040157b39e7f0e
[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:        2
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 Requires:       dictd
42 Requires:       %{_sysconfdir}/dictd
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 This package contains The Internet Dictionary Project's dictionaries,
47 formatted for use by the dictionary server in the dictd package. The
48 Internet Dictionary Project's goal is to create royalty-free
49 translating dictionaries through the help of the Internet's citizens.
50 The IDP site allows individuals from all over the world to visit and
51 assist in the translation of English words into other languages. The
52 resulting lists of English words and their translated counterparts are
53 then made available through this site to anyone, with no restrictions
54 on their use.
55
56 %description -l pl
57 Ten pakiet zawiera darmowe s³owniki z Internet Dictionary Project
58 sformatowane do u¿ytku z serwerem s³ownika dictd. Celem Internet
59 Dictionary Project jest stworzenie wolnych od op³at s³owników
60 t³umaczeñ w oparciu o pomoc spo³eczno¶ci internetowej. Serwis IDP
61 pozwala ludziom z ca³ego ¶wiata na pomoc przy t³umaczeniu angielskich
62 s³ów na inne jêzyki. Powsta³e w ten sposób listy angielskich s³ów i
63 ich t³umaczeñ s± udostêpniane wszystkim, do nieograniczonego u¿ytku.
64
65 %package %{dict1}
66 Summary:        The %{dict1} dictionary for dictd
67 Summary(pl):    S³ownik %{dict1} dla dictd
68 Group:          Applications/Dictionaries
69 Requires:       dictd
70 Requires:       %{_sysconfdir}/dictd
71
72 %description %{dict1}
73 This package contains %{dict1} dictionaries for use by the dictionary
74 server in the dictd package.
75
76 %description %{dict1} -l pl
77 Ten pakiet zawiera s³ownik %{dict1} do u¿ywania z serwerem s³ownika
78 dictd.
79
80 %package %{dict2}
81 Summary:        The %{dict2} dictionary for dictd
82 Summary(pl):    S³ownik %{dict2} dla dictd
83 Group:          Applications/Dictionaries
84 Requires:       dictd
85 Requires:       %{_sysconfdir}/dictd
86
87 %description %{dict2}
88 This package contains %{dict2} dictionaries for use by the dictionary
89 server in the dictd package.
90
91 %description %{dict2} -l pl
92 Ten pakiet zawiera s³ownik %{dict2} do u¿ywania z serwerem s³ownika
93 dictd.
94
95 %package %{dict3}
96 Summary:        The %{dict3} dictionary for dictd
97 Summary(pl):    S³ownik %{dict3} dla dictd
98 Group:          Applications/Dictionaries
99 Requires:       dictd
100 Requires:       %{_sysconfdir}/dictd
101
102 %description %{dict3}
103 This package contains %{dict3} dictionaries for use by the dictionary
104 server in the dictd package.
105
106 %description %{dict3} -l pl
107 Ten pakiet zawiera s³ownik %{dict3} do u¿ywania z serwerem s³ownika
108 dictd.
109
110 %package %{dict4}
111 Summary:        The %{dict4} dictionary for dictd
112 Summary(pl):    S³ownik %{dict4} dla dictd
113 Group:          Applications/Dictionaries
114 Requires:       dictd
115 Requires:       %{_sysconfdir}/dictd
116
117 %description %{dict4}
118 This package contains %{dict4} dictionaries for use by the dictionary
119 server in the dictd package.
120
121 %description %{dict4} -l pl
122 Ten pakiet zawiera s³ownik %{dict4} do u¿ywania z serwerem s³ownika
123 dictd.
124
125 %package %{dict5}
126 Summary:        The %{dict5} dictionary for dictd
127 Summary(pl):    S³ownik %{dict5} dla dictd
128 Group:          Applications/Dictionaries
129 Requires:       dictd
130 Requires:       %{_sysconfdir}/dictd
131
132 %description %{dict5}
133 This package contains %{dict5} dictionaries for use by the dictionary
134 server in the dictd package.
135
136 %description %{dict5} -l pl
137 Ten pakiet zawiera s³ownik %{dict5} do u¿ywania z serwerem s³ownika
138 dictd.
139
140 %package %{dict6}
141 Summary:        The %{dict6} dictionary for dictd
142 Summary(pl):    S³ownik %{dict6} dla dictd
143 Group:          Applications/Dictionaries
144 Requires:       dictd
145 Requires:       %{_sysconfdir}/dictd
146
147 %description %{dict6}
148 This package contains %{dict6} dictionaries for use by the dictionary
149 server in the dictd package.
150
151 %description %{dict6} -l pl
152 Ten pakiet zawiera s³ownik %{dict6} do u¿ywania z serwerem s³ownika
153 dictd.
154
155 %prep
156 %setup -c -T
157 cp -f %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} .
158
159 %build
160 echo "Making %{dictionaries}"
161 all_targets=""
162 for x in *.txt; do
163         target=%{dictname}_`echo $x | cut -f1 -d.`
164         all_targets="$all_targets $target"
165         echo '%h 00-database-info' > $target
166         echo '%d' >> $target
167         grep '^#' $x >> $target
168         grep -v '^#' $x | awk 'BEGIN{FS="\t"}{print "%h "$1; print "%d" ; print "\t"$2"\n" }' >> $target
169 done
170
171 for x in $all_targets ; do
172         dictfmt -p -u "%url" -s "Internet Dictionary Project" $x < $x
173         dictzip $x.dict
174 done
175
176 %install
177 rm -rf $RPM_BUILD_ROOT
178 install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd}
179
180 for i in %{dictionaries}; do
181         dictprefix=%{_datadir}/dictd/%{dictname}_$i
182         echo "# The Internet Dictionary Project dictionaries
183 database $i {
184         data  \"$dictprefix.dict.dz\"
185         index \"$dictprefix.index\"
186 }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}-$i.dictconf
187         mv %{dictname}_$i.* $RPM_BUILD_ROOT%{_datadir}/dictd
188 done
189
190 %clean
191 rm -rf $RPM_BUILD_ROOT
192
193 %post %{dict1}
194 if [ -f /var/lock/subsys/dictd ]; then
195         /etc/rc.d/init.d/dictd restart 1>&2
196 fi
197
198 %postun %{dict1}
199 if [ -f /var/lock/subsys/dictd ]; then
200         /etc/rc.d/init.d/dictd restart 1>&2 || true
201 fi
202
203 %post %{dict2}
204 if [ -f /var/lock/subsys/dictd ]; then
205         /etc/rc.d/init.d/dictd restart 1>&2
206 fi
207
208 %postun %{dict2}
209 if [ -f /var/lock/subsys/dictd ]; then
210         /etc/rc.d/init.d/dictd restart 1>&2 || true
211 fi
212
213 %post %{dict3}
214 if [ -f /var/lock/subsys/dictd ]; then
215         /etc/rc.d/init.d/dictd restart 1>&2
216 fi
217
218 %postun %{dict3}
219 if [ -f /var/lock/subsys/dictd ]; then
220         /etc/rc.d/init.d/dictd restart 1>&2 || true
221 fi
222
223 %post %{dict4}
224 if [ -f /var/lock/subsys/dictd ]; then
225         /etc/rc.d/init.d/dictd restart 1>&2
226 fi
227
228 %postun %{dict4}
229 if [ -f /var/lock/subsys/dictd ]; then
230         /etc/rc.d/init.d/dictd restart 1>&2 || true
231 fi
232
233 %post %{dict5}
234 if [ -f /var/lock/subsys/dictd ]; then
235         /etc/rc.d/init.d/dictd restart 1>&2
236 fi
237
238 %postun %{dict5}
239 if [ -f /var/lock/subsys/dictd ]; then
240         /etc/rc.d/init.d/dictd restart 1>&2 || true
241 fi
242
243 %post %{dict6}
244 if [ -f /var/lock/subsys/dictd ]; then
245         /etc/rc.d/init.d/dictd restart 1>&2
246 fi
247
248 %postun %{dict6}
249 if [ -f /var/lock/subsys/dictd ]; then
250         /etc/rc.d/init.d/dictd restart 1>&2 || true
251 fi
252
253 %files %{dict1}
254 %defattr(644,root,root,755)
255 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}-%{dict1}.dictconf
256 %{_datadir}/dictd/%{dictname}_%{dict1}.*
257
258 %files %{dict2}
259 %defattr(644,root,root,755)
260 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}-%{dict2}.dictconf
261 %{_datadir}/dictd/%{dictname}_%{dict2}.*
262
263 %files %{dict3}
264 %defattr(644,root,root,755)
265 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}-%{dict3}.dictconf
266 %{_datadir}/dictd/%{dictname}_%{dict3}.*
267
268 %files %{dict4}
269 %defattr(644,root,root,755)
270 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}-%{dict4}.dictconf
271 %{_datadir}/dictd/%{dictname}_%{dict4}.*
272
273 %files %{dict5}
274 %defattr(644,root,root,755)
275 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}-%{dict5}.dictconf
276 %{_datadir}/dictd/%{dictname}_%{dict5}.*
277
278 %files %{dict6}
279 %defattr(644,root,root,755)
280 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}-%{dict6}.dictconf
281 %{_datadir}/dictd/%{dictname}_%{dict6}.*
This page took 0.108043 seconds and 2 git commands to generate.