]> git.pld-linux.org Git - packages/anthy.git/blob - anthy.spec
- updated URL
[packages/anthy.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 #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}
19 BuildRequires:  iconv
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 A Japanese character input system library (with dictionary).
24
25 %description -l pl.UTF-8
26 System wprowadzania znaków japońskich (ze słownikiem).
27
28 %package devel
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}
33
34 %description devel
35 Header files for anthy libraries.
36
37 %description devel -l pl.UTF-8
38 Pliki nagłówkowe bibliotek anthy.
39
40 %package static
41 Summary:        Static anthy libraries
42 Summary(pl.UTF-8):      Statyczne biblioteki anthy
43 Group:          Development/Libraries
44 Requires:       %{name}-devel = %{version}-%{release}
45
46 %description static
47 Static anthy libraries.
48
49 %description static -l pl.UTF-8
50 Statyczne biblioteki anthy.
51
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
65 %prep
66 %setup -q
67
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
112 %build
113 %configure \
114         --with-lispdir=%{_lispdir}
115
116 %{__make}
117
118 %install
119 rm -rf $RPM_BUILD_ROOT
120
121 %{__make} install \
122         DESTDIR=$RPM_BUILD_ROOT \
123 %if %{without emacs}
124         EMACS=/bin/true
125 %endif
126
127 # (assume that) obsoleted by pkg-config
128 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libanthy*.la
129
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
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
149 %{_datadir}/anthy
150
151 %files devel
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
156 %{_includedir}/anthy
157 %{_pkgconfigdir}/anthy.pc
158
159 %files static
160 %defattr(644,root,root,755)
161 %{_libdir}/libanthy.a
162 %{_libdir}/libanthydic.a
163 %{_libdir}/libanthyinput.a
164
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
172 %endif
This page took 0.080018 seconds and 4 git commands to generate.