]> git.pld-linux.org Git - packages/dict-wn.git/blob - dict-wn.spec
- /etc/dictd is used instead of modify /etc/dictd.conf in %post
[packages/dict-wn.git] / dict-wn.spec
1 %define         dictname wn
2 Summary:        WordNet lexical reference system formatted as dictionary for dictd
3 Name:           dict-%{dictname}
4 Version:        1.5
5 Release:        2
6 License:        Free to use, but see http://www.cogsci.princeton.edu/~wn/
7 Group:          Applications/Dictionary
8 URL:            http://www.dict.org/
9 Source0:        ftp://ftp.dict.org/pub/dict/%{name}-%{version}.tar.gz
10 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
11 BuildRequires:  dictzip
12 Requires:       dictd 
13 Requires:       %{_sysconfdir}/dictd
14 BuildArch:      noarch
15
16 %description 
17 This package contains WordNet (r) 1.6 Lexical Database
18 formatted for use by the dictionary server in the dictd package.
19
20 %prep 
21 %setup -q
22
23 %build
24 %configure 
25 %{__make} db 
26
27 %install
28 rm -rf $RPM_BUILD_ROOT
29 install -d $RPM_BUILD_ROOT{%{_datadir}/dictd/,%{_sysconfdir}/dictd}
30 make install dictdir="$RPM_BUILD_ROOT%{_datadir}/dictd/"
31
32 dictprefix=%{_datadir}/dictd/%{dictname}
33 echo "# WordNet 1.6 Lexical Database dictionary
34 database %{dictname} {
35     data  \"$dictprefix.dict.dz\"
36     index \"$dictprefix.index\" 
37 }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}.dictconf
38
39 %clean
40 rm -rf $RPM_BUILD_ROOT
41
42 %postun
43 if [ -f /var/lock/subsys/dictd ]; then
44         /etc/rc.d/init.d/dictd restart 1>&2 || true
45 fi
46
47 %post
48 if [ -f /var/lock/subsys/dictd ]; then
49         /etc/rc.d/init.d/dictd restart 1>&2
50 fi
51
52 %files
53 %defattr(644,root,root,755)
54 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}.dictconf
55 %{_datadir}/dictd/%{dictname}*
This page took 0.041155 seconds and 4 git commands to generate.