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 #Source0Download: https://osdn.net/projects/anthy/
14 Source0: http://dl.sourceforge.jp/anthy/37536/%{name}-%{version}.tar.gz
15 # Source0-md5: 1f558ff7ed296787b55bb1c6cf131108
16 URL: http://anthy.osdn.jp/
17 BuildRequires: automake
18 %{?with_emacs:BuildRequires: emacs}
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 A Japanese character input system library (with dictionary).
25 %description -l pl.UTF-8
26 System wprowadzania znaków japońskich (ze słownikiem).
29 Summary: Header files for anthy libraries
30 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek anthy
31 Group: Development/Libraries
32 Requires: %{name} = %{version}-%{release}
35 Header files for anthy libraries.
37 %description devel -l pl.UTF-8
38 Pliki nagłówkowe bibliotek anthy.
41 Summary: Static anthy libraries
42 Summary(pl.UTF-8): Statyczne biblioteki anthy
43 Group: Development/Libraries
44 Requires: %{name}-devel = %{version}-%{release}
47 Static anthy libraries.
49 %description static -l pl.UTF-8
50 Statyczne biblioteki anthy.
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}
59 %description -n emacs-anthy
62 %description -n emacs-anthy -l pl.UTF-8
63 Pakiet anthy dla Emacsa.
70 for i in gcanna.ctd gcannaf.ctd gtankan.ctd; do
71 iconv -f euc-jp -t utf-8 $i > $i.utf8
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
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
83 if [ ! -f mkworddic/dict.args.in-orig ]; then
84 cp -a mkworddic/dict.args.in{,-orig}
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
104 set_dict_encoding utf8
105 read_uc @top_srcdir@/mkworddic/udict.utf8
109 touch -r mkworddic/dict.args.in{-orig,}
114 --with-lispdir=%{_lispdir}
119 rm -rf $RPM_BUILD_ROOT
122 DESTDIR=$RPM_BUILD_ROOT \
127 # (assume that) obsoleted by pkg-config
128 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libanthy*.la
131 rm -rf $RPM_BUILD_ROOT
133 %post -p /sbin/ldconfig
134 %postun -p /sbin/ldconfig
137 %defattr(644,root,root,755)
138 %doc AUTHORS ChangeLog DIARY NEWS README doc/[!M]* doc/MISC
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
148 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/anthy-conf
152 %defattr(644,root,root,755)
153 %attr(755,root,root) %{_libdir}/libanthy.so
154 %attr(755,root,root) %{_libdir}/libanthydic.so
155 %attr(755,root,root) %{_libdir}/libanthyinput.so
157 %{_pkgconfigdir}/anthy.pc
160 %defattr(644,root,root,755)
161 %{_libdir}/libanthy.a
162 %{_libdir}/libanthydic.a
163 %{_libdir}/libanthyinput.a
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
171 %{_lispdir}/anthy/anthy*.elc