[scorched3d] 03/03: inline source_package_build.bash functions

Phil Morrell emorrp1-guest at moszumanska.debian.org
Sun Feb 28 14:34:32 UTC 2016


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

emorrp1-guest pushed a commit to branch repack_uscan
in repository scorched3d.

commit 72c1dde57bb92b928d53c47bbf1871adee5070c9
Author: Phil Morrell <debian at emorrp1.name>
Date:   Sun Feb 28 14:17:02 2016 +0000

    inline source_package_build.bash functions
---
 debian/copyright                 |  1 -
 debian/repack                    | 45 +++++++++++++++++++++++++++++++++-------
 debian/source_package_build.bash | 43 --------------------------------------
 3 files changed, 37 insertions(+), 52 deletions(-)

diff --git a/debian/copyright b/debian/copyright
index fbac05d..eb36636 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -231,7 +231,6 @@ domain. For the exact license information install openclipart-svg and see
 
 Files:
  debian/repack
- debian/source_package_build.bash
 Copyright:
  © 2013–2014 Ben Finney <ben+debian at benfinney.id.au>
 License:
diff --git a/debian/repack b/debian/repack
index 19094e1..f9d5bee 100755
--- a/debian/repack
+++ b/debian/repack
@@ -11,7 +11,43 @@ set -o pipefail
 set -o nounset
 
 program_dir="$(dirname "$(realpath --strip "$0")")"
-source "${program_dir}"/source_package_build.bash
+
+# Common code for building Debian upstream source package.
+working_dir="$(mktemp -d -t)"
+
+exit_sigspecs="ERR EXIT SIGTERM SIGHUP SIGINT SIGQUIT"
+
+function cleanup_exit() {
+    exit_status=$?
+    trap - $exit_sigspecs
+
+    rm -rf "${working_dir}"
+    printf "Cleaned up working directory ‘${working_dir}’\n"
+
+    exit $exit_status
+}
+trap cleanup_exit $exit_sigspecs
+
+package_name=$(dpkg-parsechangelog --show-field=Source)
+release_version=$(dpkg-parsechangelog --show-field=Version)
+upstream_version=$(printf "${release_version}" \
+        | sed -e 's/^[[:digit:]]\+://' -e 's/[-][^-]\+$//')
+upstream_dirname="${package_name}-${upstream_version}.orig"
+upstream_tarball_basename="${package_name}_${upstream_version}.orig"
+
+function extract_tarball_to_working_dir() {
+    # Extract the specified tarball to the program's working directory.
+    local tarball="$1"
+    tar -xzf "${tarball}" --directory "${working_dir}"
+}
+
+function archive_working_dirname_to_tarball() {
+    # Archive the specified directory, relative to the working directory,
+    # to a new tarball of the specified name.
+    local source_dirname="$1"
+    local tarball="$2"
+    GZIP="--best" tar --directory "${working_dir}" -czf "${tarball}" "${source_dirname}"
+}
 
 function usage() {
     local progname=$(basename $0)
@@ -77,10 +113,3 @@ rm -v "${downloaded_file}"
 mv "${target_working_file}" "${target_file}"
 
 printf "Done.\n"
-
-# Local variables:
-# coding: utf-8
-# mode: sh
-# indent-tabs-mode: nil
-# End:
-# vim: fileencoding=utf-8 filetype=bash :
diff --git a/debian/source_package_build.bash b/debian/source_package_build.bash
deleted file mode 100644
index d6e7e1f..0000000
--- a/debian/source_package_build.bash
+++ /dev/null
@@ -1,43 +0,0 @@
-# Common code for building Debian upstream source package.
-
-working_dir="$(mktemp -d -t)"
-
-exit_sigspecs="ERR EXIT SIGTERM SIGHUP SIGINT SIGQUIT"
-
-function cleanup_exit() {
-    exit_status=$?
-    trap - $exit_sigspecs
-
-    rm -rf "${working_dir}"
-    printf "Cleaned up working directory ‘${working_dir}’\n"
-
-    exit $exit_status
-}
-trap cleanup_exit $exit_sigspecs
-
-package_name=$(dpkg-parsechangelog --show-field=Source)
-release_version=$(dpkg-parsechangelog --show-field=Version)
-upstream_version=$(printf "${release_version}" \
-        | sed -e 's/^[[:digit:]]\+://' -e 's/[-][^-]\+$//')
-upstream_dirname="${package_name}-${upstream_version}.orig"
-upstream_tarball_basename="${package_name}_${upstream_version}.orig"
-
-function extract_tarball_to_working_dir() {
-    # Extract the specified tarball to the program's working directory.
-    local tarball="$1"
-    tar -xzf "${tarball}" --directory "${working_dir}"
-}
-
-function archive_working_dirname_to_tarball() {
-    # Archive the specified directory, relative to the working directory,
-    # to a new tarball of the specified name.
-    local source_dirname="$1"
-    local tarball="$2"
-    GZIP="--best" tar --directory "${working_dir}" -czf "${tarball}" "${source_dirname}"
-}
-
-# Local variables:
-# coding: utf-8
-# mode: sh
-# End:
-# vim: fileencoding=utf-8 filetype=bash :

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



More information about the Pkg-games-commits mailing list