Fixes #192.
Spec copied from Fedora/EPEL infrastructure packaging.
... | ... |
@@ -1,4 +1,43 @@ |
1 |
-SHELL := /bin/bash |
|
1 |
+VERSION := 1.5.0 |
|
2 |
+SHELL := /bin/bash |
|
3 |
+SPEC := s3cmd.spec |
|
4 |
+COMMIT := $(shell git rev-parse HEAD) |
|
5 |
+SHORTCOMMIT := $(shell git rev-parse --short=8 HEAD) |
|
6 |
+TARBALL = s3cmd-$(VERSION)-$(SHORTCOMMIT).tar.gz |
|
2 | 7 |
|
3 | 8 |
release: |
4 | 9 |
python setup.py register sdist upload |
10 |
+ |
|
11 |
+clean: |
|
12 |
+ -rm -rf s3cmd-*.tar.gz *.rpm *~ $(SPEC) |
|
13 |
+ -find . -name \*.pyc -exec rm \{\} \; |
|
14 |
+ -find . -name \*.pyo -exec rm \{\} \; |
|
15 |
+ |
|
16 |
+$(SPEC): $(SPEC).in |
|
17 |
+ sed -e 's/##VERSION##/$(VERSION)/' \ |
|
18 |
+ -e 's/##COMMIT##/$(COMMIT)/' \ |
|
19 |
+ -e 's/##SHORTCOMMIT##/$(SHORTCOMMIT)/' \ |
|
20 |
+ $(SPEC).in > $(SPEC) |
|
21 |
+ |
|
22 |
+tarball: |
|
23 |
+ git archive --format tar --prefix s3cmd-$(COMMIT)/ HEAD | gzip -c > $(TARBALL) |
|
24 |
+ |
|
25 |
+# Use older digest algorithms for local rpmbuilds, as EPEL5 and |
|
26 |
+# earlier releases need this. When building using mock for a |
|
27 |
+# particular target, it will use the proper (newer) digests if that |
|
28 |
+# target supports it. |
|
29 |
+rpm: clean tarball $(SPEC) |
|
30 |
+ tmp_dir=`mktemp -d` ; \ |
|
31 |
+ mkdir -p $${tmp_dir}/{BUILD,RPMS,SRPMS,SPECS,SOURCES} ; \ |
|
32 |
+ cp $(TARBALL) $${tmp_dir}/SOURCES ; \ |
|
33 |
+ cp $(SPEC) $${tmp_dir}/SPECS ; \ |
|
34 |
+ cd $${tmp_dir} > /dev/null 2>&1; \ |
|
35 |
+ rpmbuild -ba --define "_topdir $${tmp_dir}" \ |
|
36 |
+ --define "_source_filedigest_algorithm 0" \ |
|
37 |
+ --define "_binary_filedigest_algorithm 0" \ |
|
38 |
+ --define "dist %{nil}" \ |
|
39 |
+ SPECS/$(SPEC) ; \ |
|
40 |
+ cd - > /dev/null 2>&1; \ |
|
41 |
+ cp $${tmp_dir}/RPMS/noarch/* $${tmp_dir}/SRPMS/* . ; \ |
|
42 |
+ rm -rf $${tmp_dir} ; \ |
|
43 |
+ rpmlint *.rpm *.spec |
5 | 44 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,155 @@ |
0 |
+%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} |
|
1 |
+ |
|
2 |
+%global commit ##COMMIT## |
|
3 |
+%global shortcommit ##SHORTCOMMIT## |
|
4 |
+ |
|
5 |
+Name: s3cmd |
|
6 |
+Version: ##VERSION## |
|
7 |
+Release: 0.3.git%{shortcommit}%{?dist} |
|
8 |
+Summary: Tool for accessing Amazon Simple Storage Service |
|
9 |
+ |
|
10 |
+Group: Applications/Internet |
|
11 |
+License: GPLv2 |
|
12 |
+URL: http://s3tools.logix.cz/s3cmd |
|
13 |
+# git clone git@github.com:mdomsch/s3cmd.git |
|
14 |
+# git checkout -b origin/merge |
|
15 |
+#git archive --format tar --prefix s3cmd-1.1.0-beta3-2dfe4a65/ HEAD | gzip -c > s3cmd-1.1.0-beta1-2dfe4a65.tar.gz |
|
16 |
+ |
|
17 |
+Source0: https://github.com/s3tools/s3cmd/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz |
|
18 |
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
|
19 |
+BuildArch: noarch |
|
20 |
+ |
|
21 |
+%if %{!?fedora:16}%{?fedora} < 16 || %{!?rhel:7}%{?rhel} < 7 |
|
22 |
+BuildRequires: python-devel |
|
23 |
+%else |
|
24 |
+BuildRequires: python2-devel |
|
25 |
+%endif |
|
26 |
+%if %{!?fedora:8}%{?fedora} < 8 || %{!?rhel:6}%{?rhel} < 6 |
|
27 |
+# This is in standard library since 2.5 |
|
28 |
+Requires: python-elementtree |
|
29 |
+%endif |
|
30 |
+ |
|
31 |
+%description |
|
32 |
+S3cmd lets you copy files from/to Amazon S3 |
|
33 |
+(Simple Storage Service) using a simple to use |
|
34 |
+command line client. |
|
35 |
+ |
|
36 |
+ |
|
37 |
+%prep |
|
38 |
+%setup -q -n s3cmd-%{commit} |
|
39 |
+ |
|
40 |
+%build |
|
41 |
+ |
|
42 |
+ |
|
43 |
+%install |
|
44 |
+rm -rf $RPM_BUILD_ROOT |
|
45 |
+S3CMD_PACKAGING=Yes python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT |
|
46 |
+install -d $RPM_BUILD_ROOT%{_mandir}/man1 |
|
47 |
+install -m 644 s3cmd.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
|
48 |
+ |
|
49 |
+ |
|
50 |
+%clean |
|
51 |
+rm -rf $RPM_BUILD_ROOT |
|
52 |
+ |
|
53 |
+ |
|
54 |
+%files |
|
55 |
+%defattr(-,root,root,-) |
|
56 |
+%{_bindir}/s3cmd |
|
57 |
+%{_mandir}/man1/s3cmd.1* |
|
58 |
+%{python_sitelib}/S3 |
|
59 |
+%if 0%{?fedora} >= 9 || 0%{?rhel} >= 6 |
|
60 |
+%{python_sitelib}/s3cmd*.egg-info |
|
61 |
+%endif |
|
62 |
+%doc NEWS README |
|
63 |
+ |
|
64 |
+ |
|
65 |
+%changelog |
|
66 |
+* Sun Feb 02 2014 Matt Domsch <mdomsch@fedoraproject.org> - 1.5.0-0.3.git |
|
67 |
+- upstream 1.5.0-beta1 plus newer upstream fixes |
|
68 |
+ |
|
69 |
+* Wed May 29 2013 Matt Domsch <mdomsch@fedoraproject.org> - 1.5.0-0.2.gita122d97 |
|
70 |
+- more upstream bugfixes |
|
71 |
+- drop pyxattr dep, that codepath got dropped in this release |
|
72 |
+ |
|
73 |
+* Mon May 20 2013 Matt Domsch <mdomsch@fedoraproject.org> - 1.5.0-0.1.gitb1ae0fbe |
|
74 |
+- upstream 1.5.0-alpha3 plus fixes |
|
75 |
+- add dep on pyxattr for the --xattr option |
|
76 |
+ |
|
77 |
+* Tue Jun 19 2012 Matt Domsch <mdomsch@fedoraproject.org> - 1.1.0-0.4.git11e5755e |
|
78 |
+- add local MD5 cache |
|
79 |
+ |
|
80 |
+* Mon Jun 18 2012 Matt Domsch <mdomsch@fedoraproject.org> - 1.1.0-0.3.git7de0789d |
|
81 |
+- parallelize local->remote syncs |
|
82 |
+ |
|
83 |
+* Mon Jun 18 2012 Matt Domsch <mdomsch@fedoraproject.org> - 1.1.0-0.2.gitf881b162 |
|
84 |
+- add hardlink / duplicate file detection support |
|
85 |
+ |
|
86 |
+* Fri Mar 9 2012 Matt Domsch <mdomsch@fedoraproject.org> - 1.1.0-0.1.git2dfe4a65 |
|
87 |
+- build from git for mdomsch patches to s3cmd sync |
|
88 |
+ |
|
89 |
+* Thu Feb 23 2012 Dennis Gilmore <dennis@ausil.us> - 1.0.1-1 |
|
90 |
+- update to 1.0.1 release |
|
91 |
+ |
|
92 |
+* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-4 |
|
93 |
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild |
|
94 |
+ |
|
95 |
+* Thu May 05 2011 Lubomir Rintel (GoodData) <lubo.rintel@gooddata.com> - 1.0.0-3 |
|
96 |
+- No hashlib hackery |
|
97 |
+ |
|
98 |
+* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2 |
|
99 |
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |
|
100 |
+ |
|
101 |
+* Tue Jan 11 2011 Lubomir Rintel (GoodData) <lubo.rintel@gooddata.com> - 1.0.0-1 |
|
102 |
+- New upstream release |
|
103 |
+ |
|
104 |
+* Mon Nov 29 2010 Lubomir Rintel (GoodData) <lubo.rintel@gooddata.com> - 0.9.9.91-3 |
|
105 |
+- Patch for broken f14 httplib |
|
106 |
+ |
|
107 |
+* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.9.91-2.1 |
|
108 |
+- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild |
|
109 |
+ |
|
110 |
+* Wed Apr 28 2010 Lubomir Rintel (GoodData) <lubo.rintel@gooddata.com> - 0.9.9.91-1.1 |
|
111 |
+- Do not use sha1 from hashlib |
|
112 |
+ |
|
113 |
+* Sun Feb 21 2010 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 0.9.9.91-1 |
|
114 |
+- New upstream release |
|
115 |
+ |
|
116 |
+* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.9-2 |
|
117 |
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
|
118 |
+ |
|
119 |
+* Tue Feb 24 2009 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 0.9.9-1 |
|
120 |
+- New upstream release |
|
121 |
+ |
|
122 |
+* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.9.8.4-2 |
|
123 |
+- Rebuild for Python 2.6 |
|
124 |
+ |
|
125 |
+* Tue Nov 11 2008 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 0.9.8.4-1 |
|
126 |
+- New upstream release, URI encoding patch upstreamed |
|
127 |
+ |
|
128 |
+* Fri Sep 26 2008 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 0.9.8.3-4 |
|
129 |
+- Try 3/65536 |
|
130 |
+ |
|
131 |
+* Fri Sep 26 2008 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 0.9.8.3-3 |
|
132 |
+- Whoops, forgot to actually apply the patch. |
|
133 |
+ |
|
134 |
+* Fri Sep 26 2008 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 0.9.8.3-2 |
|
135 |
+- Fix listing of directories with special characters in names |
|
136 |
+ |
|
137 |
+* Thu Jul 31 2008 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 0.9.8.3-1 |
|
138 |
+- New upstream release: Avoid running out-of-memory in MD5'ing large files. |
|
139 |
+ |
|
140 |
+* Fri Jul 25 2008 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 0.9.8.2-1.1 |
|
141 |
+- Fix a typo |
|
142 |
+ |
|
143 |
+* Tue Jul 15 2008 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 0.9.8.2-1 |
|
144 |
+- New upstream |
|
145 |
+ |
|
146 |
+* Fri Jul 04 2008 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 0.9.8.1-3 |
|
147 |
+- Be satisfied with ET provided by 2.5 python |
|
148 |
+ |
|
149 |
+* Fri Jul 04 2008 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 0.9.8.1-2 |
|
150 |
+- Added missing python-devel BR, thanks to Marek Mahut |
|
151 |
+- Packaged the Python egg file |
|
152 |
+ |
|
153 |
+* Wed Jul 02 2008 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> - 0.9.8.1-1 |
|
154 |
+- Initial packaging attempt |