]> git.pld-linux.org Git - SPECS.git/blob - anthy.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / anthy.spec
1 #
2 # Conditional build:
3 %bcond_without  emacs   # Emacs-compiled elisp
4 %bcond_without  utf8    # euc-jp dict
5 #
6 Summary:        A Japanese character input system library (with dictionary)
7 Summary(pl.UTF-8):      System wprowadzania znaków japońskich (ze słownikiem)
8 Name:           anthy
9 Version:        9100h
10 Release:        4
11 License:        LGPL v2+ (library), GPL (dictionary)
12 Group:          Libraries
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}
18 BuildRequires:  iconv
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
22 A Japanese character input system library (with dictionary).
23
24 %description -l pl.UTF-8
25 System wprowadzania znaków japońskich (ze słownikiem).
26
27 %package devel
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}
32
33 %description devel
34 Header files for anthy libraries.
35
36 %description devel -l pl.UTF-8
37 Pliki nagłówkowe bibliotek anthy.
38
39 %package static
40 Summary:        Static anthy libraries
41 Summary(pl.UTF-8):      Statyczne biblioteki anthy
42 Group:          Development/Libraries
43 Requires:       %{name}-devel = %{version}-%{release}
44
45 %description static
46 Static anthy libraries.
47
48 %description static -l pl.UTF-8
49 Statyczne biblioteki anthy.
50
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
64 %prep
65 %setup -q
66
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
111 %build
112 %configure \
113         --with-lispdir=%{_lispdir}
114
115 %{__make}
116
117 %install
118 rm -rf $RPM_BUILD_ROOT
119
120 %{__make} install \
121         DESTDIR=$RPM_BUILD_ROOT \
122 %if %{without emacs}
123         EMACS=/bin/true
124 %endif
125
126 # (assume that) obsoleted by pkg-config
127 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libanthy*.la
128
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
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
148 %{_datadir}/anthy
149
150 %files devel
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
155 %{_includedir}/anthy
156 %{_pkgconfigdir}/anthy.pc
157
158 %files static
159 %defattr(644,root,root,755)
160 %{_libdir}/libanthy.a
161 %{_libdir}/libanthydic.a
162 %{_libdir}/libanthyinput.a
163
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
171 %endif
This page took 0.043845 seconds and 3 git commands to generate.