]>
Commit | Line | Data |
---|---|---|
e22d95b9 TP |
1 | %define dictname anhviet |
2 | Summary: English-Vietnamese dictionary for dictd | |
79bb2fb4 | 3 | Summary(pl.UTF-8): Słownik angielsko-wietnamski dla dictd |
e22d95b9 TP |
4 | Name: dict-%{dictname} |
5 | Version: 1.0 | |
76df1016 | 6 | Release: 4 |
e22d95b9 TP |
7 | License: GPL (?) |
8 | Group: Applications/Dictionaries | |
9 | Source0: http://vietlug.sourceforge.net/download/emacs/%{dictname}.index | |
6fbb693b | 10 | # Source0-md5: f319c97dd99a8890f27d947b23820e8f |
e22d95b9 | 11 | Source1: http://vietlug.sourceforge.net/download/emacs/%{dictname}.utf.dz |
6fbb693b | 12 | # Source1-md5: e96b030c7814d8ee9dbd30cd039e5f70 |
e22d95b9 | 13 | URL: http://vietlug.sourceforge.net/ |
76df1016 | 14 | BuildRequires: rpmbuild(macros) >= 1.268 |
e22d95b9 | 15 | Requires: %{_sysconfdir}/dictd |
240a2049 | 16 | Requires: dictd |
e22d95b9 TP |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
18 | ||
19 | %description | |
20 | English-Vietnamese dictionary for dictd. | |
21 | ||
33a01dfd JR |
22 | %description -l pl.UTF-8 |
23 | Słownik angielsko-wietnamski dla dictd. | |
e22d95b9 | 24 | |
26d6581f | 25 | %prep |
26d6581f | 26 | |
e22d95b9 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 "# English-Vietnamese 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 | |
76df1016 | 45 | %service -q dictd restart |
e22d95b9 TP |
46 | |
47 | %postun | |
76df1016 ER |
48 | if [ "$1" = 0 ]; then |
49 | %service -q dictd restart | |
e22d95b9 TP |
50 | fi |
51 | ||
52 | %files | |
53 | %defattr(644,root,root,755) | |
240a2049 | 54 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/dictd/%{dictname}.dictconf |
e22d95b9 | 55 | %{_datadir}/dictd/%{dictname}.* |