summaryrefslogtreecommitdiff
path: root/pcr/glance/PKGBUILD
blob: a05e66686c69c504997262032f4bd4bf551b6b59 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Contributor: Josh Chase <jcjoshuachase@gmail.com>
# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.IO>

pkgname=glance
pkgver=2012.1.2
pkgrel=1
_ostackver=essex
_clientname=python-glanceclient
_clientver=0.5.1
pkgdesc="OpenStack image service"
arch=('any')
license=('custom')
url="https://launchpad.net/$pkgname"
depends=('python2'
	 'python2-httplib2'
	 'python2-webob'
	 'python2-eventlet'
	 'python2-greenlet'
	 'python-paste'
	 'python-paste-deploy'
	 'python-routes'
	 'python2-sqlalchemy'
	 'python2-migrate'
	 'python2-passlib'
	 'python2-lxml'
	 'python-anyjson'
	 'python-wsgiref'
	 'python2-argparse'
	 'python2-boto'
	 'python-xattr'
	 'python2-kombu'
	 'python2-crypto'
	 'python2-sendfile'
	 'python2-iso8601')
makedepends=('python2-distribute')
source=("https://launchpad.net/$pkgname/$_ostackver/$pkgver/+download/$pkgname-$pkgver.tar.gz"
	"http://pypi.python.org/packages/source/${_clientname:0:1}/$_clientname/$_clientname-$_clientver.tar.gz")

build() {
  cd $srcdir

  find . -type f -exec sed -i -e 's|^#!/usr/bin/python$|#!/usr/bin/python2|' \
    -e 's|^#!/usr/bin/env python$|#!/usr/bin/env python2|' {} +

  cd $srcdir/$_clientname-$_clientver
  python2 setup.py build

  cd "$srcdir/$pkgname-$pkgver"
  python2 setup.py build
}

package() {
  cd $srcdir/$_clientname-$_clientver
  python2 setup.py install --root=$pkgdir

  cd "$srcdir/$pkgname-$pkgver"
  python2 setup.py install --root="$pkgdir" --optimize=1
  
  install -dm600 "$pkgdir"/etc/$pkgname
  install -Dm600 etc/* "$pkgdir"/etc/$pkgname/
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}