summaryrefslogtreecommitdiff
path: root/pcr/glance/PKGBUILD
blob: 846d17f1d9e84f8e26c0facd80d9b4160d317b95 (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
# Contributor: Limao Luo <luolimao+AUR@gmail.com>
# Contributor: Josh Chase <jcjoshuachase@gmail.com>
# Maintainer : Parabola GNU / Linux-libre Aurélien DESBRIÈRES <aurelien@hackers.camp>

pkgname=glance
_relname=icehouse
pkgver=2014.1.b2
pkgrel=1
pkgdesc="OpenStack image registry and delivery service"
arch=(any)
url=https://launchpad.net/glance
license=(custom)
depends=(python2-jsonpointer python2-glanceclient python2-keystoneclient
    python2-pyopenssl python2-warlock)
makedepends=(python2-setuptools)
source=($url/$_relname/$_relname-2/+download/$pkgname-$pkgver.tar.gz)

prepare() {
    find $pkgname-$pkgver -type f -exec sed -ri 's:^#!/usr/bin/(env )?python$:&2:' '{}' \;
}

build() {
    cd $pkgname-$pkgver/
    python2 setup.py build
}

package() {
    cd $pkgname-$pkgver/
    python2 setup.py install --root="$pkgdir" --optimize=1

    install -d "$pkgdir"/etc/
    cp -r etc/ "$pkgdir"/etc/$pkgname/
    install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}