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