1 %define dictname web1913
2 %define dictversion 0.46-a
3 Summary: Webster's Revised Unabridged Dictionary
7 License: Free to use, but see http://www.cogsci.princeton.edu/~wn/
8 Group: Applications/Dictionary
9 URL: http://www.dict.org/
10 Source0: ftp://ftp.dict.org/pub/dict/%{name}-%{version}.tar.gz
11 Source1: ftp://ftp.dict.org/pub/dict/%{dictname}-%{dictversion}.tar.gz
12 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
13 BuildRequires: dictzip
15 Requires: %{_sysconfdir}/dictd
24 %configure --with-local-libmaa --with-datapath=%{dictname}-%{dictversion}
30 rm -rf $RPM_BUILD_ROOT
31 install -d $RPM_BUILD_ROOT{%{_datadir}/dictd/,%{_sysconfdir}/dictd}
32 #make install dictdir="$RPM_BUILD_ROOT%{_datadir}/dictd/"
33 install %{dictname}.{dict.dz,index} $RPM_BUILD_ROOT%{_datadir}/dictd/
35 dictprefix=%{_datadir}/dictd/%{dictname}
36 echo "# Webster's Revised Unabridged Dictionary
37 database %{dictname} {
38 data \"$dictprefix.dict.dz\"
39 index \"$dictprefix.index\"
40 }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}.dictconf
43 rm -rf $RPM_BUILD_ROOT
46 if [ -f /var/lock/subsys/dictd ]; then
47 /etc/rc.d/init.d/dictd restart 1>&2 || true
51 if [ -f /var/lock/subsys/dictd ]; then
52 /etc/rc.d/init.d/dictd restart 1>&2
56 %defattr(644,root,root,755)
57 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}.dictconf
58 %{_datadir}/dictd/%{dictname}*