]>
Commit | Line | Data |
---|---|---|
d90029c1 TP |
1 | %define dictname vera |
2 | Summary: Virtual Entity of Relevant Acronyms dictionary for dictd | |
d724bbf3 | 3 | Summary(pl.UTF-8): Słownik Virtual Entity of Relevant Acronyms dla dictd |
d90029c1 | 4 | Name: dict-%{dictname} |
d28e543b | 5 | Version: 1.21 |
06d1ba59 | 6 | Release: 1 |
d28e543b | 7 | License: FDL v1.1+ |
d90029c1 | 8 | Group: Applications/Dictionaries |
d28e543b JB |
9 | Source0: http://ftp.gnu.org/gnu/vera/%{dictname}-%{version}.tar.gz |
10 | # Source0-md5: b3ac74d4f5336512996142fc00e3e144 | |
908056cb | 11 | URL: http://home.snafu.de/ohei/vera/vueber-e.html |
d90029c1 TP |
12 | BuildRequires: dictfmt |
13 | BuildRequires: dictzip | |
d28e543b | 14 | BuildRequires: perl-base |
078c4ba5 | 15 | BuildRequires: rpmbuild(macros) >= 1.268 |
d90029c1 | 16 | Requires: %{_sysconfdir}/dictd |
2f735ba1 | 17 | Requires: dictd |
d90029c1 TP |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
19 | ||
20 | %description | |
2f735ba1 ER |
21 | This package contains V.E.R.A, version %{version}, formatted for use |
22 | by the dictionary server in the dictd package. | |
d90029c1 | 23 | |
492bf839 JR |
24 | %description -l pl.UTF-8 |
25 | Ten pakiet zawiera słownik V.E.R.A w wersji %{version}, sformatowany | |
26 | do użytku z serwerem słownika dictd. | |
d90029c1 TP |
27 | |
28 | %prep | |
29 | %setup -q -n %{dictname}-%{version} | |
30 | ||
31 | %build | |
d28e543b | 32 | %{__perl} -ne 's/\@item (.*)\n/:$1:\n/; print unless /^@/' vera.? | \ |
3627bdec | 33 | dictfmt -j -u http://home.snafu.de/ohei/ -s \ |
41162908 | 34 | "V.E.R.A. -- Virtual Entity of Relevant Acronyms (%{version})" %{dictname} |
d90029c1 TP |
35 | dictzip %{dictname}.dict |
36 | ||
37 | %install | |
38 | rm -rf $RPM_BUILD_ROOT | |
39 | install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd} | |
40 | ||
41 | dictprefix=%{_datadir}/dictd/%{dictname} | |
42 | echo "# Virtual Entity of Relevant Acronyms dictionary | |
43 | database %{dictname} { | |
44 | data \"$dictprefix.dict.dz\" | |
45 | index \"$dictprefix.index\" | |
46 | }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}.dictconf | |
d28e543b | 47 | cp -p %{dictname}.{dict.dz,index} $RPM_BUILD_ROOT%{_datadir}/dictd |
d90029c1 TP |
48 | |
49 | %clean | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | ||
52 | %post | |
078c4ba5 | 53 | %service -q dictd restart |
d90029c1 TP |
54 | |
55 | %postun | |
078c4ba5 ER |
56 | if [ "$1" = 0 ]; then |
57 | %service -q dictd restart | |
d90029c1 TP |
58 | fi |
59 | ||
60 | %files | |
61 | %defattr(644,root,root,755) | |
d28e543b | 62 | %doc README |
2f735ba1 | 63 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}.dictconf |
d90029c1 | 64 | %{_datadir}/dictd/%{dictname}.* |