This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD

By: a guest on Aug 12th, 2011  |  syntax: None  |  size: 1.82 KB  |  views: 149  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. pkgname=openchange
  2. _codename=TRANSPORTER
  3. pkgver=0.11
  4. pkgrel=1
  5. 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."
  6. arch=('i686' 'x86_64')
  7. url="http://www.openchange.org"
  8. license=('GPL3')
  9. depends=('samba4=4.0.0A16' 'popt' 'libical' 'sqlite3' 'file' 'boost' 'zlib')
  10. makedepends=('ccache' 'python2' 'subversion' 'git' 'docbook-xsl' 'libxslt')
  11. options=(!makeflags)
  12. source=("${pkgname}-${pkgver}-${_codename,,}.tar.gz")
  13. md5sums=('7e5d2de7399f429048390a04aa8c5e79')
  14. _prefix="/opt/samba4"
  15.  
  16. build() {
  17.         cd ${srcdir}/${pkgname}-${pkgver}-${_codename}
  18.  
  19.         SAVEIFS=${IFS}
  20.         IFS=$(echo -en "\n\b")
  21.         PYTHON_CALLERS="$(find ${srcdir}/${pkgname}-${pkgver}-${_codename} -name '*.py')
  22. $(find ${srcdir}/${pkgname}-${pkgver}-${_codename}/  -type f)
  23. $(find ${srcdir}/${pkgname}-${pkgver}-${_codename}/ -name 'configure.ac')"
  24.         sed -i -e "s|/usr/bin/env python$|/usr/bin/env python2|" \
  25.                -e "s|python-config$|python2-config|" \
  26.                -e "s|bin/python$|bin/python2|" \
  27.             ${PYTHON_CALLERS}
  28.         IFS=${SAVEIFS}
  29.  
  30.         export PYTHON=/usr/bin/python2
  31.  
  32.         export PKG_CONFIG_PATH="${_prefix}/lib/pkgconfig"
  33.         export BOOST_LIB_SUFFIX="-mt"
  34.         export LDB_LIBS="-Wl,-rpath,/usr/lib -L${_prefix}/samba/lib -lldb -ltalloc  "
  35.         export LDB_CFLAGS="-I${_prefix}/samba/include  "
  36.         ./autogen.sh
  37.         ./configure --prefix=${_prefix} --with-samba=${_prefix}
  38.         make || return 1
  39. }
  40.  
  41. package() {
  42.         _pyver=`python2 -c 'import sys; print(sys.version[:3])'`
  43.  
  44.         cd ${srcdir}/${pkgname}-${pkgver}-${_codename}
  45.         make DESTDIR="$pkgdir/" install
  46.  
  47.         cd ${pkgdir}/${_prefix}/lib/
  48.         ln -s libmapi.so libmapi.so.0
  49.  
  50.         find ${pkgdir}/${_prefix}/lib/python${_pyver}/site-packages/ -name '*.py' | \
  51.              xargs sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|"
  52. }
clone this paste RAW Paste Data