]>
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 | |
df1a5a80 | 6 | Release: 3 |
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 |
75803b10 | 15 | Requires: dictd |
50417c41 TP |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
17 | ||
18 | %description | |
19 | Vietnamese-English dictionary for dictd. | |
20 | ||
ea4cb7a9 JR |
21 | %description -l pl.UTF-8 |
22 | Słownik wietnamsko-angielski dla dictd. | |
50417c41 | 23 | |
db6b7407 | 24 | %prep |
db6b7407 | 25 | |
50417c41 TP |
26 | %install |
27 | rm -rf $RPM_BUILD_ROOT | |
28 | install -d $RPM_BUILD_ROOT{%{_datadir}/dictd,%{_sysconfdir}/dictd} | |
29 | ||
30 | install %{SOURCE0} $RPM_BUILD_ROOT%{_datadir}/dictd | |
31 | install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/dictd/%{dictname}.dict.dz | |
32 | ||
33 | dictprefix=%{_datadir}/dictd/%{dictname} | |
34 | echo "# Vietnamese-English dictionary | |
35 | database %{dictname} { | |
36 | data \"$dictprefix.dict.dz\" | |
37 | index \"$dictprefix.index\" | |
38 | }" > $RPM_BUILD_ROOT%{_sysconfdir}/dictd/%{dictname}.dictconf | |
39 | ||
40 | %clean | |
41 | rm -rf $RPM_BUILD_ROOT | |
42 | ||
43 | %post | |
44 | if [ -f /var/lock/subsys/dictd ]; then | |
45 | /etc/rc.d/init.d/dictd restart 1>&2 | |
46 | fi | |
47 | ||
48 | %postun | |
49 | if [ -f /var/lock/subsys/dictd ]; then | |
50 | /etc/rc.d/init.d/dictd restart 1>&2 || true | |
51 | fi | |
52 | ||
53 | %files | |
54 | %defattr(644,root,root,755) | |
75803b10 | 55 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}.dictconf |
50417c41 | 56 | %{_datadir}/dictd/%{dictname}.* |