ibus-vl.spec 15 KB

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