updated on Sat Jan 14 12:12:45 UTC 2012
[aur-mirror.git] / ibus-ubuntu / PKGBUILD
blobec8dd88e7b3a788a75a064fa402ed4b06a803d92
1 # Maintainer: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
2 # Original Maintainer: Brad Fanella <bradfanella@archlinux.us>
3 # Contributor: Rainy <rainylau(at)gmail(dot)com>
4 # Contributor: Lee.MaRS <leemars at gmail dot com>
5 # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
7 pkgname=ibus-ubuntu
8 _ubuntu_rel=1ubuntu2
9 pkgver=1.4.0.${_ubuntu_rel}
10 pkgrel=3
11 pkgdesc='Next Generation Input Bus for Linux.'
12 arch=('i686' 'x86_64')
13 license=('LGPL')
14 url='http://ibus.googlecode.com'
15 depends=('dbus-python>=0.84.0' 'gconf' 'dconf' 'python2' 'pygtk' 'pyxdg' 'iso-codes' 'librsvg' 'python-notify' 'hicolor-icon-theme' 'gtk3')
16 optdepends=('notification-daemon')
17 makedepends=('intltool')
18 provides=("ibus=${pkgver}")
19 conflicts=('ibus')
20 options=('!libtool')
21 install=ibus.install
22 source=("http://ibus.googlecode.com/files/${pkgname%-*}-${pkgver%.*}.tar.gz"
23         "http://archive.ubuntu.com/ubuntu/pool/main/i/${pkgname%-*}/${pkgname%-*}_${pkgver%.*}-${_ubuntu_rel}.debian.tar.gz")
24 sha512sums=('8d7fb343d76fc017720db30b46489f79a3949503902e94d2718e8bffb598a79ec1a1beb292af6d026d0944d7e92181334920059ecc7dfaf8e6f59eb1e3d1d1af'
25             '73f33788ac37e236168c2b5256cec9c52cf7a8376120f062a8120407a5a8f034a2ba57fe866d78b90ceca3ab3029139fd5beb798805530039c12449375a6a879')
27 build() {
28   cd "${pkgname%-*}-${pkgver%.*}"
30   #Apply Ubuntu patches
31   for i in $(cat "${srcdir}/debian/patches/series" | grep -v '#'); do
32     patch -Np1 -i "${srcdir}/debian/patches/${i}"
33   done
35   export PYTHON=python2
37   ./configure \
38     --prefix=/usr \
39     --libexecdir=/usr/lib/${pkgname%-*} \
40     --sysconfdir=/etc \
41     --with-gconf-schema-file-dir=/usr/share/gconf/schemas \
42     --enable-gtk3 \
43     --enable-surrounding-text #From debian/rules
45   # python2 fix
46   for file in setup/ibus-setup.in ui/gtk/ibus-ui-gtk.in; do
47     sed -i 's_exec python_exec python2_' $file
48   done
50   # Arch Linux's paths are different from Ubuntu's
51   sed -i -e 's/\(lib\).*\(gtk-2.0\)/\1\/\2/g' -e 's/qt4/qt/g' "${srcdir}/debian/xinput/ibus"
53   make
56 package() {
57   cd "${pkgname%-*}-${pkgver%.*}"
59   export PYTHON=python2
60   make DESTDIR="${pkgdir}/" install
62   find "${pkgdir}" -type f -exec sed -i 's_exec /usr/bin/python_exec /usr/bin/python2_' {} \;
64   #Files for im-switch
65   install -dm755 "${pkgdir}/etc/X11/xinit/xinput.d/"
66   install -m644 "${srcdir}/debian/xinput/ibus" "${pkgdir}/etc/X11/xinit/xinput.d/"
68   #Fix ibus not showing up in GTK2 programs
69   #  Problem: Causes Unity shell to segfault at login
70   #echo "export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules" >> "${pkgdir}/etc/X11/xinit/xinput.d/ibus"