[Pkg-javascript-commits] [jquery] 11/15: debian/prepare-tarball: prepare the tarball used as upstream source

Antonio Terceiro terceiro at moszumanska.debian.org
Wed Sep 2 14:44:33 UTC 2015


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository jquery.

commit a17918d90cd59e99486382e28460e50809f34d34
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Wed Sep 2 09:03:01 2015 -0300

    debian/prepare-tarball: prepare the tarball used as upstream source
---
 debian/README.source.md | 23 +++++++++++++++++++++++
 debian/changelog        |  2 ++
 debian/copyright        |  1 -
 debian/prepare-tarball  | 34 ++++++++++++++++++++++++++++++++++
 debian/watch            |  2 +-
 5 files changed, 60 insertions(+), 2 deletions(-)

diff --git a/debian/README.source.md b/debian/README.source.md
new file mode 100644
index 0000000..c6094ac
--- /dev/null
+++ b/debian/README.source.md
@@ -0,0 +1,23 @@
+Starting with version 3.0, jQuery is distributed in two flavors:
+
+* the main one, which is targetted at modern browsers and non-browser
+  environments;
+* the "compat" branch, which still supports browsers that are considered
+  obsolete, such as IE8.
+
+These flavors are very similar to each other, and are released in lockstep, so
+there is no much sense in having two separate source packages. So this is how
+this package is handled:
+
+* take the original tarball for main jQuery release from the github releases
+  page.
+* remove dist/, which contains a pre-built jquery.js, jquery.min.js, and
+  jquery.min.map
+* add the src/ directory from the compat branch original tarball
+
+This process is automated in `debian/watch` and `debian/prepare-tarball`, so
+that when you run `uscan` to get a new upstream release, the resulting tarball
+is ready to be used.
+
+For the build process, see `debian/rules`, `debian/build.js` and
+`debian/minify`.
diff --git a/debian/changelog b/debian/changelog
index f5a86be..2e4f21a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ jquery (3.0.0~alpha1+dfsg-1) UNRELEASED; urgency=medium
   * debian/watch:
     - also look for alpha/beta versions
     - automate adding +dfsg to downloaded upstream tarballs
+    - call debian/prepare-tarball to prepare the tarball used as upstream
+      source. See debian/README.source.md.
   * Added DEP-8 tests:
     - debian/tests/check-against-upstream-build: checks that our build matches
       upstream's.
diff --git a/debian/copyright b/debian/copyright
index 0b1a047..8bb9a57 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,7 +2,6 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: jQuery
 Source: http://jquery.com/
 Comment: For more details on developers please see http://docs.jquery.com/Contributors
-Files-Excluded: dist
 
 Files: *
 Copyright: 2005-2011 John Resig, Brandon Aaron & Jörn Zaefferer
diff --git a/debian/prepare-tarball b/debian/prepare-tarball
new file mode 100755
index 0000000..4be78d2
--- /dev/null
+++ b/debian/prepare-tarball
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+set -ex
+
+debian_version="$2"
+upstream_version=$(echo "$debian_version" | sed -e 's/~/-/; s/[+]dfsg//')
+
+# absolute path
+tarball=$(readlink -f "$3")
+
+tmpdir=$(mktemp -d)
+cleanup() {
+  rm -rf "$tmpdir"
+}
+trap cleanup INT TERM EXIT
+
+cd "$tmpdir"
+wget https://github.com/jquery/jquery/archive/${upstream_version}+compat.tar.gz
+
+# extract compat branch tarball
+tar xaf ${upstream_version}+compat.tar.gz
+
+# extract main tarball
+tar xaf "$tarball"
+
+# add source for compat branch
+cp -r jquery-${upstream_version}-compat/src jquery-${upstream_version}/src-compat
+
+# remove dist/
+rm -rf jquery-${upstream_version}/dist
+
+# recompress
+rm -f "$tarball"
+tar caf "$tarball" jquery-${upstream_version}
diff --git a/debian/watch b/debian/watch
index 3fc4cd0..536b07e 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,4 +1,4 @@
 version=3
 opts="dversionmangle=s/[+]dfsg(.?\d+)?$//,uversionmangle=s/-/~/;s/$/+dfsg/" \
 https://github.com/jquery/jquery/releases \
-  .*/([0-9][0-9a-z.-]+)\.tar\.gz
+  .*/([0-9][0-9a-z.-]+)\.tar\.gz debian debian/prepare-tarball

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/jquery.git



More information about the Pkg-javascript-commits mailing list