1 # Maintainer: Adam Russell <adamlr6+arch@gmail.com>
2 # Contributor: ngoonee <ngoonee.talk@gmail.com>
8 pkgdesc="Library for MAPI connectivity with Microsoft Exchange. This package was SPECIFICALLY created to support evolution-mapi and may not work for any other purpose."
10 url="http://www.openchange.org"
12 depends=('samba4=4.0.0A17' 'popt' 'libical' 'sqlite3' 'file' 'boost' 'zlib')
13 makedepends=('ccache' 'python2' 'subversion' 'git' 'docbook-xsl' 'libxslt')
15 # Releases are mirrored at http://tracker.openchange.org/projects/openchange/files
16 source=("http://tracker.openchange.org/attachments/download/${_dlid}/${pkgname}-${pkgver}-${_codename}.tar.gz")
18 md5sums=('7e5d2de7399f429048390a04aa8c5e79')
22 cd ${srcdir}/${pkgname}-${pkgver}-${_codename}
25 IFS=$(echo -en "\n\b")
26 PYTHON_CALLERS="$(find ${srcdir}/${pkgname}-${pkgver}-${_codename} -name '*.py')
27 $(find ${srcdir}/${pkgname}-${pkgver}-${_codename}/ -type f)
28 $(find ${srcdir}/${pkgname}-${pkgver}-${_codename}/ -name 'configure.ac')"
29 sed -i -e "s|/usr/bin/env python$|/usr/bin/env python2|" \
30 -e "s|python-config$|python2-config|" \
31 -e "s|bin/python$|bin/python2|" \
35 export PYTHON=/usr/bin/python2
37 export PKG_CONFIG_PATH="${_prefix}/samba/lib/pkgconfig:${_prefix}/lib/pkgconfig"
38 export BOOST_LIB_SUFFIX="-mt"
40 ./configure --prefix=${_prefix} --with-samba=${_prefix}
45 _pyver=`python2 -c 'import sys; print(sys.version[:3])'`
47 cd ${srcdir}/${pkgname}-${pkgver}-${_codename}
48 make DESTDIR="$pkgdir/" install
50 cd ${pkgdir}/${_prefix}/lib/
51 ln -s libmapi.so libmapi.so.0
53 find ${pkgdir}/${_prefix}/lib/python${_pyver}/site-packages/ -name '*.py' | \
54 xargs sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|"