]> git.pld-linux.org Git - packages/dict-web1913.git/blob - dict-web1913.spec
- rel 9 (use %service)
[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.UTF-8):      Słownik Webster's Revised Unabridged Dictionary dla dictd
5 Name:           dict-%{dictname}
6 Version:        1.4
7 Release:        9
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 BuildRequires:  rpmbuild(macros) >= 1.268
23 Requires:       %{_sysconfdir}/dictd
24 Requires:       dictd
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 Webster's Revised Unabridged Dictionary (1913).
29
30 %description -l pl.UTF-8
31 Słownik Webstera (angielsko-angielski): Webster's Revised Unabridged
32 Dictionary (1913).
33
34 %prep
35 %setup -q
36 %patch0 -p1
37 %patch1 -p1
38
39 %build
40 %{__autoconf}
41 cp -f /usr/share/automake/config.* .
42 cd libmaa
43 %{__autoconf}
44 cp -f /usr/share/automake/config.* .
45 cd ..
46 %configure \
47         --with-local-libmaa \
48         --with-datapath=%{dictname}-%{dictversion}
49 %{__make}
50 tar xfz %{SOURCE1}
51 %{__make} db
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd}
56
57 dictprefix=%{_datadir}/dictd/%{dictname}
58 echo "# Webster's Revised Unabridged Dictionary
59 database %{dictname} {
60         data  \"$dictprefix.dict.dz\"
61         index \"$dictprefix.index\"
62 }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}.dictconf
63 mv %{dictname}.{dict.dz,index} $RPM_BUILD_ROOT%{_datadir}/dictd
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %post
69 %service -q dictd restart
70
71 %postun
72 if [ "$1" = 0 ]; then
73         %service -q dictd restart
74 fi
75
76 %files
77 %defattr(644,root,root,755)
78 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}.dictconf
79 %{_datadir}/dictd/%{dictname}.*
This page took 1.344191 seconds and 3 git commands to generate.