ibus-vl.spec 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  1. %define snapshot 20110817
  2. %define ver 1.3.99.%{snapshot}
  3. %define rel 1
  4. %if "%{?_dist_release}" >= "vl7"
  5. %define have_gjsfile 1
  6. %define have_libxkbfile 1
  7. %else
  8. %define have_gjsfile 0
  9. %define have_xkbfile 0
  10. %endif
  11. %define ibus_api_version 1.0
  12. Summary: Intelligent Input Bus for Linux / Unix OS
  13. Name: ibus
  14. Version: %{ver}
  15. Release: %{rel}%{?_dist_release}
  16. License: LGPL
  17. Group: System Environment/Libraries
  18. URL: http://code.google.com/p/ibus/
  19. Source0: %{name}-%{version}.tar.gz
  20. Source1: http://fujiwara.fedorapeople.org/ibus/gnome-shell/ibus-gjs-1.3.99.20110814.tar.gz
  21. Patch1: ibus-530711-preload-sys.patch
  22. Patch4: ibus-541492-xkb.patch
  23. # add Shift+space as trigger key instead of Ctrl+space
  24. Patch20: ibus-1.3.9-vine.patch
  25. Requires: gtk2, pyxdg, iso-codes, dbus-python >= 0.83.0
  26. Requires: notify-python
  27. Requires: librsvg2
  28. Requires(pre): GConf2
  29. Requires(post): GConf2
  30. Requires(preun): GConf2
  31. Requires(post): glib2
  32. Requires(post,postun): coreutils, gtk2
  33. BuildRequires(install,check): desktop-file-utils
  34. BuildRequires: gettext >= 0.16.1, gtk2-devel, intltool >= 0.40.0
  35. BuildRequires: dbus-devel, dbus-python-devel >= 0.83.0
  36. BuildRequires: glib2-devel >= 2.0.0
  37. %if %{?_dist_release} != "vl5"
  38. BuildRequires: gtk3-devel >= 3.0.0
  39. %endif
  40. %if %have_gjsfile
  41. BuildRequires: gjs
  42. BuildRequires: gnome-shell
  43. %endif
  44. %if %have_libxkbfile
  45. BuildRequires: libxkbfile-devel
  46. %endif
  47. BuildRequires: GConf2-devel >= 2.12
  48. BuildRequires: perl >= 5.8.1 perl-XML-Parser
  49. Buildrequires: python >= 2.5
  50. Buildroot: %{_tmppath}/%{name}-%{version}-root
  51. Provides: iBus
  52. Vendor: Project Vine
  53. Distribution: Vine Linux
  54. Packager: iwaim
  55. %description
  56. IBus is an Intelligent Input Bus. It is a new input framework for Linux OS.
  57. It provides full featured and user friendly input method user interface.
  58. It also may help developers to develop input method easily.
  59. %package devel
  60. Summary: Header files for iBus
  61. Group: Development/Libraries
  62. Requires: ibus == %{version}-%{release}
  63. Requires: glib2-devel
  64. Requires: dbus-devel
  65. Requires: vala
  66. %description devel
  67. Header files for iBus.
  68. %package gtk3
  69. Summary: IBus im module for gtk3
  70. Summary(ja): gtk3 用 IBus IMモジュール
  71. Group: System Environment/Libraries
  72. Requires: %{name} = %{version}-%{release}
  73. Requires(post): glib2
  74. %description gtk3
  75. The ibus-gtk3 contains ibus im module for gtk3.
  76. %package gnome3
  77. Summary: IBus gnome-shell-extension for GNOME3
  78. Summary(ja): GNOME3 用 IBus gnome-shell 拡張
  79. Group: System Environment/Libraries
  80. Requires: %{name} = %{version}-%{release}
  81. Requires: gnome-shell
  82. %description gnome3
  83. This is a transitional package which allows users to try out new IBus
  84. GUI for GNOME3 in development. Note that this package will be marked
  85. as obsolete once the integration has completed in the GNOME3 upstream.
  86. %prep
  87. %setup -q
  88. %if %have_gjsfile
  89. zcat %SOURCE1 | tar xf -
  90. %endif
  91. %patch1 -p1 -b .preload-sys
  92. %if %have_libxkbfile
  93. %patch4 -p1 -b .xkb
  94. %endif
  95. %patch20 -p1 -b .vine
  96. %if %have_libxkbfile
  97. aclocal -I m4
  98. autoheader
  99. autoconf -f
  100. automake -a -c -f
  101. %endif
  102. %configure \
  103. --disable-static \
  104. %if %{?_dist_release} != "vl5"
  105. --enable-gtk3 \
  106. %endif
  107. --enable-gtk2 \
  108. --with-gtk2-im-module-dir=%{_libdir}/gtk-2.0/immodules \
  109. --enable-xim \
  110. --disable-gtk-doc \
  111. --with-no-snooper-apps='gnome-do,Do.*,firefox.*,:*chrome.*,.*chromium.*' \
  112. --enable-surrounding-text \
  113. --enable-introspection
  114. %build
  115. make %{?_smp_mflags}
  116. %if %have_gjsfile
  117. d=`basename %SOURCE1 .tar.gz`
  118. cd $d
  119. export PKG_CONFIG_PATH=..:/usr/lib64/pkgconfig:/usr/lib/pkgconfig
  120. %configure
  121. make %{?_smp_mflags}
  122. cd ..
  123. %endif
  124. %install
  125. rm -rf %{buildroot}
  126. make DESTDIR=%{buildroot} install
  127. rm -rf %{buildroot}%{_libdir}/libibus-%{ibus_api_version}.la
  128. rm -rf %{buildroot}%{_libdir}/gtk-2.0/immodules/im-ibus.la
  129. %if %{?_dist_release} != "vl5"
  130. rm -rf %{buildroot}%{_libdir}/gtk-3.0/3.0.0/immodules/im-ibus.la
  131. %endif
  132. %{_bindir}/desktop-file-install \
  133. --vendor="" --dir=%{buildroot}/%{_datadir}/applications \
  134. --add-category=Applications \
  135. --add-category=X-GNOME-PersonalSettings \
  136. %{buildroot}/%{_datadir}/applications/ibus-setup.desktop
  137. rm -rf %{buildroot}%{_sysconfdir}/xdg/autostart/ibus.desktop
  138. %if %have_gjsfile
  139. # https://bugzilla.redhat.com/show_bug.cgi?id=657165
  140. d=`basename %SOURCE1 .tar.gz`
  141. cd $d
  142. make DESTDIR=$RPM_BUILD_ROOT install
  143. rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/ibus-gjs.mo
  144. cd ..
  145. %endif
  146. %find_lang %{name}10
  147. %clean
  148. rm -rf %{buildroot}
  149. %check
  150. #make check
  151. %{_bindir}/desktop-file-validate %{buildroot}/%{_datadir}/applications/ibus.desktop
  152. %{_bindir}/desktop-file-validate %{buildroot}/%{_datadir}/applications/ibus-setup.desktop
  153. %post
  154. /sbin/ldconfig
  155. if [ -x %{_bindir}/update-desktop-database ] ; then
  156. %{_bindir}/update-desktop-database %{_datadir}/applications -q
  157. fi
  158. %{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/%{_arch}/gtk.immodules
  159. export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  160. gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
  161. # recreate icon cache
  162. touch --no-create %{_datadir}/icons/hicolor || :
  163. [ -x %{_bindir}/gtk-update-icon-cache ] && \
  164. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  165. %pre
  166. if [ "$1" -gt 1 ]; then
  167. export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  168. gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
  169. fi
  170. %preun
  171. if [ "$1" -eq 0 ]; then
  172. export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  173. gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas >& /dev/null || :
  174. fi
  175. %postun
  176. /sbin/ldconfig
  177. %{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/%{_arch}/gtk.immodules
  178. if [ -x %{_bindir}/update-desktop-database ] ; then
  179. %{_bindir}/update-desktop-database %{_datadir}/applications -q
  180. fi
  181. # recreate icon cache
  182. touch --no-create %{_datadir}/icons/hicolor || :
  183. [ -x %{_bindir}/gtk-update-icon-cache ] && \
  184. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  185. %if %{?_dist_release} != "vl5"
  186. %post gtk3
  187. %{_bindir}/gtk-query-immodules-3.0 --update-cache
  188. %postun gtk3
  189. %{_bindir}/gtk-query-immodules-3.0 --update-cache
  190. %endif
  191. %files -f %{name}10.lang
  192. %defattr(-,root,root,-)
  193. %doc AUTHORS COPYING ChangeLog NEWS README
  194. %{_bindir}/ibus*
  195. %{_libdir}/libibus-%{ibus_api_version}.so.*
  196. %{_libdir}/gtk-2.0/immodules/im-ibus.so
  197. %{_libexecdir}/ibus-gconf
  198. %{_libexecdir}/ibus-ui-gtk
  199. %{_libexecdir}/ibus-x11
  200. #%{python_sitearch}/ibus
  201. %{python_sitelib}/ibus
  202. %{_datadir}/applications/*
  203. %{_datadir}/ibus
  204. %{_datadir}/gtk-doc/html/ibus
  205. %{_datadir}/icons/hicolor/*/apps/*
  206. #%{_sysconfdir}/xdg/autostart/ibus.desktop
  207. %{_sysconfdir}/gconf/schemas/ibus.schemas
  208. %if %have_libxkbfile
  209. %{_libexecdir}/ibus-engine-xkb
  210. %{_libexecdir}/ibus-xkb
  211. %endif
  212. %files devel
  213. %defattr(-,root,root,-)
  214. %{_libdir}/pkgconfig/*
  215. %{_libdir}/lib*.so
  216. %{_includedir}/*
  217. %{_datadir}/vala/vapi/ibus-1.0.vapi
  218. %{_datadir}/vala/vapi/ibus-1.0.deps
  219. %if %{?_dist_release} != "vl5"
  220. %{_libdir}/girepository-1.0/IBus-1.0.typelib
  221. %{_datadir}/gir-1.0/IBus-1.0.gir
  222. %endif
  223. %if %{?_dist_release} != "vl5"
  224. %files gtk3
  225. %defattr(-,root,root,-)
  226. %{_libdir}/gtk-3.0/3.0.0/immodules/im-ibus.so
  227. %endif
  228. %if %have_gjsfile
  229. %files gnome3
  230. %defattr(-,root,root,-)
  231. %{_datadir}/gnome-shell/js/ui/status/ibus
  232. %{_datadir}/gnome-shell/extensions/ibus-indicator@example.com
  233. %endif
  234. %changelog
  235. * Tue Aug 23 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3.99.20110817-1
  236. - update to upstream snapshot (1.3.99.20110817)
  237. - add ibus-gjs for gnome3
  238. - update patches
  239. * Thu Jun 02 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3.9-5
  240. - add patch1 from ubuntu (accepted in upstream)
  241. Use LC_MESSAGES instead of LC_ALL in bus_ibus_impl_set_default_preload_engines.
  242. - add "Catgegories=Applications;X-GNOME-PersonalSettings" to ibus-setup.desktop
  243. - add patch10 to add default preload engines to gconf schemas
  244. - add patch20 to modify IM trigger shortcut keys
  245. - add Shift+space, remove Ctrl+space
  246. * Tue Apr 19 2011 IWAI, Masaharu <iwai@alib.jp> 1.3.9-4vl6
  247. - drop {post,postun} script for gtk3 immodules in main package
  248. * Fri Apr 8 2011 IWAI, Masaharu <iwai@alib.jp> 1.3.9-3vl6
  249. - drop GTK3 immodule file in main package
  250. * Fri Feb 18 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.3.9-2
  251. - create -gtk3 sub package (VineSeed only)
  252. * Wed Dec 15 2010 IWAI, Masaharu <iwai@alib.jp> 1.3.9-1
  253. - new upstream release
  254. - add files in devel sub package for VineSeed
  255. - girepository-1.0/IBus-1.0.typelib
  256. - gir-1.0/IBus-1.0.gir
  257. * Mon Sep 27 2010 Shu KONNO <owa@bg.wakwak.com> 1.3.7-2
  258. - rebuilt with rpm-4.8.1 for pkg-config
  259. * Mon Aug 9 2010 IWAI, Masaharu <iwai@alib.jp> 1.3.7-1
  260. - new upstream release
  261. - add support Vala on Vine Linux 5
  262. * Fri Jul 9 2010 IWAI, Masaharu <iwai@alib.jp> 1.3.6-1
  263. - new upstream release
  264. * Tue Jun 15 2010 IWAI, Masaharu <iwai@alib.jp> 1.3.5-1
  265. - new upstream release
  266. - update GTK immodule dir option for configure
  267. - add vapi file for VineSeed
  268. - add Requires: vala for devel package, VineSeed
  269. * Wed Jun 9 2010 IWAI, Masaharu <iwai@alib.jp> 1.3.4-2
  270. - update Requires: notify-python librsvg2
  271. - execute gconftool-2 on {post,pre,preun}
  272. - add Requires: Gconf2 on {post,pre,preun}
  273. - update Requires: glib2-devel dbus-devel for ibus-devel package
  274. - execute update-desktop-database on {post,postun}
  275. - execute gtk-update-icon-cache on {post,postun}: <BTS:VineLinux:955>
  276. - add Requires: coreutils, gtk2 on {post,postun}
  277. - drop %%{_sysconfdir}/xdg/autostart/ibus.desktop file
  278. * Sun Jun 6 2010 IWAI, Masaharu <iwai@alib.jp> 1.3.4-1
  279. - new upstream release
  280. - stop 'make check'
  281. * Tue May 25 2010 Shu KONNO <owa@bg.wakwak.com> 1.3.3-2
  282. - s/python_sitearch/python_sitelib/
  283. * Sat May 15 2010 IWAI, Masaharu <iwai@alib.jp> 1.3.3-1
  284. - new upstream release
  285. - execute 'make check'
  286. - clean up:
  287. - drop unused git_source and vine_ja_po
  288. * Fri Apr 16 2010 IWAI, Masaharu <iwai@alib.jp> 1.2.1-1
  289. - new upstream release
  290. - stop 'make check'
  291. * Mon Jan 25 2010 IWAI, Masaharu <iwai@alib.jp> 1.2.0.20091215-2
  292. - add BuildRequires: GConf2-devel >= 2.12: fix <BTS:VineLinux:901>
  293. * Fri Dec 18 2009 IWAI, Masaharu <iwai@alib.jp> 1.2.0.20091215-1
  294. - new upstream release
  295. * Sat Dec 5 2009 IWAI, Masaharu <iwai@alib.jp> 1.2.0.20091204-1
  296. - new upstream release
  297. * Sun Nov 29 2009 IWAI, Masaharu <iwai@alib.jp> 1.2.0.20091124-1
  298. - new upstream release
  299. * Wed Nov 4 2009 IWAI, Masaharu <iwai@alib.jp> 1.2.0.20091024-1
  300. - new upstream release
  301. - add fix POFILES.in patch (Patch0)
  302. - update file list in %%files section
  303. - running ldconfig and gtk-query-immodules-2.0 in %%post and %%postun
  304. * Thu Oct 8 2009 IWAI, Masaharu <iwai@alib.jp> 1.2.0.20090927-1
  305. - new upstream release
  306. * Thu Sep 17 2009 IWAI, Masaharu <iwai@alib.jp> 1.2.0.20090915-1
  307. - new upstream release
  308. - update %%files section
  309. - update BuildRequires
  310. - drop obsoleted configure option: --disable-qt4-immodule
  311. * Fri Aug 28 2009 IWAI, Masaharu <iwai@alib.jp> 1.1.0.20090812-1
  312. - new upstream release
  313. * Sat Jun 20 2009 IWAI, Masaharu <iwai@alib.jp> 1.1.0.20090612-1
  314. - new upstream release
  315. - add Packager tag
  316. * Tue Jun 2 2009 IWAI, Masaharu <iwai@alib.jp> 1.1.0.20090531-1
  317. - new upstream release
  318. * Sat May 9 2009 IWAI, Masaharu <iwai@alib.jp> 1.1.0.20090508-1
  319. - new upstream release
  320. - update BuildRequires
  321. - add dbus-devel, intltool >= 0.40.0
  322. - drop qt4-devel
  323. * Sun Apr 26 2009 IWAI, Masaharu <iwai@alib.jp> 1.1.0.20090423-1
  324. - new upstream release
  325. - drop defined python_sitearch rpm macro
  326. * Fri Apr 17 2009 IWAI, Masaharu <iwai@alib.jp> 1.1.0.20090417-1
  327. - new upstream release
  328. * Tue Apr 14 2009 IWAI, Masaharu <iwai@alib.jp> 1.1.0.20090413-1
  329. - new upstream release
  330. - drop Vine ja.po (SOURCE1)
  331. * Wed Apr 8 2009 IWAI, Masaharu <iwai@alib.jp> 1.1.0.20090407-1
  332. - new upstream release
  333. - update ja.po (SOURCE1)
  334. * Sat Apr 4 2009 IWAI, Masaharu <iwai@alib.jp> 1.1.0.20090331-1
  335. - new upstream release
  336. * Sat Mar 21 2009 IWAI, Masaharu <iwai@alib.jp> - 1.1.0.20090311-3
  337. - add ja.po (SOURCE1): update
  338. - add ibus.desktop file in xdg autostart
  339. - add ibus.schemas file
  340. * Fri Mar 20 2009 Shu KONNO <owa@bg.wakwak.com> - 1.1.0.20090311-2
  341. - set python_sitearch to arch independent path
  342. * Tue Mar 17 2009 IWAI, Masaharu <iwai@alib.jp> - 1.1.0.20090311-1
  343. - new upstream release
  344. - add dbus-python version ( 0.83.0 and more ) in Requires
  345. - add BuildRequires: dbus-python-devel >= 0.83.0
  346. * Mon Feb 23 2009 IWAI, Masaharu <iwai@alib.jp> - 1.1.0.20090217-1
  347. - new upstream release
  348. - add Requires: iso-codes, dbus-python: <BTS:VineLinux:656>
  349. - generate devel sub package
  350. - stop creating qt4 immodule
  351. - drop .la files
  352. * Mon Jan 26 2009 IWAI, Masaharu <iwai@alib.jp> - 0.1.1.20090126-1
  353. - initial release