ibus-vl.spec 14 KB

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