add fcitx-gtk

This commit is contained in:
Weng 2013-05-05 23:58:15 +00:00
parent 6dbe415c08
commit b6289947d5
3 changed files with 64 additions and 0 deletions

40
fcitx-gtk/PKGBUILD Normal file
View File

@ -0,0 +1,40 @@
# Maintainer: Weng Xuetian <wengxt@gmail.com>
pkgbase=fcitx-gtk
pkgname=('fcitx-gtk2' 'fcitx-gtk3')
pkgver=4.2.7
pkgrel=1
pkgdesc="Gtk im module for fcitx"
arch=('i686' 'x86_64')
url="http://code.google.com/p/fcitx/"
license=('GPL')
makedepends=('fcitx>=4.2.7' 'gtk2' 'gtk3' 'cmake')
source=(http://fcitx.googlecode.com/files/${pkgbase}-${pkgver}.tar.xz)
md5sums=('c178aeca39bd2e24a907d4540503595d')
build(){
rm -rf build
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release "../${pkgbase}-${pkgver}"
make
}
package_fcitx-gtk2 ()
{
pkgdesc='GTK2 IM Module for fcitx'
depends=('gtk2' "fcitx>=$pkgver")
install="fcitx-gtk2.install"
cd "build/gtk2"
make DESTDIR=${pkgdir} install
}
package_fcitx-gtk3 ()
{
pkgdesc='GTK3 IM Module for fcitx'
depends=('gtk3' "fcitx>=$pkgver")
install="fcitx-gtk3.install"
cd "build/gtk3"
make DESTDIR=${pkgdir} install
}

View File

@ -0,0 +1,13 @@
post_install() {
if res="$(extra/usr/bin/gtk-query-immodules-2.0)"; then
echo "$res" > extra/etc/gtk-2.0/gtk.immodules
fi
}
post_upgrade() {
post_install
}
post_remove() {
post_install
}

View File

@ -0,0 +1,11 @@
post_install() {
extra/usr/bin/gtk-query-immodules-3.0 --update-cache
}
post_upgrade() {
post_install
}
post_remove() {
post_install
}