updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / pyxpcom / PKGBUILD
blob87bb5f1004010ee3239eacb9ce1370441006f704
1 # Contributor: Tocer Deng <tocer.deng@gmail.com>
2 # inspire by http://gentoo-overlays.zugaina.org/sugar/portage/dev-python/pyxpcom/pyxpcom-1.9.2.ebuild
4 pkgname=pyxpcom
5 pkgver=9.0.1
6 _pkgtag=21f695a18fe8
7 pkgrel=1
8 pkgdesc="Python interface for mozilla XPCOM library"
9 arch=('i686' 'x86_64')
10 url="http://developer.mozilla.org/en/PyXPCOM"
11 license=('GPL2')
12 groups=()
13 depends=('python2' 'xulrunner' 'zip')
14 makedepends=('autoconf2.13')
15 source=(http://hg.mozilla.org/pyxpcom/archive/$_pkgtag.tar.bz2
16         http://gentoo-overlays.zugaina.org/sugar/portage/dev-python/pyxpcom/files/0.87/fc-xpcom-dynstr.patch
17        )
18 md5sums=('ce390f3a6ceb789fc6203255cc048b7a'
19          '91af0081ca8b5c508e1617911bef9cda')
21 build() {
22   cd "$srcdir/$pkgname-$_pkgtag"
23   patch config/config.mk ../../fc-xpcom-dynstr.patch
24   autoconf-2.13 || return 1
26   _xulsdkdir="$(pkg-config --variable sdkdir libxul)" 
28   [ -d objdir ] && rm -rf objdir
29   mkdir objdir || return 1
30   cd objdir
31   export PYTHON=/usr/bin/python2
32   ../configure --with-libxul-sdk=${_xulsdkdir} \
33                --with-system-nspr \
34                --prefix=/usr \
35                --disable-tests \
36                --libdir=/usr/lib || return 1
37   make || return 1
38   
39   # Create directories
40   install -d $pkgdir/usr/lib/python2.7/site-packages
41   install -d ${pkgdir}${_xulsdkdir}/bin
42   install -d ${pkgdir}${_xulsdkdir}/include
43   install -d ${pkgdir}${_xulsdkdir}/idl
44   install -d ${pkgdir}${_xulsdkdir}/sdk/lib
45   
46   # Copy files
47   cp -r dist/bin/python/* $pkgdir/usr/lib/python2.7/site-packages/ || return 1
48   cp -r dist/bin/* ${pkgdir}${_xulsdkdir}/bin/ || return 1
49   cp -r dist/include/* ${pkgdir}${_xulsdkdir}/include/ || return 1
50   cp -r dist/lib/* ${pkgdir}${_xulsdkdir}/sdk/lib/ || return 1
53 # vim:set ts=2 sw=2 et: