1 # Contributor: Byron Clark <byron@theclarkfamily.name>
2 # based on thrift-git PKGBUILD
6 pkgdesc="Scalable cross-language services framework for IPC/RPC between C++, Java, Ruby, PHP, Python, C#, Haskell, Erlang, etc."
8 url="http://thrift.apache.org/"
11 makedepends=(java-environment apache-ant python2 php perl perl-bit-vector perl-class-accessor)
12 optdepends=('python2: to use Python bindings'
13 'java-environment: to use Java bindings'
14 'php: to use PHP bindings'
15 'perl: to use Perl bindings'
16 'perl-bit-vector: to use Perl bindings'
17 'perl-class-accessor: to use Perl bindings')
19 source=(http://www.apache.org/dist/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz
20 maven-repo-path.patch)
21 md5sums=('d29dfcd38d476cbc420b6f4d80ab966c'
22 '65bbe2a4260d9f7e3a8e385919788ff0')
25 cd "$srcdir/$pkgname-$pkgver"
27 patch -p1 -i $srcdir/maven-repo-path.patch
29 # apache-ant is not installed in a normal path location
30 . /etc/profile.d/apache-ant.sh
32 PYTHON=/usr/bin/python2 /bin/sh ./configure --prefix=/usr
36 install -d -m 0755 $pkgdir/usr/bin
37 install -m 0755 compiler/cpp/thrift $pkgdir/usr/bin
41 make -C lib/cpp DESTDIR=$pkgdir install
45 python2 setup.py build
46 python2 setup.py install --no-compile --root=$pkgdir
52 install -d -m 0755 $pkgdir/usr/share/java/thrift
53 install -D -m 0644 build/libthrift-${pkgver}.jar $pkgdir/usr/share/java/thrift
58 install -d -m 0755 $pkgdir/usr/share/php/thrift
60 if [ "$ITEM" != ext ]; then
61 cp -R "$ITEM" $pkgdir/usr/share/php/thrift
64 find $pkgdir/usr/share/php/thrift -type d | xargs chmod 0755
65 find $pkgdir/usr/share/php/thrift -type f | xargs chmod 0644
66 pushd ext/thrift_protocol
70 make INSTALL_ROOT=$pkgdir install
76 PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
78 make install DESTDIR=$pkgdir
79 find $pkgdir -name perllocal.pod -delete
80 find $pkgdir -name .packlist -delete
84 # vim:set ts=2 sw=2 et: