]> git.pld-linux.org Git - packages/dict-misc.git/blob - dict-misc.spec
--fished out dictfmt utility
[packages/dict-misc.git] / dict-misc.spec
1 %define         dictname misc
2 Summary:        misc dictionaries for DICTD
3 Summary(pl):    Ró¿ne s³owniki dla dictd
4 Name:           dict-%{dictname}
5 Version:        1.5
6 Release:        1
7 License:        GPL
8 Group:          Applications/Dictionaries
9 Source0:        ftp://ftp.dict.org/pub/dict/%{name}-%{version}.tar.gz
10 Source1:        http://dsl.org/faq/fjd/journo-1.1.tar.gz
11 Source2:    http://wiretap.area.com/Gopher/Library/Classic/devils.txt
12 URL:            http://www.dict.org/
13 BuildRequires:  autoconf
14 BuildRequires:  dictzip
15 Requires:       dictd
16 Requires:       %{_sysconfdir}/dictd
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %description 
20 This package contains misc dictionaries for use by the dictionary
21 server in the dictd package.
22
23 %description -l pl
24 Ten pakiet zawiera ró¿ne s³owniki do u¿ywania z serwerem s³ownika
25 dictd.
26
27 %package -n dict-devil
28 Summary:        Devils dictionary for DICTD
29 Summary(pl):    S³ownik Devils dla dictd
30 Group:          Applications/Dictionaries
31 Requires:       dictd
32 Requires:       %{_sysconfdir}/dictd
33
34 %description -n dict-devil
35 This package contains The Devil's Dictionary, a cynical and irreverent
36 dictionary of common words, formatted for use by the dictionary server
37 in the dictd package.
38
39 %description -n dict-devil -l pl
40 S³ownik The Devil's Dictionary, zawieraj±cy cyniczne i lekcewa¿±ce
41 opisy s³ów - do u¿ywania z serwerem s³ownika dictd.
42
43 %package -n dict-easton
44 Summary:        easton dictionary for DICTD
45 Summary(pl):    S³ownik easton dla dictd
46 Group:          Applications/Dictionaries
47 Requires:       dictd 
48 Requires:       %{_sysconfdir}/dictd
49
50 %description -n dict-easton
51 This package contains easton dictionaries for use by the dicitonary
52 server in the dictd package.
53
54 %description -n dict-easton -l pl
55 Ten pakiet zawiera s³ownik easton do u¿ywania z serwerem s³ownika
56 dictd.
57
58 %package -n dict-elements
59 Summary:        elements dictionary for DICTD
60 Summary(pl):    S³ownik elements dla dictd
61 Group:          Applications/Dictionaries
62 Requires:       dictd 
63 Requires:       %{_sysconfdir}/dictd
64
65 %description -n dict-elements
66 This package contains elements dictionaries for use by the dicitonary
67 server in the dictd package.
68
69 %description -n dict-elements -l pl
70 Ten pakiet zawiera s³ownik elements do u¿ywania z serwerem s³ownika
71 dictd.
72
73 %package -n dict-foldoc
74 Summary:        foldoc dictionary for DICTD
75 Summary(pl):    S³ownik foldoc dla dictd
76 Group:          Applications/Dictionaries
77 Requires:       dictd 
78 Requires:       %{_sysconfdir}/dictd
79
80 %description -n dict-foldoc
81 This package contains foldoc dictionaries for use by the dicitonary
82 server in the dictd package.
83
84 %description -n dict-foldoc -l pl
85 Ten pakiet zawiera s³ownik foldoc do u¿ywania z serwerem s³ownika
86 dictd.
87
88 %package -n dict-hitchcock
89 Summary:        hitchcock dictionary for DICTD
90 Summary(pl):    S³ownik hitchcock dla dictd
91 Group:          Applications/Dictionaries
92 Requires:       dictd 
93 Requires:       %{_sysconfdir}/dictd
94
95 %description -n dict-hitchcock
96 This package contains hitchcock dictionaries for use by the dicitonary
97 server in the dictd package.
98
99 %description -n dict-hitchcock -l pl
100 Ten pakiet zawiera s³ownik hitchcock do u¿ywania z serwerem s³ownika
101 dictd.
102
103 %package -n dict-journo
104 Summary:        Journalism dictionary for DICTD
105 Summary(pl):    S³ownik Journalism dla dictd
106 Group:          Applications/Dictionaries
107 Requires:       dictd
108 Requires:       %{_sysconfdir}/dictd
109
110 %description -n dict-journo
111 This package contains journo dictionaries for use by the dicitonary
112 server in the dictd package.
113
114 %description -n dict-journo -l pl
115 Ten pakiet zawiera s³ownik journo do u¿ywania z serwerem s³ownika
116 dictd.
117
118 %package -n dict-world95
119 Summary:        world95 dictionary for DICTD
120 Summary(pl):    S³ownik world95 dla dictd
121 Group:          Applications/Dictionaries
122 Requires:       dictd 
123 Requires:       %{_sysconfdir}/dictd
124
125 %description -n dict-world95
126 This package contains world95 dictionaries for use by the dicitonary
127 server in the dictd package.
128
129 %description -n dict-world95 -l pl
130 Ten pakiet zawiera s³ownik world95 do u¿ywania z serwerem s³ownika
131 dictd.
132
133 %package -n dict-fmt
134 Summary:    Dict file formater for DICTD
135 Summary(pl):    Obrabiarka plików dla dictda
136 Group:      Applications/Dictionaries
137 Requires:   %{_sysconfdir}/dictd
138 Provides: dictfmt
139
140 %description -n dict-fmt
141 This package contains dictfmt, util for formater for files used aferwards
142 by the dictionary server from the dictd package.
143
144 %description -n dict-devil -l pl
145 Narzêdzia do obróbki plików u¿ywanych pó¼niej przez serwer z pakietu dictd.
146
147 %prep 
148 %setup -q -a1 
149 cp %{SOURCE2} ./
150
151 %build
152 autoconf
153 %configure 
154 %{__make} db 
155
156
157 sed  -e 's/^[[:alpha:]]\{2,\}$/:&:/' < journo-1.1/journalism.dict \
158     > journalism.txt
159 ./dictfmt -j -u "http://dsl.org/lit/" -s Journalism journo < journalism.txt
160 dictzip journo.dict
161
162 sed  's/^[[:upper:]]\{2,\}/:&:/' ./devils.txt | ./dictfmt  \
163  -j -u http://wiretap.area.com/Gopher/Library/Classic/devils.txt \
164   -s "The Devil's Dictionary (1881-1906)" devil
165
166 dictzip devil.dict
167
168 %install
169 rm -rf $RPM_BUILD_ROOT
170 install -d $RPM_BUILD_ROOT{%{_datadir}/dictd/,%{_sysconfdir}/dictd,%{_bindir}}
171 %{__make} install dictdir="$RPM_BUILD_ROOT%{_datadir}/dictd/"
172 install journo.* devil.* $RPM_BUILD_ROOT%{_datadir}/dictd/
173 install dictfmt $RPM_BUILD_ROOT%{_bindir}
174
175 # jargon has separate package
176 rm -f $RPM_BUILD_ROOT%{_datadir}/dictd/jargon.*
177
178 for i in easton elements foldoc hitchcock world95 journo devil; do
179 dictprefix=%{_datadir}/dictd/$i
180 echo "# Misc Dictionaries - $i
181 database $i {
182     data  \"$dictprefix.dict.dz\"
183     index \"$dictprefix.index\" 
184 }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/$i.dictconf
185 done;
186
187 %clean
188 rm -rf $RPM_BUILD_ROOT
189
190 %post -n dict-devil
191 if [ -f /var/lock/subsys/dictd ]; then
192     /etc/rc.d/init.d/dictd restart 1>&2
193 fi
194
195 %postun -n dict-devil
196 if [ -f /var/lock/subsys/dictd ]; then
197    /etc/rc.d/init.d/dictd restart 1>&2 || true
198 fi
199
200 %post -n dict-easton
201 if [ -f /var/lock/subsys/dictd ]; then
202         /etc/rc.d/init.d/dictd restart 1>&2
203 fi
204
205 %postun -n dict-easton
206 if [ -f /var/lock/subsys/dictd ]; then
207         /etc/rc.d/init.d/dictd restart 1>&2 || true
208 fi
209
210 %post -n dict-elements
211 if [ -f /var/lock/subsys/dictd ]; then
212         /etc/rc.d/init.d/dictd restart 1>&2
213 fi
214
215 %postun -n dict-elements
216 if [ -f /var/lock/subsys/dictd ]; then
217         /etc/rc.d/init.d/dictd restart 1>&2 || true
218 fi
219
220 %post -n dict-foldoc
221 if [ -f /var/lock/subsys/dictd ]; then
222         /etc/rc.d/init.d/dictd restart 1>&2
223 fi
224
225 %postun -n dict-foldoc
226 if [ -f /var/lock/subsys/dictd ]; then
227         /etc/rc.d/init.d/dictd restart 1>&2 || true
228 fi
229
230 %post -n dict-hitchcock
231 if [ -f /var/lock/subsys/dictd ]; then
232         /etc/rc.d/init.d/dictd restart 1>&2
233 fi
234
235 %postun -n dict-hitchcock
236 if [ -f /var/lock/subsys/dictd ]; then
237         /etc/rc.d/init.d/dictd restart 1>&2 || true
238 fi
239
240 %post -n dict-journo
241 if [ -f /var/lock/subsys/dictd ]; then
242         /etc/rc.d/init.d/dictd restart 1>&2
243 fi
244
245 %postun -n dict-journo
246 if [ -f /var/lock/subsys/dictd ]; then
247         /etc/rc.d/init.d/dictd restart 1>&2
248 fi
249
250 %post -n dict-world95
251 if [ -f /var/lock/subsys/dictd ]; then
252         /etc/rc.d/init.d/dictd restart 1>&2
253 fi
254
255 %postun -n dict-world95
256 if [ -f /var/lock/subsys/dictd ]; then
257         /etc/rc.d/init.d/dictd restart 1>&2 || true
258 fi
259
260 %files -n dict-devil
261 %defattr(644,root,root,755)
262 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/devil.dictconf
263 %{_datadir}/dictd/devil.*
264         
265 %files -n dict-easton
266 %defattr(644,root,root,755)
267 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/easton.dictconf
268 %{_datadir}/dictd/easton*
269
270 %files -n dict-elements
271 %defattr(644,root,root,755)
272 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/elements.dictconf
273 %{_datadir}/dictd/elements.*
274
275 %files -n dict-foldoc
276 %defattr(644,root,root,755)
277 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/foldoc.dictconf
278 %{_datadir}/dictd/foldoc.*
279
280 %files -n dict-hitchcock
281 %defattr(644,root,root,755)
282 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/hitchcock.dictconf
283 %{_datadir}/dictd/hitchcock*
284
285 %files -n dict-journo
286 %defattr(644,root,root,755)
287 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/journo.dictconf
288 %{_datadir}/dictd/journo.*
289
290 %files -n dict-world95
291 %defattr(644,root,root,755)
292 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/devil.dictconf
293 %{_datadir}/dictd/devil.*
294  
295 %files -n dict-fmt
296 %defattr(644,root,root,755)
297 %{_bindir}/dictfmt
This page took 0.05962 seconds and 3 git commands to generate.