updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / gajim-otr-hg / PKGBUILD
blobeefdc4e6919f0b6a24debd7cdd012c8ee744772a
1 # -*- shell-script -*-
2
3 # Contributor: Adrian C. <anrxc sysphere.org>
6 pkgname=gajim-otr-hg
7 pkgver=11148
8 pkgrel=2
9 pkgdesc="Jabber instant messenger with OTR encryption support"
10 arch=("i686" "x86_64")
11 url="http://www.gajim.org/"
12 license=("GPL3")
13 depends=("python2" "pygtk" "python-pysqlite" "python-otr")
14 makedepends=("mercurial" "gettext" "intltool" "perlxml" "dbus")
15 optdepends=("gnupg: chat encryption using GnuPG"
16             "pycrypto: end-to-end encryption support"
17             "python2-pyopenssl: SSL/TLS verification of server certificates"
18             "dbus-python: notification support with notification-daemon"
19             "libxss: automatic status support"
20             "gtkspell: spell checker support"
21             "avahi: local clients autodetection"
22             "dnsutils: SRV records support")
23 provides=("gajim")
24 conflicts=("gajim" "gajim-svn" "gajim-hg" "gajim-otr-bzr")
25 options=(!libtool)
27 _root="http://hg.gajim.org"
28 _repo="gajim"
29 _branch="otr"
32 build() {
33   cd "${srcdir}"
35 # Source code checkout
36   if [ -d "${_repo}-${_branch}" ]; then
37       cd "${_repo}-${_branch}"
38       make clean || echo "No rule is not fatal. Continuing."
39       make distclean || echo "No rule is not fatal. Continuing."
40       hg pull -b "${_branch}"
41       msg "The local repository was updated."
42   else
43       hg clone -b "${_branch}" "${_root}/${_repo}" "${_repo}-${_branch}"
44       msg "The remote repository was cloned."
45       cd "${_repo}-${_branch}"
46   fi
48 # Python v2 compatibility
49   sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/env python2_' "${srcdir}/${_repo}-${_branch}/src/ipython_view.py"
50   sed -i 's_^#!.*/usr/bin/env.*python$_#!/usr/bin/env python2_' "${srcdir}/${_repo}-${_branch}/src/otr_windows.py"
52 # Source code build
53   PYTHON=/usr/bin/python2 ./autogen.sh --prefix=/usr --enable-site-packages
54   make
55   make DESTDIR="${pkgdir}" install
57 # Object files cleanup
58   find "${pkgdir}/usr/lib/python2.7/site-packages/gajim/" -name "*.pyo" | xargs rm -f