]>
Commit | Line | Data |
---|---|---|
6c04135c | 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} | |
80edfcaa | 9 | |
d5451926 | 10 | Summary: The free dictionaries for dictd made from IDP project |
7a6d8ce6 | 11 | Summary(pl.UTF-8): Darmowe słowniki dla dictd z projektu IDP |
80edfcaa | 12 | Name: dict-%{dictname} |
13 | Version: 19990219 | |
14 | # Last update on their site | |
3b44bd79 | 15 | Release: 4 |
80edfcaa | 16 | License: GPL |
10288f76 | 17 | # is this '#This file is free to use and modify. Thank you for using the IDP.' |
80edfcaa | 18 | # compatible w/ Gnu GPL ??? |
19 | Group: Applications/Dictionaries | |
8f64017f | 20 | Source0: http://www.aracnet.com/~tyler/IDP/files/%{dict1}.txt |
c3ec792d | 21 | # Source0-md5: 893caf92b6b0bde075faa610cdcad162 |
8f64017f | 22 | Source1: http://www.aracnet.com/~tyler/IDP/files/%{dict2}.txt |
c3ec792d | 23 | # Source1-md5: 2228f34eef12289a0aec6892e503fd1f |
8f64017f | 24 | Source2: http://www.aracnet.com/~tyler/IDP/files/%{dict3}.txt |
c3ec792d | 25 | # Source2-md5: 39637589eaed62612a97f721c8b42cab |
8f64017f | 26 | Source3: http://www.aracnet.com/~tyler/IDP/files/%{dict4}.txt |
c3ec792d | 27 | # Source3-md5: eca10dc263c32ea0090c49cef70a3a5f |
8f64017f | 28 | Source4: http://www.aracnet.com/~tyler/IDP/files/%{dict5}.txt |
c3ec792d | 29 | # Source4-md5: a90cd624de7c6afb5aea70153af05ad6 |
8f64017f | 30 | Source5: http://www.aracnet.com/~tyler/IDP/files/%{dict6}.txt |
c3ec792d | 31 | # Source5-md5: 4a9b422b98e957627d3d143ab7f26743 |
b4a94097 | 32 | #Source91: http://www.wh9.tu-dresden.de/~heinrich/dict/dict_idp/idp2dict.sh |
80edfcaa | 33 | # copyright info: |
34 | Source98: http://www.june29.com/IDP/IDPcopyright.html | |
c3ec792d | 35 | # Source98-md5: 5128ae048e20870c549807eecd8031ac |
80edfcaa | 36 | Source99: http://www.june29.com/IDP/IDPdisclaimer.html |
c3ec792d | 37 | # Source99-md5: d2062ea10b27d0b4c59446600b3bb3b1 |
80edfcaa | 38 | URL: http://www.june29.com/IDP/ |
8f64017f | 39 | BuildRequires: dictfmt |
80edfcaa | 40 | BuildRequires: dictzip |
3b44bd79 | 41 | BuildRequires: rpmbuild(macros) >= 1.268 |
80edfcaa | 42 | Requires: %{_sysconfdir}/dictd |
9ddb66a2 | 43 | Requires: dictd |
10288f76 | 44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
80edfcaa | 45 | |
46 | %description | |
47 | This package contains The Internet Dictionary Project's dictionaries, | |
8f64017f JB |
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. | |
80edfcaa | 56 | |
51e48232 JR |
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. | |
80edfcaa | 65 | |
66 | %package %{dict1} | |
d5451926 | 67 | Summary: The %{dict1} dictionary for dictd |
7a6d8ce6 | 68 | Summary(pl.UTF-8): Słownik %{dict1} dla dictd |
80edfcaa | 69 | Group: Applications/Dictionaries |
80edfcaa | 70 | Requires: %{_sysconfdir}/dictd |
9ddb66a2 | 71 | Requires: dictd |
80edfcaa | 72 | |
73 | %description %{dict1} | |
8f64017f | 74 | This package contains %{dict1} dictionaries for use by the dictionary |
80edfcaa | 75 | server in the dictd package. |
76 | ||
51e48232 JR |
77 | %description %{dict1} -l pl.UTF-8 |
78 | Ten pakiet zawiera słownik %{dict1} do używania z serwerem słownika | |
80edfcaa | 79 | dictd. |
80 | ||
81 | %package %{dict2} | |
d5451926 | 82 | Summary: The %{dict2} dictionary for dictd |
7a6d8ce6 | 83 | Summary(pl.UTF-8): Słownik %{dict2} dla dictd |
80edfcaa | 84 | Group: Applications/Dictionaries |
80edfcaa | 85 | Requires: %{_sysconfdir}/dictd |
9ddb66a2 | 86 | Requires: dictd |
80edfcaa | 87 | |
88 | %description %{dict2} | |
8f64017f | 89 | This package contains %{dict2} dictionaries for use by the dictionary |
80edfcaa | 90 | server in the dictd package. |
91 | ||
51e48232 JR |
92 | %description %{dict2} -l pl.UTF-8 |
93 | Ten pakiet zawiera słownik %{dict2} do używania z serwerem słownika | |
80edfcaa | 94 | dictd. |
95 | ||
96 | %package %{dict3} | |
d5451926 | 97 | Summary: The %{dict3} dictionary for dictd |
7a6d8ce6 | 98 | Summary(pl.UTF-8): Słownik %{dict3} dla dictd |
80edfcaa | 99 | Group: Applications/Dictionaries |
80edfcaa | 100 | Requires: %{_sysconfdir}/dictd |
9ddb66a2 | 101 | Requires: dictd |
80edfcaa | 102 | |
103 | %description %{dict3} | |
8f64017f | 104 | This package contains %{dict3} dictionaries for use by the dictionary |
80edfcaa | 105 | server in the dictd package. |
106 | ||
51e48232 JR |
107 | %description %{dict3} -l pl.UTF-8 |
108 | Ten pakiet zawiera słownik %{dict3} do używania z serwerem słownika | |
80edfcaa | 109 | dictd. |
110 | ||
111 | %package %{dict4} | |
d5451926 | 112 | Summary: The %{dict4} dictionary for dictd |
7a6d8ce6 | 113 | Summary(pl.UTF-8): Słownik %{dict4} dla dictd |
80edfcaa | 114 | Group: Applications/Dictionaries |
80edfcaa | 115 | Requires: %{_sysconfdir}/dictd |
9ddb66a2 | 116 | Requires: dictd |
80edfcaa | 117 | |
118 | %description %{dict4} | |
8f64017f | 119 | This package contains %{dict4} dictionaries for use by the dictionary |
80edfcaa | 120 | server in the dictd package. |
121 | ||
51e48232 JR |
122 | %description %{dict4} -l pl.UTF-8 |
123 | Ten pakiet zawiera słownik %{dict4} do używania z serwerem słownika | |
80edfcaa | 124 | dictd. |
125 | ||
126 | %package %{dict5} | |
d5451926 | 127 | Summary: The %{dict5} dictionary for dictd |
7a6d8ce6 | 128 | Summary(pl.UTF-8): Słownik %{dict5} dla dictd |
80edfcaa | 129 | Group: Applications/Dictionaries |
80edfcaa | 130 | Requires: %{_sysconfdir}/dictd |
9ddb66a2 | 131 | Requires: dictd |
80edfcaa | 132 | |
133 | %description %{dict5} | |
8f64017f | 134 | This package contains %{dict5} dictionaries for use by the dictionary |
80edfcaa | 135 | server in the dictd package. |
136 | ||
51e48232 JR |
137 | %description %{dict5} -l pl.UTF-8 |
138 | Ten pakiet zawiera słownik %{dict5} do używania z serwerem słownika | |
80edfcaa | 139 | dictd. |
140 | ||
141 | %package %{dict6} | |
d5451926 | 142 | Summary: The %{dict6} dictionary for dictd |
7a6d8ce6 | 143 | Summary(pl.UTF-8): Słownik %{dict6} dla dictd |
80edfcaa | 144 | Group: Applications/Dictionaries |
80edfcaa | 145 | Requires: %{_sysconfdir}/dictd |
9ddb66a2 | 146 | Requires: dictd |
80edfcaa | 147 | |
148 | %description %{dict6} | |
8f64017f | 149 | This package contains %{dict6} dictionaries for use by the dictionary |
80edfcaa | 150 | server in the dictd package. |
151 | ||
51e48232 JR |
152 | %description %{dict6} -l pl.UTF-8 |
153 | Ten pakiet zawiera słownik %{dict6} do używania z serwerem słownika | |
80edfcaa | 154 | dictd. |
155 | ||
af8123cb | 156 | %prep |
14859b8d | 157 | %setup -q -c -T |
8f64017f | 158 | cp -f %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} . |
80edfcaa | 159 | |
160 | %build | |
161 | echo "Making %{dictionaries}" | |
162 | all_targets="" | |
d5451926 | 163 | for x in *.txt; do |
8f64017f | 164 | target=%{dictname}_`echo $x | cut -f1 -d.` |
a7bc63c6 | 165 | all_targets="$all_targets $target" |
6c04135c | 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 | |
80edfcaa | 170 | done |
171 | ||
172 | for x in $all_targets ; do | |
d5451926 | 173 | dictfmt -p -u "%url" -s "Internet Dictionary Project" $x < $x |
a7bc63c6 | 174 | dictzip $x.dict |
80edfcaa | 175 | done |
176 | ||
177 | %install | |
178 | rm -rf $RPM_BUILD_ROOT | |
41fd66cc | 179 | install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd} |
80edfcaa | 180 | |
181 | for i in %{dictionaries}; do | |
6c04135c | 182 | dictprefix=%{_datadir}/dictd/%{dictname}_$i |
183 | echo "# The Internet Dictionary Project dictionaries | |
10288f76 TP |
184 | database $i { |
185 | data \"$dictprefix.dict.dz\" | |
186 | index \"$dictprefix.index\" | |
187 | }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}-$i.dictconf | |
d5451926 | 188 | mv %{dictname}_$i.* $RPM_BUILD_ROOT%{_datadir}/dictd |
80edfcaa | 189 | done |
190 | ||
191 | %clean | |
192 | rm -rf $RPM_BUILD_ROOT | |
193 | ||
80edfcaa | 194 | %post %{dict1} |
3b44bd79 | 195 | %service -q dictd restart |
80edfcaa | 196 | |
1c4df5e3 | 197 | %postun %{dict1} |
3b44bd79 ER |
198 | if [ "$1" = 0 ]; then |
199 | %service -q dictd restart | |
80edfcaa | 200 | fi |
201 | ||
202 | %post %{dict2} | |
3b44bd79 | 203 | %service -q dictd restart |
1c4df5e3 JB |
204 | |
205 | %postun %{dict2} | |
3b44bd79 ER |
206 | if [ "$1" = 0 ]; then |
207 | %service -q dictd restart | |
80edfcaa | 208 | fi |
209 | ||
210 | %post %{dict3} | |
3b44bd79 | 211 | %service -q dictd restart |
6c04135c | 212 | |
1c4df5e3 | 213 | %postun %{dict3} |
3b44bd79 ER |
214 | if [ "$1" = 0 ]; then |
215 | %service -q dictd restart | |
80edfcaa | 216 | fi |
217 | ||
218 | %post %{dict4} | |
3b44bd79 | 219 | %service -q dictd restart |
6c04135c | 220 | |
1c4df5e3 | 221 | %postun %{dict4} |
3b44bd79 ER |
222 | if [ "$1" = 0 ]; then |
223 | %service -q dictd restart | |
80edfcaa | 224 | fi |
225 | ||
226 | %post %{dict5} | |
3b44bd79 | 227 | %service -q dictd restart |
6c04135c | 228 | |
1c4df5e3 | 229 | %postun %{dict5} |
3b44bd79 ER |
230 | if [ "$1" = 0 ]; then |
231 | %service -q dictd restart | |
80edfcaa | 232 | fi |
233 | ||
234 | %post %{dict6} | |
3b44bd79 | 235 | %service -q dictd restart |
6c04135c | 236 | |
1c4df5e3 | 237 | %postun %{dict6} |
3b44bd79 ER |
238 | if [ "$1" = 0 ]; then |
239 | %service -q dictd restart | |
1c4df5e3 JB |
240 | fi |
241 | ||
80edfcaa | 242 | %files %{dict1} |
243 | %defattr(644,root,root,755) | |
9ddb66a2 | 244 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-%{dict1}.dictconf |
10288f76 | 245 | %{_datadir}/dictd/%{dictname}_%{dict1}.* |
80edfcaa | 246 | |
247 | %files %{dict2} | |
248 | %defattr(644,root,root,755) | |
9ddb66a2 | 249 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-%{dict2}.dictconf |
10288f76 | 250 | %{_datadir}/dictd/%{dictname}_%{dict2}.* |
80edfcaa | 251 | |
252 | %files %{dict3} | |
253 | %defattr(644,root,root,755) | |
9ddb66a2 | 254 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-%{dict3}.dictconf |
10288f76 | 255 | %{_datadir}/dictd/%{dictname}_%{dict3}.* |
80edfcaa | 256 | |
257 | %files %{dict4} | |
258 | %defattr(644,root,root,755) | |
9ddb66a2 | 259 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-%{dict4}.dictconf |
10288f76 | 260 | %{_datadir}/dictd/%{dictname}_%{dict4}.* |
80edfcaa | 261 | |
262 | %files %{dict5} | |
263 | %defattr(644,root,root,755) | |
9ddb66a2 | 264 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-%{dict5}.dictconf |
10288f76 | 265 | %{_datadir}/dictd/%{dictname}_%{dict5}.* |
80edfcaa | 266 | |
267 | %files %{dict6} | |
268 | %defattr(644,root,root,755) | |
9ddb66a2 | 269 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}-%{dict6}.dictconf |
10288f76 | 270 | %{_datadir}/dictd/%{dictname}_%{dict6}.* |