]> git.pld-linux.org Git - packages/dict-web1913.git/blob - dict-web1913.spec
- rel++
[packages/dict-web1913.git] / dict-web1913.spec
1 %define         dictname web1913
2 %define         dictversion 0.46-a
3 Summary:        Webster's Revised Unabridged Dictionary for dictd
4 Summary(pl):    S³ownik Webster's Revised Unabridged Dictionary dla dictd
5 Name:           dict-%{dictname}
6 Version:        1.4
7 Release:        8
8 License:        Free for personal or research use, distributable
9 Group:          Applications/Dictionaries
10 Source0:        ftp://ftp.dict.org/pub/dict/%{name}-%{version}.tar.gz
11 # Source0-md5:  3b1eda03a3eb12d5d0f857bd990d7ab5
12 Source1:        ftp://ftp.dict.org/pub/dict/%{dictname}-%{dictversion}.tar.gz
13 # Source1-md5:  e957fe5b670cabb48b1c3b43998084ae
14 Patch0:         %{name}-ac.patch
15 Patch1:         %{name}-sparc.patch
16 URL:            http://www.dict.org/
17 BuildRequires:  autoconf
18 BuildRequires:  automake
19 BuildRequires:  bison
20 BuildRequires:  dictzip
21 BuildRequires:  flex
22 Requires:       dictd
23 Requires:       %{_sysconfdir}/dictd
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
27 Webster's Revised Unabridged Dictionary (1913).
28
29 %description -l pl
30 S³ownik Webstera (angielsko-angielski): Webster's Revised Unabridged
31 Dictionary (1913).
32
33 %prep
34 %setup -q
35 %patch0 -p1
36 %patch1 -p1
37
38 %build
39 %{__autoconf}
40 cp -f /usr/share/automake/config.* .
41 cd libmaa
42 %{__autoconf}
43 cp -f /usr/share/automake/config.* .
44 cd ..
45 %configure \
46         --with-local-libmaa \
47         --with-datapath=%{dictname}-%{dictversion}
48 %{__make}
49 tar xfz %{SOURCE1}
50 %{__make} db
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd}
55
56 dictprefix=%{_datadir}/dictd/%{dictname}
57 echo "# Webster's Revised Unabridged Dictionary
58 database %{dictname} {
59         data  \"$dictprefix.dict.dz\"
60         index \"$dictprefix.index\"
61 }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}.dictconf
62 mv %{dictname}.{dict.dz,index} $RPM_BUILD_ROOT%{_datadir}/dictd
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %post
68 if [ -f /var/lock/subsys/dictd ]; then
69         /etc/rc.d/init.d/dictd restart 1>&2
70 fi
71
72 %postun
73 if [ -f /var/lock/subsys/dictd ]; then
74         /etc/rc.d/init.d/dictd restart 1>&2 || true
75 fi
76
77 %files
78 %defattr(644,root,root,755)
79 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}.dictconf
80 %{_datadir}/dictd/%{dictname}.*
This page took 0.054644 seconds and 3 git commands to generate.