Browse code

* debian-build.sh, debian/*: Added Debian packaging files.

git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/branches/1.0.x@468 830e0280-6d2a-0410-9c65-932aecc39d9d

Michal Ludvig authored on 2011/01/19 22:39:39
Showing 15 changed files
... ...
@@ -6,3 +6,4 @@ dist
6 6
 build
7 7
 .*.swp
8 8
 s3cmd.1.gz
9
+debian-build
... ...
@@ -1,3 +1,7 @@
1
+2011-01-20  Michal Ludvig  <mludvig@logix.net.nz>
2
+
3
+	* debian-build.sh, debian/*: Added Debian packaging files.
4
+
1 5
 2011-01-09  Michal Ludvig  <mludvig@logix.net.nz>
2 6
 
3 7
 	* Released version 1.0.0
4 8
new file mode 100755
... ...
@@ -0,0 +1,38 @@
0
+#!/bin/bash
1
+
2
+set -e
3
+
4
+export DEBEMAIL="Michal Ludvig <mludvig@logix.net.nz>"
5
+export SIGNKEY="S3tools <s3tools@s3tools.org>"
6
+export DISTRIB="stable" # Either stable or testing
7
+
8
+VERSION=$(./s3cmd --version | awk '{print $NF}')
9
+echo -e "Building \033[32ms3cmd \033[31m${VERSION}\033[0m for Debian..."
10
+
11
+rm -rf debian-build
12
+mkdir -p debian-build
13
+cd debian-build
14
+cp ../dist/s3cmd-${VERSION}.tar.gz s3cmd_${VERSION}.orig.tar.gz
15
+tar xf s3cmd_${VERSION}.orig.tar.gz
16
+svn export ../debian s3cmd-${VERSION}/debian
17
+cd s3cmd-${VERSION}
18
+debchange -D${DISTRIB} -d
19
+cp debian/changelog ../../debian/
20
+debuild -m"${SIGNKEY}"
21
+cd ..
22
+echo -e "\033[1;32m=== Build: Success ===\033[0m"
23
+
24
+rm -f s3cmd_${VERSION}*.build
25
+mkdir -p repository/${DISTRIB}
26
+mv s3cmd_* repository/${DISTRIB}
27
+gpg --export -a "${SIGNKEY}" > repository/${DISTRIB}/s3tools.key
28
+
29
+cd repository/
30
+cp -a ../s3cmd-${VERSION}/debian/mini-dinstall* .
31
+PATH_OLD=${PATH}
32
+export PATH=${PATH}:$(pwd)
33
+mini-dinstall --batch --config=mini-dinstall.conf -v
34
+export PATH=${OLD_PATH}
35
+echo -e "\033[1;32m=== Repo: Success ===\033[0m"
36
+echo
37
+echo -e "You can now upload \033[1mdebian-build/repository/${DISTRIB}\033[0m to the Internet"
0 38
new file mode 100644
... ...
@@ -0,0 +1,2 @@
0
+Debian packaging files taken from:
1
+svn://svn.debian.org/svn/python-apps/packages/s3cmd/trunk/debian
0 2
new file mode 100644
... ...
@@ -0,0 +1,11 @@
0
+s3cmd (1.0.0-2) stable; urgency=low
1
+
2
+  * Minor build system changes.
3
+
4
+ -- Michal Ludvig <mludvig@logix.net.nz>  Thu, 20 Jan 2011 02:30:01 +1300
5
+
6
+s3cmd (1.0.0-1) stable; urgency=low
7
+
8
+  * Initial release.
9
+
10
+ -- Michal Ludvig <mludvig@logix.net.nz>  Thu, 20 Jan 2011 02:03:13 +1300
0 11
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+7
0 1
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+Source: s3cmd
1
+Section: utils
2
+Priority: optional
3
+Maintainer: Michal Ludvig <mludvig@logix.net.nz>
4
+Build-Depends: debhelper (>= 7), quilt (>= 0.40), python
5
+Build-Depends-Indep: python-support (>= 0.6.4)
6
+Standards-Version: 3.8.4
7
+Homepage: http://s3tools.org/s3cmd
8
+
9
+Package: s3cmd
10
+Architecture: all
11
+Depends: python (>= 2.5) | python-elementtree, ${python:Depends}, ${misc:Depends}
12
+Description: The ultimate Amazon S3 and CloudFront command line client
13
+ Command-line tool for uploading, retrieving and managing data in Amazon S3
14
+ storage service. Also supports publishing to Amazon CloudFront. Designed for 
15
+ power users, easy to use in scripts.
0 16
new file mode 100644
... ...
@@ -0,0 +1,25 @@
0
+This package was first debianized by Mikhail Gusarov <dottedmag@dottedmag.net> on
1
+Mon,  4 Jun 2007 11:00:00 +0600
2
+
3
+It was downloaded from http://s3tools.logix.cz/s3cmd
4
+
5
+Copyright Holders: Michal Ludvig <michal@logix.cz>
6
+
7
+    s3cmd - Amazon S3 manager
8
+    Copyright (C) 2007 Michal Ludvig
9
+
10
+    This program is free software; you can redistribute it and/or modify
11
+    it under the terms of the GNU General Public License as published by
12
+    the Free Software Foundation version 2 of the License.
13
+
14
+    This program is distributed in the hope that it will be useful,
15
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
+    GNU General Public License for more details.
18
+
19
+    You should have received a copy of the GNU General Public License along
20
+    with this program; if not, write to the Free Software Foundation, Inc.,
21
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22
+
23
+On Debian systems, the complete text of the GNU General Public License
24
+can be found in /usr/share/common-licenses/GPL-2 file.
0 25
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+README
0 1
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+s3cmd_1.0.0-1_all.deb utils optional
0 1
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+s3cmd.1
0 1
new file mode 100755
... ...
@@ -0,0 +1,35 @@
0
+#!/bin/bash
1
+# -*- coding: utf-8 -*-
2
+# Sample script to GPG sign Release files
3
+# Copyright © 2002 Colin Walters <walters@debian.org>
4
+
5
+# This program is free software; you can redistribute it and/or modify
6
+# it under the terms of the GNU General Public License as published by
7
+# the Free Software Foundation; either version 2 of the License, or
8
+# (at your option) any later version.
9
+
10
+# This program is distributed in the hope that it will be useful,
11
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
+# GNU General Public License for more details.
14
+
15
+# You should have received a copy of the GNU General Public License
16
+# along with this program; if not, write to the Free Software
17
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
+
19
+# Usage:
20
+
21
+# You need to create a secret keyring (secring.gpg).  You can use your
22
+# existing one, or create a new one by doing something like the
23
+# following:
24
+
25
+# $ GNUPGHOME=/src/debian/mini-dinstall/s3kr1t gnupg --gen-key
26
+
27
+set -e
28
+
29
+# Initialize GPG
30
+gpg --help 1>/dev/null 2>&1 || true
31
+
32
+rm -f Release.gpg.tmp
33
+gpg --batch --default-key "${SIGNKEY}" --detach-sign -o Release.gpg.tmp "$1"
34
+mv Release.gpg.tmp Release.gpg
0 35
new file mode 100644
... ...
@@ -0,0 +1,20 @@
0
+# Colin's mini-dinstall.conf
1
+
2
+[DEFAULT]
3
+architectures = all
4
+archivedir = .
5
+use_dnotify = 0
6
+verify_sigs = 1
7
+extra_keyrings = ~/.gnupg/pubring.gpg
8
+mail_on_success = 0
9
+archive_style = flat
10
+poll_time = 10
11
+mail_log_level = NONE
12
+
13
+generate_release = 1
14
+release_description = S3tools packages
15
+release_signscript = mini-dinstall-sign-release.sh
16
+
17
+[stable]
18
+[testing]
19
+experimental_release = 1
0 20
new file mode 100755
... ...
@@ -0,0 +1,58 @@
0
+#!/usr/bin/make -f
1
+# -*- makefile -*-
2
+
3
+include /usr/share/quilt/quilt.make
4
+
5
+PACKAGE_NAME=s3cmd
6
+PACKAGE_DIR=$(CURDIR)/debian/$(PACKAGE_NAME)
7
+
8
+SHARE_DIR=/usr/share/s3cmd
9
+
10
+clean: clean-patched unpatch
11
+	dh_testdir
12
+	dh_testroot
13
+
14
+	-rm -f S3/*.pyc
15
+
16
+	dh_clean
17
+
18
+#
19
+# We have to run patched setup.py, as it checks for the elementtree
20
+#
21
+clean-patched: patch
22
+	dh_testdir
23
+	dh_testroot
24
+
25
+	S3CMD_PACKAGING=1 python setup.py clean
26
+
27
+install: patch
28
+	dh_testdir
29
+	dh_testroot
30
+	dh_prep
31
+	dh_installdirs
32
+
33
+	S3CMD_PACKAGING=1 python setup.py install --no-compile \
34
+		 --root $(PACKAGE_DIR) \
35
+		 --install-lib $(SHARE_DIR) \
36
+		 --install-scripts $(SHARE_DIR)
37
+	rm -rf $(PACKAGE_DIR)/usr/share/s3cmd/*.egg-info
38
+
39
+binary-indep: install
40
+	dh_testdir
41
+	dh_testroot
42
+	dh_installchangelogs NEWS
43
+	dh_installdocs
44
+	dh_installman
45
+	dh_link $(SHARE_DIR)/s3cmd /usr/bin/s3cmd
46
+	dh_pysupport
47
+	dh_compress -X.py
48
+	dh_fixperms
49
+	dh_installdeb
50
+	dh_gencontrol
51
+	dh_md5sums
52
+	dh_builddeb
53
+
54
+binary-arch: install
55
+
56
+binary: binary-indep binary-arch
57
+.PHONY: build clean binary-indep binary-arch binary install
0 58
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+1.0