]> git.pld-linux.org Git - packages/dict-vera.git/blob - dict-vera.spec
- rel++
[packages/dict-vera.git] / dict-vera.spec
1 %define         dictname vera
2 Summary:        Virtual Entity of Relevant Acronyms dictionary for dictd
3 Summary(pl):    S³ownik Virtual Entity of Relevant Acronyms dla dictd
4 Name:           dict-%{dictname}
5 Version:        1.9
6 Release:        3
7 License:        GPL
8 Group:          Applications/Dictionaries
9 Source0:        ftp://ftp.gnu.org/gnu/vera/%{dictname}-%{version}.tar.gz
10 # Source0-md5:  ed6120dd9739c71580a92868a34776b0
11 URL:            http://www.dict.org/
12 BuildRequires:  dictfmt
13 BuildRequires:  dictzip
14 Requires:       dictd
15 Requires:       %{_sysconfdir}/dictd
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %description
19 This package contains V.E.R.A, version %{version}, formatted for use by
20 the dictionary server in the dictd package.
21
22 %description -l pl
23 Ten pakiet zawiera s³ownik V.E.R.A w wersji %{version}, sformatowany do
24 u¿ytku z serwerem s³ownika dictd.
25
26 %prep
27 %setup -q -n %{dictname}-%{version}
28
29 %build
30 perl -ne 's/\@item (.*)\n/:$1:\n/; print unless /^@/' vera.? | \
31         dictfmt -j -u http://home.snafu.de/ohei/ -s \
32         "V.E.R.A. -- Virtual Entity of Relevant Acronyms (%{version})" %{dictname}
33 dictzip %{dictname}.dict
34
35 %install
36 rm -rf $RPM_BUILD_ROOT
37 install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd}
38
39 dictprefix=%{_datadir}/dictd/%{dictname}
40 echo "# Virtual Entity of Relevant Acronyms dictionary
41 database %{dictname} {
42         data  \"$dictprefix.dict.dz\"
43         index \"$dictprefix.index\"
44 }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}.dictconf
45 mv %{dictname}.{dict.dz,index} $RPM_BUILD_ROOT%{_datadir}/dictd
46
47 %clean
48 rm -rf $RPM_BUILD_ROOT
49
50 %post
51 if [ -f /var/lock/subsys/dictd ]; then
52         /etc/rc.d/init.d/dictd restart 1>&2
53 fi
54
55 %postun
56 if [ -f /var/lock/subsys/dictd ]; then
57         /etc/rc.d/init.d/dictd restart 1>&2 || true
58 fi
59
60 %files
61 %defattr(644,root,root,755)
62 %doc README vera.texi
63 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/dictd/%{dictname}.dictconf
64 %{_datadir}/dictd/%{dictname}.*
This page took 0.09449 seconds and 3 git commands to generate.