OLD | NEW |
| (Empty) |
1 # | |
2 # gsutil.spec - RPM specification file for Google Cloud Storage command | |
3 # line utility (gsutil). | |
4 # | |
5 # Copyright 2011 Google Inc. | |
6 # | |
7 | |
8 Name: gsutil | |
9 Version: 2.0 | |
10 Release: 1%{?dist} | |
11 Summary: gsutil command line utility for Google Cloud Storage | |
12 License: ASL 2.0 | |
13 Group: Development/Libraries | |
14 Url: http://code.google.com/apis/storage/docs/gsutil.html | |
15 Source0: http://gsutil.googlecode.com/files/%{name}-%{version}.zip | |
16 BuildArch: noarch | |
17 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | |
18 # Dependency on boto commented out for now because initially we plan to | |
19 # bundle boto with this package, however, when we're ready to depend on | |
20 # a separate boto rpm package, this line should be uncommented. | |
21 #Requires: python-boto | |
22 | |
23 %description | |
24 | |
25 GSUtil is a Python application that facilitates access to Google Cloud Storage | |
26 from the command line. You can use GSUtil to do a wide range of bucket and | |
27 object management tasks, including: | |
28 | |
29 - Creating and deleting buckets. | |
30 - Uploading, downloading, and deleting objects. | |
31 - Listing buckets and objects. | |
32 - Moving, copying, and renaming objects. | |
33 - Setting object and bucket ACLs. | |
34 | |
35 %prep | |
36 %setup -q | |
37 | |
38 %build | |
39 python setup.py build | |
40 | |
41 %install | |
42 python setup.py install --skip-build --root=%{buildroot} | |
43 # Make all files and dirs in build area readable by other | |
44 # and make all directories executable by other. These steps | |
45 # are performed in support of the rpm installation mode, | |
46 # in which users with different user/group than the | |
47 # installation user/group must be able to run gsutil. | |
48 chmod -R o+r %{buildroot}/usr/share/gsutil | |
49 find %{buildroot}/usr/share/gsutil -type d | xargs chmod o+x | |
50 # Make main gsutil script readable and executable by other. | |
51 chmod o+rx %{buildroot}/usr/share/gsutil/gsutil | |
52 # Remove Python egg file, which we don't use (but setup.py insists on | |
53 # building) so we remove it here. | |
54 rm %{buildroot}/usr/local/lib/python2.6/dist-packages/gsutil-2.0.egg-info | |
55 # Remove update command, which shouldn't be used when gsutil is managed by RPM. | |
56 rm %{buildroot}/usr/share/gsutil/gslib/commands/update.py | |
57 # Create /usr/bin under buildroot and symlink gsutil so users don't | |
58 # need to add a custom directory to their PATH. | |
59 mkdir -p %{buildroot}%{_bindir} | |
60 cd %{buildroot}%{_bindir} | |
61 ln -s ../share/gsutil/gsutil gsutil | |
62 | |
63 %clean | |
64 rm -rf %{buildroot} | |
65 | |
66 %files | |
67 %defattr(-,root,root,-) | |
68 # Lines ending with a slash cause recursive enumeration of directory contents. | |
69 %{_bindir}/%{name} | |
70 ###FILES_GO_HERE### | |
71 | |
72 %changelog | |
73 * Tue Dec 10 2011 Marc Cohen <gs-team@google.com> 2.0-1 | |
74 - initial version of rpm spec file for gsutil for inclusion in RHEL | |
75 | |
OLD | NEW |