Skip to content

Instantly share code, notes, and snippets.

@lewtds
Created September 26, 2012 10:54
Show Gist options
  • Save lewtds/3787316 to your computer and use it in GitHub Desktop.
Save lewtds/3787316 to your computer and use it in GitHub Desktop.
Arch Linux packaging for BoGoEngine (Git)
post_install () {
glib-compile-schemas /usr/share/glib-2.0/schemas
}
pre_upgrade () {
cd /usr/share
if [ -d ibus-bogo ]; then
rm -rf ibus-bogo/*
fi
cd /usr/share/ibus/component/
if [ -f bogo.xml ]; then
rm bogo.xml
fi
cd /usr/lib/python2.7/site-packages/
if [ -d BoGo ]; then
rm -rf BoGo/*
fi
for i in `ls /usr/lib | grep bogo`; do
rm -rf /usr/lib/$i
done
}
post_upgrade () {
glib-compile-schemas /usr/share/glib-2.0/schemas
}
post_remove () {
glib-compile-schemas /usr/share/glib-2.0/schemas
}
# Contributor: Nguyen Ha Duong <cmpitg@gmail.com>
# Contributor: Ngo Trung <ndtrung4419@gmail.com>
# Contributor: Dam Tien Long <longdt90@gmail.com>
pkgname="ibus-bogo-git"
pkgver=20121114
pkgrel=2
pkgdesc="Bogo Engine for Ibus"
arch=('i686' 'x86_64')
url="https://github.com/BoGoEngine"
license=('GPL')
depends=('ibus' 'python2' 'glibmm' 'python2-gobject')
makedepends=('git' 'cmake' 'gcc' 'python2')
provides=('ibus-bogo')
_gitroot="https://github.com/BoGoEngine/ibus-bogo-python.git"
_gitrootname="ibus-bogo-python"
install=install
build() {
cd ${srcdir}
if [ -d ${_gitrootname} ] ; then
cd ${srcdir}/${_gitrootname} && git pull
msg "Local ${srcdir}/${_gitrootname} updated"
else
git clone ${_gitroot} ${_gitrootname}
fi
msg "Starting make..."
mkdir ${pkgdir}/usr/
# Building bogo
cd ${srcdir}/${_gitrootname}
if [ -d build ]; then
cd build
else
mkdir build
cd build
fi
cmake -DGSETTINGS_COMPILE=OFF-DCMAKE_INSTALL_PREFIX="${pkgdir}/usr" ..
make
make install
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment