3 %bcond_without emacs # Emacs-compiled elisp
4 %bcond_without utf8 # euc-jp dict
6 Summary: A Japanese character input system library (with dictionary)
7 Summary(pl.UTF-8): System wprowadzania znaków japońskich (ze słownikiem)
11 License: LGPL v2+ (library), GPL (dictionary)
13 Source0: http://dl.sourceforge.jp/anthy/37536/%{name}-%{version}.tar.gz
14 # Source0-md5: 1f558ff7ed296787b55bb1c6cf131108
15 URL: http://anthy.sourceforge.jp/
16 BuildRequires: automake
17 %{?with_emacs:BuildRequires: emacs}
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 A Japanese character input system library (with dictionary).
24 %description -l pl.UTF-8
25 System wprowadzania znaków japońskich (ze słownikiem).
28 Summary: Header files for anthy libraries
29 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek anthy
30 Group: Development/Libraries
31 Requires: %{name} = %{version}-%{release}
34 Header files for anthy libraries.
36 %description devel -l pl.UTF-8
37 Pliki nagłówkowe bibliotek anthy.
40 Summary: Static anthy libraries
41 Summary(pl.UTF-8): Statyczne biblioteki anthy
42 Group: Development/Libraries
43 Requires: %{name}-devel = %{version}-%{release}
46 Static anthy libraries.
48 %description static -l pl.UTF-8
49 Statyczne biblioteki anthy.
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}
58 %description -n emacs-anthy
61 %description -n emacs-anthy -l pl.UTF-8
62 Pakiet anthy dla Emacsa.
69 for i in gcanna.ctd gcannaf.ctd gtankan.ctd; do
70 iconv -f euc-jp -t utf-8 $i > $i.utf8
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
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
82 if [ ! -f mkworddic/dict.args.in-orig ]; then
83 cp -a mkworddic/dict.args.in{,-orig}
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
103 set_dict_encoding utf8
104 read_uc @top_srcdir@/mkworddic/udict.utf8
108 touch -r mkworddic/dict.args.in{-orig,}
113 --with-lispdir=%{_lispdir}
118 rm -rf $RPM_BUILD_ROOT
121 DESTDIR=$RPM_BUILD_ROOT \
126 # (assume that) obsoleted by pkg-config
127 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libanthy*.la
130 rm -rf $RPM_BUILD_ROOT
132 %post -p /sbin/ldconfig
133 %postun -p /sbin/ldconfig
136 %defattr(644,root,root,755)
137 %doc AUTHORS ChangeLog DIARY NEWS README doc/[!M]* doc/MISC
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
147 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/anthy-conf
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_libdir}/libanthy.so
153 %attr(755,root,root) %{_libdir}/libanthydic.so
154 %attr(755,root,root) %{_libdir}/libanthyinput.so
156 %{_pkgconfigdir}/anthy.pc
159 %defattr(644,root,root,755)
160 %{_libdir}/libanthy.a
161 %{_libdir}/libanthydic.a
162 %{_libdir}/libanthyinput.a
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
170 %{_lispdir}/anthy/anthy*.elc