]>
Commit | Line | Data |
---|---|---|
50417c41 TP |
1 | %define dictname vietanh |
2 | Summary: Vietnamese-English dictionary for dictd | |
24b420dc | 3 | Summary(pl.UTF-8): Słownik wietnamsko-angielski dla dictd |
50417c41 TP |
4 | Name: dict-%{dictname} |
5 | Version: 1.0 | |
675a67a2 | 6 | Release: 4 |
50417c41 TP |
7 | License: GPL (?) |
8 | Group: Applications/Dictionaries | |
9 | Source0: http://vietlug.sourceforge.net/download/emacs/%{dictname}.index | |
8af52d34 | 10 | # Source0-md5: bf0436710baba2be46e6d8177409cac7 |
50417c41 | 11 | Source1: http://vietlug.sourceforge.net/download/emacs/%{dictname}.telex.dz |
8af52d34 | 12 | # Source1-md5: 4a4a9f37916d3db0d4ca3ab0e7381927 |
50417c41 | 13 | URL: http://vietlug.sourceforge.net/ |
50417c41 | 14 | Requires: %{_sysconfdir}/dictd |
675a67a2 | 15 | BuildRequires: rpmbuild(macros) >= 1.268 |
75803b10 | 16 | Requires: dictd |
50417c41 TP |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
18 | ||
19 | %description | |
20 | Vietnamese-English dictionary for dictd. | |
21 | ||
ea4cb7a9 JR |
22 | %description -l pl.UTF-8 |
23 | Słownik wietnamsko-angielski dla dictd. | |
50417c41 | 24 | |
db6b7407 | 25 | %prep |
db6b7407 | 26 | |
50417c41 TP |
27 | %install |
28 | rm -rf $RPM_BUILD_ROOT | |
29 | install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd} | |
30 | ||
31 | install %{SOURCE0} $RPM_BUILD_ROOT%{_datadir}/dictd | |
32 | install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/dictd/%{dictname}.dict.dz | |
33 | ||
34 | dictprefix=%{_datadir}/dictd/%{dictname} | |
35 | echo "# Vietnamese-English dictionary | |
36 | database %{dictname} { | |
37 | data \"$dictprefix.dict.dz\" | |
38 | index \"$dictprefix.index\" | |
39 | }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}.dictconf | |
40 | ||
41 | %clean | |
42 | rm -rf $RPM_BUILD_ROOT | |
43 | ||
44 | %post | |
675a67a2 | 45 | %service -q dictd restart |
50417c41 TP |
46 | |
47 | %postun | |
675a67a2 ER |
48 | if [ "$1" = 0 ]; then |
49 | %service -q dictd restart | |
50417c41 TP |
50 | fi |
51 | ||
52 | %files | |
53 | %defattr(644,root,root,755) | |
75803b10 | 54 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}.dictconf |
50417c41 | 55 | %{_datadir}/dictd/%{dictname}.* |