From 1930acb377d623fef168808f189ca5c0cac9bf4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Reynolds?= Date: Tue, 4 Dec 2012 10:07:01 -0300 Subject: MAPI support for Evolution --- pcr/openchange/PKGBUILD | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 pcr/openchange/PKGBUILD (limited to 'pcr/openchange/PKGBUILD') diff --git a/pcr/openchange/PKGBUILD b/pcr/openchange/PKGBUILD new file mode 100644 index 000000000..c3e2c753f --- /dev/null +++ b/pcr/openchange/PKGBUILD @@ -0,0 +1,67 @@ +# Maintainer: Michael Hansen +# Contributor: ngoonee +# Contributor: Adam Russell +pkgname=openchange +_codename=BORG +_dlid=180 +pkgver=1.0 +pkgrel=6 +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." +arch=('i686' 'x86_64') +url="http://www.openchange.org" +license=('GPL3') +depends=('samba4>=4.0.0B1' 'popt' 'libical' 'sqlite3' 'file' 'boost' 'zlib') +makedepends=('ccache' 'python2' 'subversion' 'docbook-xsl' 'libxslt' 'flex' 'bison' 'autoconf' 'automake') +options=(!makeflags) +# Releases are mirrored at http://tracker.openchange.org/projects/openchange/files +source=("http://tracker.openchange.org/attachments/download/${_dlid}/${pkgname}-${pkgver}-${_codename}.tar.gz" + "bugzilla_682449.patch") + +md5sums=('9b57a325e90e5ad3a702ddc6e8762ab6' + '7521f89f8ffaa733ed72532334951b90') +_prefix="/opt/samba4" + +build() { + cd ${srcdir}/${pkgname}-${pkgver}-${_codename} + + patch -i ../bugzilla_682449.patch + + SAVEIFS=${IFS} + IFS=$(echo -en "\n\b") + PYTHON_CALLERS="$(find ${srcdir}/${pkgname}-${pkgver}-${_codename} -name '*.py') +$(find ${srcdir}/${pkgname}-${pkgver}-${_codename}/ -type f) +$(find ${srcdir}/${pkgname}-${pkgver}-${_codename}/ -name 'configure.ac')" + sed -i -e "s|/usr/bin/env python$|/usr/bin/env python2|" \ + -e "s|python-config$|python2-config|" \ + -e "s|bin/python$|bin/python2|" \ + ${PYTHON_CALLERS} + + # Patch for samba4-alpha19+ + SRC_FILES="$(find ${srcdir}/${pkgname}-${pkgver}-${_codename} -name '*.c')" + sed -i -e "s|#include |#include |" ${SRC_FILES} + IFS=${SAVEIFS} + + export PYTHON=/usr/bin/python2 + + export PKG_CONFIG_PATH="${_prefix}/samba/lib/pkgconfig:${_prefix}/lib/pkgconfig" + export BOOST_LIB_SUFFIX="-mt" + ./autogen.sh + + sed -i -e "s|python-config|python2-config|g" configure + ./configure --prefix=${_prefix} --with-samba=${_prefix} + make FLEX=/usr/bin/flex BISON=/usr/bin/bison || return 1 +} + +package() { + _pyver=`python2 -c 'import sys; print(sys.version[:3])'` + + cd ${srcdir}/${pkgname}-${pkgver}-${_codename} + make DESTDIR="$pkgdir/" install + + cd ${pkgdir}/${_prefix}/lib/ + ln -s libmapi.so libmapi.so.0 + ln -s libocpf.so libocpf.so.0 + + find ${pkgdir}/${_prefix}/lib/python${_pyver}/site-packages/ -name '*.py' | \ + xargs sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|" +} -- cgit v1.2.3-2-g168b