]>
Commit | Line | Data |
---|---|---|
48709482 JR |
1 | # |
2 | # Conditional build: | |
3bd298d3 JB |
3 | %bcond_without bridge_hotkey # disable the engine hotkeys |
4 | %bcond_without swig # swig based python-anthy library | |
48709482 JR |
5 | # |
6 | Summary: The Anthy engine for IBus input platform | |
a27946f1 | 7 | Summary(pl.UTF-8): Silnik Anthy dla platformy wprowadzania znaków IBus |
48709482 | 8 | Name: ibus-anthy |
3bd298d3 | 9 | Version: 1.5.9 |
2edddde7 | 10 | Release: 1 |
48709482 JR |
11 | License: GPL v2+ |
12 | Group: Libraries | |
d5234070 | 13 | #Source0Download: https://github.com/ibus/ibus-anthy/releases |
2edddde7 | 14 | Source0: https://github.com/ibus/ibus-anthy/archive/%{version}/%{name}-%{version}.tar.gz |
3bd298d3 | 15 | # Source0-md5: 57f560e080b0d78b581493535dda78ec |
2edddde7 | 16 | URL: https://github.com/fujiwarat/ibus-anthy/wiki |
48709482 | 17 | BuildRequires: anthy-devel |
a27946f1 | 18 | BuildRequires: autoconf >= 2.50 |
2edddde7 | 19 | BuildRequires: automake >= 1:1.10 |
391eb544 | 20 | BuildRequires: gettext-tools >= 0.16.1 |
1b0108ab JB |
21 | BuildRequires: glib2-devel >= 1:2.26.0 |
22 | BuildRequires: gobject-introspection-devel >= 0.6.8 | |
2edddde7 | 23 | BuildRequires: ibus-devel >= 1.5 |
358e5204 | 24 | BuildRequires: intltool >= 0.41.1 |
a27946f1 | 25 | BuildRequires: libstdc++-devel |
48709482 | 26 | BuildRequires: pkgconfig |
a27946f1 JB |
27 | BuildRequires: python-devel >= 1:2.5 |
28 | BuildRequires: rpmbuild(macros) >= 1.219 | |
29 | BuildRequires: sed >= 4.0 | |
3bd298d3 JB |
30 | %{?with_swig:BuildRequires: swig-python} |
31 | Requires(post,postun): gtk-update-icon-cache | |
eeffd8d5 | 32 | Requires: %{name}-libs = %{version}-%{release} |
48709482 | 33 | Requires: anthy |
3bd298d3 | 34 | Requires: hicolor-icon-theme |
2edddde7 | 35 | Requires: ibus >= 1.5 |
48709482 | 36 | Requires: kasumi |
2edddde7 | 37 | Requires: python-ibus >= 1.5 |
48709482 JR |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
bda702e9 JR |
40 | %define _libexecdir %{_libdir}/ibus |
41 | ||
48709482 JR |
42 | %description |
43 | The Anthy engine for IBus platform. It provides Japanese input method | |
44 | from libanthy. | |
45 | ||
a27946f1 JB |
46 | %description -l pl.UTF-8 |
47 | Silnik Anthy dla platformy IBus. Udostępnia metodę wprowadzania znaków | |
48 | japońskich poprzez libanthy. | |
49 | ||
eeffd8d5 JB |
50 | %package libs |
51 | Summary: Shared Anthy GObject library | |
52 | Summary(pl.UTF-8): Biblioteka współdzielona Anthy GObject | |
53 | Group: Libraries | |
54 | Requires: glib2 >= 1:2.26.0 | |
55 | Conflicts: ibus-anthy < 1.4.99.20121006-5 | |
56 | ||
57 | %description libs | |
58 | Shared Anthy GObject library. | |
59 | ||
60 | %description libs -l pl.UTF-8 | |
61 | Biblioteka współdzielona Anthy GObject. | |
62 | ||
0355600f | 63 | %package devel |
1b0108ab JB |
64 | Summary: Header files for Anthy GObject library |
65 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Anthy GObject | |
0355600f | 66 | Group: Development/Libraries |
eeffd8d5 | 67 | Requires: %{name}-libs = %{version}-%{release} |
0355600f | 68 | Requires: anthy-devel |
1b0108ab | 69 | Requires: glib2-devel >= 1:2.26.0 |
0355600f JR |
70 | |
71 | %description devel | |
1b0108ab JB |
72 | Header files for Anthy GObject library. |
73 | ||
74 | %description devel -l pl.UTF-8 | |
75 | Pliki nagłówkowe biblioteki Anthy GObject. | |
0355600f | 76 | |
3bd298d3 JB |
77 | %package -n python-anthy |
78 | Summary: SWIG based Python interface to Anthy library | |
79 | Summary(pl.UTF-8): Oparty na SWIG-u pythonowy interfejs do biblioteki Anthy | |
80 | Group: Libraries/Python | |
81 | Requires: python-libs >= 1:2.5 | |
82 | ||
83 | %description -n python-anthy | |
84 | SWIG based Python interface to Anthy library. | |
85 | ||
86 | %description -n python-anthy -l pl.UTF-8 | |
87 | Oparty na SWIG-u pythonowy interfejs do biblioteki Anthy. | |
88 | ||
48709482 JR |
89 | %prep |
90 | %setup -q | |
a27946f1 | 91 | |
0355600f | 92 | # ibus 1.4.x has symbol attr in EngineDesc; |
2edddde7 | 93 | # ibus 1.4.99/1.5+ has symbol attr in IBus.Property |
0355600f | 94 | # hardcode it so python-ibus is not BRed here |
a27946f1 | 95 | %{__sed} -i -e 's,\$SYMBOL_TEST,exit(0),' configure.ac |
48709482 | 96 | |
2edddde7 JB |
97 | # gettextize will add it again |
98 | %{__sed} -i -e '/AC_CONFIG_FILES/s@ po/Makefile\.in@@' configure.ac | |
99 | ||
48709482 | 100 | %build |
2edddde7 JB |
101 | %{__gettextize} |
102 | %{__intltoolize} | |
103 | %{__libtoolize} | |
89c492ae | 104 | %{__aclocal} |
48709482 | 105 | %{__autoconf} |
2edddde7 | 106 | %{__autoheader} |
89c492ae | 107 | %{__automake} |
48709482 | 108 | %configure \ |
3bd298d3 | 109 | %{?with_swig:--enable-pygtk2-anthy} \ |
0355600f | 110 | --with-layout='default' \ |
2bd6712e | 111 | %{?with_bridge_hotkey:--with-hotkeys} |
48709482 JR |
112 | |
113 | %{__make} | |
114 | ||
115 | %install | |
116 | rm -rf $RPM_BUILD_ROOT | |
117 | %{__make} install \ | |
118 | DESTDIR=$RPM_BUILD_ROOT | |
119 | ||
0355600f | 120 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la |
3bd298d3 JB |
121 | %if %{with swig} |
122 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_anthy.la | |
123 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
124 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
125 | %py_postclean | |
126 | %endif | |
a27946f1 | 127 | |
48709482 JR |
128 | %find_lang %{name} |
129 | ||
130 | %clean | |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
0355600f | 133 | %post |
0355600f JR |
134 | %update_icon_cache hicolor |
135 | ||
136 | %postun | |
0355600f JR |
137 | %update_icon_cache hicolor |
138 | ||
eeffd8d5 JB |
139 | %post libs -p /sbin/ldconfig |
140 | %postun libs -p /sbin/ldconfig | |
141 | ||
48709482 JR |
142 | %files -f %{name}.lang |
143 | %defattr(644,root,root,755) | |
3bd298d3 | 144 | %doc AUTHORS README |
a27946f1 JB |
145 | %attr(755,root,root) %{_libexecdir}/ibus-engine-anthy |
146 | %attr(755,root,root) %{_libexecdir}/ibus-setup-anthy | |
3bd298d3 | 147 | %{_datadir}/appdata/ibus-anthy.appdata.xml |
48709482 | 148 | %{_datadir}/ibus-anthy |
a27946f1 | 149 | %{_datadir}/ibus/component/anthy.xml |
eeffd8d5 JB |
150 | %{_desktopdir}/ibus-setup-anthy.desktop |
151 | %{_iconsdir}/hicolor/scalable/apps/ibus-anthy.svg | |
152 | ||
153 | %files libs | |
154 | %defattr(644,root,root,755) | |
0355600f JR |
155 | %attr(755,root,root) %{_libdir}/libanthygobject-1.0.so.*.* |
156 | %attr(755,root,root) %ghost %{_libdir}/libanthygobject-1.0.so.5 | |
1b0108ab | 157 | %{_libdir}/girepository-1.0/Anthy-9000.typelib |
0355600f JR |
158 | |
159 | %files devel | |
160 | %defattr(644,root,root,755) | |
0355600f | 161 | %attr(755,root,root) %{_libdir}/libanthygobject-1.0.so |
1b0108ab JB |
162 | %{_includedir}/ibus-anthy-1.0 |
163 | %{_datadir}/gir-1.0/Anthy-9000.gir | |
3bd298d3 JB |
164 | |
165 | %if %{with swig} | |
166 | %files -n python-anthy | |
167 | %defattr(644,root,root,755) | |
168 | %attr(755,root,root) %{py_sitedir}/_anthy.so | |
169 | %{py_sitedir}/anthy.py[co] | |
170 | %endif |