1 # Contributor: Nick Lanham (nick AT afternight DOT org)
2 # Contributor: Yejun Yang (yejunx AT gmail DOT com)
7 pkgdesc="The API tools that serve as the client interface to the Amazon EC2 web service"
9 url="http://aws.amazon.com/developertools/351"
10 source=(http://ec2-downloads.s3.amazonaws.com/$pkgname-$pkgver.zip)
11 depends=(java-runtime)
13 md5sums=('aad6032e8e7aa87b3ee2c7632eb1979a')
16 cd $srcdir/$pkgname-$pkgver
17 mkdir -p $pkgdir/usr/lib
18 # install lib i.e jar file
19 cp -r lib $pkgdir/usr/lib/ec2-api-tools
20 find $pkgdir -type f -exec chmod 644 {} \;
22 # fix env. var. in scripts
23 sed -i 's#:?EC2_HOME is not set#:=/usr#' bin/*
24 sed -i -e 's#:-EC2_HOME is not set#:=/usr#' \
25 -e 's#:?JAVA_HOME is not set#:-/opt/java#' \
26 -e 's#LIBDIR="${EC2_HOME}/lib"#LIBDIR="${EC2_HOME}/lib/ec2-api-tools"#' bin/ec2-cmd
29 # Remove unneeded windows cmd files
30 rm $pkgdir/usr/bin/*.cmd
32 # install license files
33 mkdir -p $pkgdir/usr/share/licenses/$pkgname/
34 install -m 644 license.txt $pkgdir/usr/share/licenses/$pkgname/
35 install -m 644 THIRDPARTYLICENSE.TXT $pkgdir/usr/share/licenses/$pkgname/