]>
Commit | Line | Data |
---|---|---|
1d585ba9 | 1 | # |
6db98b55 | 2 | # Conditional build: |
f6a2242f JB |
3 | %bcond_without emacs # Emacs-compiled elisp |
4 | %bcond_without utf8 # euc-jp dict | |
6db98b55 | 5 | # |
5fd37ea9 | 6 | Summary: A Japanese character input system library (with dictionary) |
bac22c19 | 7 | Summary(pl.UTF-8): System wprowadzania znaków japońskich (ze słownikiem) |
5fd37ea9 | 8 | Name: anthy |
a4a3dfb5 | 9 | Version: 9100h |
f6a2242f JB |
10 | Release: 4 |
11 | License: LGPL v2+ (library), GPL (dictionary) | |
5fd37ea9 | 12 | Group: Libraries |
a4a3dfb5 JR |
13 | Source0: http://dl.sourceforge.jp/anthy/37536/%{name}-%{version}.tar.gz |
14 | # Source0-md5: 1f558ff7ed296787b55bb1c6cf131108 | |
5fd37ea9 | 15 | URL: http://anthy.sourceforge.jp/ |
5fd37ea9 | 16 | BuildRequires: automake |
f6a2242f | 17 | %{?with_emacs:BuildRequires: emacs} |
6db98b55 | 18 | BuildRequires: iconv |
5fd37ea9 JB |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
21 | %description | |
22 | A Japanese character input system library (with dictionary). | |
23 | ||
d42b4d76 JR |
24 | %description -l pl.UTF-8 |
25 | System wprowadzania znaków japońskich (ze słownikiem). | |
5fd37ea9 JB |
26 | |
27 | %package devel | |
28 | Summary: Header files for anthy libraries | |
bac22c19 | 29 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek anthy |
5fd37ea9 JB |
30 | Group: Development/Libraries |
31 | Requires: %{name} = %{version}-%{release} | |
32 | ||
33 | %description devel | |
34 | Header files for anthy libraries. | |
35 | ||
d42b4d76 JR |
36 | %description devel -l pl.UTF-8 |
37 | Pliki nagłówkowe bibliotek anthy. | |
5fd37ea9 JB |
38 | |
39 | %package static | |
40 | Summary: Static anthy libraries | |
bac22c19 | 41 | Summary(pl.UTF-8): Statyczne biblioteki anthy |
5fd37ea9 JB |
42 | Group: Development/Libraries |
43 | Requires: %{name}-devel = %{version}-%{release} | |
44 | ||
45 | %description static | |
46 | Static anthy libraries. | |
47 | ||
d42b4d76 | 48 | %description static -l pl.UTF-8 |
5fd37ea9 JB |
49 | Statyczne biblioteki anthy. |
50 | ||
f6a2242f JB |
51 | %package -n emacs-anthy |
52 | Summary: Emacs anthy package | |
53 | Summary(pl.UTF-8): Pakiet anthy dla Emacsa | |
54 | Group: Applications/Editors | |
55 | Requires: %{name} = %{version}-%{release} | |
56 | Requires: emacs | |
57 | ||
58 | %description -n emacs-anthy | |
59 | Emacs anthy package. | |
60 | ||
61 | %description -n emacs-anthy -l pl.UTF-8 | |
62 | Pakiet anthy dla Emacsa. | |
63 | ||
5fd37ea9 JB |
64 | %prep |
65 | %setup -q | |
5fd37ea9 | 66 | |
6db98b55 JR |
67 | %if %{with utf8} |
68 | cd alt-cannadic | |
69 | for i in gcanna.ctd gcannaf.ctd gtankan.ctd; do | |
70 | iconv -f euc-jp -t utf-8 $i > $i.utf8 | |
71 | done | |
72 | cd extra | |
73 | for i in g-jiritu-34.t gc-fullname-34.t gf-fuzoku-34.t gt-tankanji_hikanji-34.t gt-tankanji_kanji-34.t; do | |
74 | sed -e 's/^\([^ ]*\)t[ ]*\(#[A-Z0-9\*]*\)[ ]*\([^ ]*\)$/\1 \2 \3/g' $i > $i.norm | |
75 | done | |
76 | cd ../../mkworddic | |
77 | for i in adjust.t compound.t extra.t udict zipcode.t; do | |
78 | iconv -f euc-jp -t utf-8 $i > $i.utf8 | |
79 | done | |
80 | cd .. | |
81 | ||
82 | if [ ! -f mkworddic/dict.args.in-orig ]; then | |
83 | cp -a mkworddic/dict.args.in{,-orig} | |
84 | fi | |
85 | ||
86 | cat <<_EOF_ > mkworddic/dict.args.in | |
87 | # Generated by rpm script | |
88 | set_input_encoding utf8 | |
89 | read @top_srcdir@/alt-cannadic/gcanna.ctd.utf8 | |
90 | read @top_srcdir@/alt-cannadic/gcannaf.ctd.utf8 | |
91 | read @top_srcdir@/alt-cannadic/gtankan.ctd.utf8 | |
92 | read @top_srcdir@/alt-cannadic/extra/g-jiritu-34.t.norm | |
93 | read @top_srcdir@/alt-cannadic/extra/gc-fullname-34.t.norm | |
94 | read @top_srcdir@/alt-cannadic/extra/gt-tankanji_kanji-34.t.norm | |
95 | read @top_srcdir@/alt-cannadic/extra/gt-tankanji_hikanji-34.t.norm | |
96 | read @top_srcdir@/alt-cannadic/extra/gf-fuzoku-34.t.norm | |
97 | read @top_srcdir@/mkworddic/adjust.t.utf8 | |
98 | read @top_srcdir@/mkworddic/compound.t.utf8 | |
99 | read @top_srcdir@/mkworddic/extra.t.utf8 | |
100 | read @top_srcdir@/alt-cannadic/g_fname.t | |
101 | # | |
102 | build_reverse_dict | |
103 | set_dict_encoding utf8 | |
104 | read_uc @top_srcdir@/mkworddic/udict.utf8 | |
105 | write anthy.wdic | |
106 | done | |
107 | _EOF_ | |
108 | touch -r mkworddic/dict.args.in{-orig,} | |
109 | %endif | |
110 | ||
5fd37ea9 | 111 | %build |
f6a2242f JB |
112 | %configure \ |
113 | --with-lispdir=%{_lispdir} | |
114 | ||
5fd37ea9 JB |
115 | %{__make} |
116 | ||
117 | %install | |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | ||
120 | %{__make} install \ | |
f6a2242f JB |
121 | DESTDIR=$RPM_BUILD_ROOT \ |
122 | %if %{without emacs} | |
123 | EMACS=/bin/true | |
124 | %endif | |
5fd37ea9 | 125 | |
99c108c7 JB |
126 | # (assume that) obsoleted by pkg-config |
127 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libanthy*.la | |
128 | ||
5fd37ea9 JB |
129 | %clean |
130 | rm -rf $RPM_BUILD_ROOT | |
131 | ||
132 | %post -p /sbin/ldconfig | |
133 | %postun -p /sbin/ldconfig | |
134 | ||
135 | %files | |
136 | %defattr(644,root,root,755) | |
137 | %doc AUTHORS ChangeLog DIARY NEWS README doc/[!M]* doc/MISC | |
99c108c7 JB |
138 | %attr(755,root,root) %{_bindir}/anthy-agent |
139 | %attr(755,root,root) %{_bindir}/anthy-dic-tool | |
140 | %attr(755,root,root) %{_bindir}/anthy-morphological-analyzer | |
141 | %attr(755,root,root) %{_libdir}/libanthy.so.*.*.* | |
142 | %attr(755,root,root) %ghost %{_libdir}/libanthy.so.0 | |
143 | %attr(755,root,root) %{_libdir}/libanthydic.so.*.*.* | |
144 | %attr(755,root,root) %ghost %{_libdir}/libanthydic.so.0 | |
145 | %attr(755,root,root) %{_libdir}/libanthyinput.so.*.*.* | |
146 | %attr(755,root,root) %ghost %{_libdir}/libanthyinput.so.0 | |
401c9958 | 147 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/anthy-conf |
5fd37ea9 JB |
148 | %{_datadir}/anthy |
149 | ||
150 | %files devel | |
151 | %defattr(644,root,root,755) | |
99c108c7 JB |
152 | %attr(755,root,root) %{_libdir}/libanthy.so |
153 | %attr(755,root,root) %{_libdir}/libanthydic.so | |
154 | %attr(755,root,root) %{_libdir}/libanthyinput.so | |
5fd37ea9 | 155 | %{_includedir}/anthy |
a4a3dfb5 | 156 | %{_pkgconfigdir}/anthy.pc |
5fd37ea9 JB |
157 | |
158 | %files static | |
159 | %defattr(644,root,root,755) | |
99c108c7 JB |
160 | %{_libdir}/libanthy.a |
161 | %{_libdir}/libanthydic.a | |
162 | %{_libdir}/libanthyinput.a | |
1d585ba9 | 163 | |
f6a2242f JB |
164 | %files -n emacs-anthy |
165 | %defattr(644,root,root,755) | |
166 | %dir %{_lispdir}/anthy | |
167 | %{_lispdir}/anthy/anthy*.el | |
168 | %{_lispdir}/anthy/leim-list.el | |
169 | %if %{with emacs} | |
170 | %{_lispdir}/anthy/anthy*.elc | |
f6a2242f | 171 | %endif |