updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / euca2ools / PKGBUILD
blobe04e9634c27e0cea87c5a9fd3bd14eae1a1be685
1 # Contributors:
2 #       henning mueller <henning@orgizm.net>
3 #   Andrew Hamilton
5 pkgname=euca2ools
6 pkgver=1.3.1
7 pkgrel=5
8 pkgdesc='Command-line tools for interacting with Amazon EC2 and S3 API-compatible Web services using the REST/Query API.'
9 arch=(any)
10 url=http://open.eucalyptus.com
11 license=(BSD)
12 depends=(python2 python-boto python-m2crypto)
13 makedepends=(python2 help2man python-boto python-m2crypto)
14 source=(
15         http://eucalyptussoftware.com/downloads/releases/$pkgname-$pkgver.tar.gz
17 md5sums=(
18   a835e8fabd5875a5c8dbcba1bf89d402
21 package() {
22         # Create needed directories in $pkgdir.
23         cd $pkgdir
24         mkdir -p \
25                 usr/lib/python2.7/site-packages/$pkgname \
26                 usr/bin \
27                 etc/bash_completion.d \
28                 usr/share/man/man1
30         cd $srcdir/$pkgname-$pkgver
32         # Change shebang lines for python2.
33         find . -type f | xargs sed -i "s:/python:/python2:"
35         # Edit the connections module name as it should be lowercase
36         for action in upload delete download; do
37                 sed -i "s/import Connection/import connection/" \
38                         bin/euca-$action-bundle
39         done
41         # Edit the euca2ools module to correctly connect
42         sed -i "s/return boto.s3.Connection(/return boto.s3.connection.S3Connection(/" \
43                 $pkgname/$pkgname/__init__.py
45         # Copy python module over to python module dir.
46         cp $pkgname/$pkgname/* \
47                 $pkgdir/usr/lib/python2.7/site-packages/$pkgname
49         # Copy binaries.
50         cp bin/* \
51                 $pkgdir/usr/bin
53         # Copy bash completion script.
54         cp util/* \
55                 $pkgdir/etc/bash_completion.d
57         # Generate and copy man pages.
58         make man
59         cp man/* \
60                 $pkgdir/usr/share/man/man1