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