]>
Commit | Line | Data |
---|---|---|
1d585ba9 JR |
1 | # |
2 | # TODO: | |
3 | # - emacs mode | |
4 | # | |
6db98b55 JR |
5 | # Conditional build: |
6 | %bcond_without utf8 # build euc-jp dict | |
7 | # | |
5fd37ea9 | 8 | Summary: A Japanese character input system library (with dictionary) |
bac22c19 | 9 | Summary(pl.UTF-8): System wprowadzania znaków japońskich (ze słownikiem) |
5fd37ea9 | 10 | Name: anthy |
a4a3dfb5 | 11 | Version: 9100h |
6db98b55 | 12 | Release: 2 |
5fd37ea9 JB |
13 | License: GPL |
14 | Group: Libraries | |
a4a3dfb5 JR |
15 | Source0: http://dl.sourceforge.jp/anthy/37536/%{name}-%{version}.tar.gz |
16 | # Source0-md5: 1f558ff7ed296787b55bb1c6cf131108 | |
5fd37ea9 | 17 | URL: http://anthy.sourceforge.jp/ |
5fd37ea9 | 18 | BuildRequires: automake |
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 | ||
52 | %prep | |
53 | %setup -q | |
5fd37ea9 | 54 | |
6db98b55 JR |
55 | %if %{with utf8} |
56 | cd alt-cannadic | |
57 | for i in gcanna.ctd gcannaf.ctd gtankan.ctd; do | |
58 | iconv -f euc-jp -t utf-8 $i > $i.utf8 | |
59 | done | |
60 | cd extra | |
61 | 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 | |
62 | sed -e 's/^\([^ ]*\)t[ ]*\(#[A-Z0-9\*]*\)[ ]*\([^ ]*\)$/\1 \2 \3/g' $i > $i.norm | |
63 | done | |
64 | cd ../../mkworddic | |
65 | for i in adjust.t compound.t extra.t udict zipcode.t; do | |
66 | iconv -f euc-jp -t utf-8 $i > $i.utf8 | |
67 | done | |
68 | cd .. | |
69 | ||
70 | if [ ! -f mkworddic/dict.args.in-orig ]; then | |
71 | cp -a mkworddic/dict.args.in{,-orig} | |
72 | fi | |
73 | ||
74 | cat <<_EOF_ > mkworddic/dict.args.in | |
75 | # Generated by rpm script | |
76 | set_input_encoding utf8 | |
77 | read @top_srcdir@/alt-cannadic/gcanna.ctd.utf8 | |
78 | read @top_srcdir@/alt-cannadic/gcannaf.ctd.utf8 | |
79 | read @top_srcdir@/alt-cannadic/gtankan.ctd.utf8 | |
80 | read @top_srcdir@/alt-cannadic/extra/g-jiritu-34.t.norm | |
81 | read @top_srcdir@/alt-cannadic/extra/gc-fullname-34.t.norm | |
82 | read @top_srcdir@/alt-cannadic/extra/gt-tankanji_kanji-34.t.norm | |
83 | read @top_srcdir@/alt-cannadic/extra/gt-tankanji_hikanji-34.t.norm | |
84 | read @top_srcdir@/alt-cannadic/extra/gf-fuzoku-34.t.norm | |
85 | read @top_srcdir@/mkworddic/adjust.t.utf8 | |
86 | read @top_srcdir@/mkworddic/compound.t.utf8 | |
87 | read @top_srcdir@/mkworddic/extra.t.utf8 | |
88 | read @top_srcdir@/alt-cannadic/g_fname.t | |
89 | # | |
90 | build_reverse_dict | |
91 | set_dict_encoding utf8 | |
92 | read_uc @top_srcdir@/mkworddic/udict.utf8 | |
93 | write anthy.wdic | |
94 | done | |
95 | _EOF_ | |
96 | touch -r mkworddic/dict.args.in{-orig,} | |
97 | %endif | |
98 | ||
5fd37ea9 | 99 | %build |
5fd37ea9 JB |
100 | %configure |
101 | %{__make} | |
102 | ||
103 | %install | |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %{__make} install \ | |
107 | DESTDIR=$RPM_BUILD_ROOT | |
108 | ||
99c108c7 JB |
109 | # (assume that) obsoleted by pkg-config |
110 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libanthy*.la | |
111 | ||
5fd37ea9 JB |
112 | %clean |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
115 | %post -p /sbin/ldconfig | |
116 | %postun -p /sbin/ldconfig | |
117 | ||
118 | %files | |
119 | %defattr(644,root,root,755) | |
120 | %doc AUTHORS ChangeLog DIARY NEWS README doc/[!M]* doc/MISC | |
99c108c7 JB |
121 | %attr(755,root,root) %{_bindir}/anthy-agent |
122 | %attr(755,root,root) %{_bindir}/anthy-dic-tool | |
123 | %attr(755,root,root) %{_bindir}/anthy-morphological-analyzer | |
124 | %attr(755,root,root) %{_libdir}/libanthy.so.*.*.* | |
125 | %attr(755,root,root) %ghost %{_libdir}/libanthy.so.0 | |
126 | %attr(755,root,root) %{_libdir}/libanthydic.so.*.*.* | |
127 | %attr(755,root,root) %ghost %{_libdir}/libanthydic.so.0 | |
128 | %attr(755,root,root) %{_libdir}/libanthyinput.so.*.*.* | |
129 | %attr(755,root,root) %ghost %{_libdir}/libanthyinput.so.0 | |
401c9958 | 130 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/anthy-conf |
5fd37ea9 JB |
131 | %{_datadir}/anthy |
132 | ||
133 | %files devel | |
134 | %defattr(644,root,root,755) | |
99c108c7 JB |
135 | %attr(755,root,root) %{_libdir}/libanthy.so |
136 | %attr(755,root,root) %{_libdir}/libanthydic.so | |
137 | %attr(755,root,root) %{_libdir}/libanthyinput.so | |
5fd37ea9 | 138 | %{_includedir}/anthy |
a4a3dfb5 | 139 | %{_pkgconfigdir}/anthy.pc |
5fd37ea9 JB |
140 | |
141 | %files static | |
142 | %defattr(644,root,root,755) | |
99c108c7 JB |
143 | %{_libdir}/libanthy.a |
144 | %{_libdir}/libanthydic.a | |
145 | %{_libdir}/libanthyinput.a | |
1d585ba9 JR |
146 | |
147 | # /usr/share/emacs/site-lisp/anthy/anthy-azik.el | |
148 | # /usr/share/emacs/site-lisp/anthy/anthy-azik.elc | |
149 | # /usr/share/emacs/site-lisp/anthy/anthy-conf.el | |
150 | # /usr/share/emacs/site-lisp/anthy/anthy-conf.elc | |
151 | # /usr/share/emacs/site-lisp/anthy/anthy-dic.el | |
152 | # /usr/share/emacs/site-lisp/anthy/anthy-dic.elc | |
153 | # /usr/share/emacs/site-lisp/anthy/anthy-isearch.el | |
154 | # /usr/share/emacs/site-lisp/anthy/anthy-isearch.elc | |
155 | # /usr/share/emacs/site-lisp/anthy/anthy-kyuri.el | |
156 | # /usr/share/emacs/site-lisp/anthy/anthy-kyuri.elc | |
157 | # /usr/share/emacs/site-lisp/anthy/anthy.el | |
158 | # /usr/share/emacs/site-lisp/anthy/anthy.elc | |
159 | # /usr/share/emacs/site-lisp/anthy/leim-list.el |