summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/imdbpy/PKGBUILD
blob: 22efa94f3af3f0af26128ad226fca7370503d006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# $Id: PKGBUILD 27018 2010-09-16 17:37:18Z schuay $
# Maintainer: Ray Rashif <schivmeister@gmail.com>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr>
# Contributor: lang2 <wenzhi.liang@gmail.com>

pkgname=imdbpy
_realname=IMDbPY
pkgver=4.6
pkgrel=3
pkgdesc="Python bindings for imdb"
url="http://imdbpy.sourceforge.net/"
arch=('i686' 'x86_64')
license=('GPL')
depends=('python2')
makedepends=('setuptools')
optdepends=('python-lxml' 'python-sqlalchemy' 'python-sqlobject')
source=(http://downloads.sourceforge.net/$pkgname/$_realname-$pkgver.tar.gz)

build(){
  cd "$srcdir/$_realname-$pkgver"

  # python2 fix
  for file in $(find . -name '*.py' -print); do
    sed -i 's_#!.*/usr/bin/python_#!/usr/bin/python2_' $file
    sed -i 's_#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
  done

  python2 setup.py install --root="$pkgdir"

  # fix directories path
  mv "$pkgdir/usr/etc" "$pkgdir"
  install -d "$pkgdir/usr/share"
  mv "$pkgdir/usr/imdb" "$pkgdir/usr/share"
  mv "$pkgdir/usr/doc" "$pkgdir/usr/share/imdb/"
}
md5sums=('876d4cd041fa23633e3637c22bf95622')