Author: lkundrak
Update of /cvs/nonfree/rpms/ec2-api-tools/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv28451/devel
Modified Files:
.cvsignore sources
Added Files:
ec2-api-tools.spec ec2-cmd
Log Message:
Import amazon ec2 api tools
--- NEW FILE ec2-api-tools.spec ---
%global major_version 1.3
%global minor_version 36506
Name: ec2-api-tools
Version: %{major_version}.%{minor_version}
Release: 1
Summary: Amazon EC2 Command-Line Tools
Group: Applications/Internet
License: Redistributable, no modification permitted and LGPLv2 and ASL 2.0 and ASL
1.1
# Just to avoid confusion, "ASL" above is Apache Software License
# "Redistributable" parts are covered by Amazon Software License
URL:
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351
Source0:
http://s3.amazonaws.com/ec2-downloads/%{name}.zip
Source1: ec2-cmd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: jpackage-utils
Requires: java >= 1.5
BuildArch: noarch
%description
The command-line tools serve as the client interface to the Amazon EC2 web
service. Use these tools to register and launch instances, manipulate
security groups, and more.
%prep
%setup -q -n %{name}-%{major_version}-%{minor_version}
%build
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_javadir}/ec2-api-tools
install -pm 644 lib/*.jar $RPM_BUILD_ROOT%{_javadir}/ec2-api-tools
install -d $RPM_BUILD_ROOT%{_bindir}
# Rewrite the wrappers
for FILE in $(ls bin/* |grep -v 'cmd$')
do
TARGET=$RPM_BUILD_ROOT%{_bindir}/$(basename $FILE)
METHOD=$(awk '/ec2-cmd/ {printf "%s", $2}' $FILE)
cat >$TARGET <<EOF
#!/bin/bash
exec ec2-cmd $METHOD "\$@"
EOF
chmod 0755 $TARGET
touch --reference $FILE $TARGET
done
# The bundled ec2-cmd is not suitable for us
install -pm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/ec2-cmd
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_javadir}/ec2-api-tools
%doc THIRDPARTYLICENSE.TXT license.txt notice.txt
%changelog
* Wed Jul 15 2009 Lubomir Rintel (Good Data) <lubo.rintel(a)gooddata.com> -
1.3.36506-1
- Bump to newer upstream version
- Publising, remove profanity
- Don't depend on Sun Java specifically
* Thu Dec 11 2008 Lubomir Rintel (Good Data) <lubo.rintel(a)gooddata.com> -
1.3.30349-1
- New upstream release, support for European zones
* Tue Oct 7 2008 Lubomir Rintel (Good Data) <lubo.rintel(a)gooddata.com> -
1.3.24159-2
- Require Sun Java
* Tue Oct 7 2008 Lubomir Rintel (Good Data) <lubo.rintel(a)gooddata.com> -
1.3.24159-1
- Initial packaging attempt
--- NEW FILE ec2-cmd ---
#!/bin/bash
#
# EC2 API Tools dispatcher
# Lubomir Rintel (Good Data) <lubo.rintel(a)gooddata.com>
# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
. /usr/share/java-utils/java-functions
else
echo "Can't find functions library, aborting"
exit 1
fi
# Load system-wide configuration
if [ -f /etc/ec2-cmd.conf ]; then
. /etc/ec2-cmd.conf
fi
# Load user configuration
if [ -f "$HOME/.ec2-cmdrc" ]; then
. "$HOME/.ec2-cmdrc"
fi
CMD=$1; shift
if [ -z "$CMD" ]
then
echo "Missing an argument. Usage: $0 <argument>" >&2
exit 1
fi
# Rest of the configuration
MAIN_CLASS=com.amazon.aes.webservices.client.cmd.$CMD
# Set parameters
set_jvm
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS $EC2CMD_OPTS
CLASSPATH=$(echo /usr/share/java/ec2-api-tools/* |sed 's/ /:/g')
# Let's start
run "$@"
Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/ec2-api-tools/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 1 Aug 2009 17:15:15 -0000 1.1
+++ .cvsignore 2 Aug 2009 15:24:12 -0000 1.2
@@ -0,0 +1 @@
+ec2-api-tools.zip
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/ec2-api-tools/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 1 Aug 2009 17:15:15 -0000 1.1
+++ sources 2 Aug 2009 15:24:12 -0000 1.2
@@ -0,0 +1 @@
+3d8758b85e05e83f938941afe9068d3f ec2-api-tools.zip