[vdr] 02/12: Support different upstream tarball naming schemes in debianize-vdr-plugin script (Closes: #874676)

Tobias Grimm tiber-guest at moszumanska.debian.org
Sat Feb 10 18:21:35 UTC 2018


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

tiber-guest pushed a commit to annotated tag debian/2.3.8-2_etobi1
in repository vdr.

commit 9dc4f9c8310bd24c2cfbb2a8644dbd0de93882e4
Author: Malte Forkel <malte.forkel at berlin.de>
Date:   Wed Dec 27 22:32:55 2017 +0100

    Support different upstream tarball naming schemes in debianize-vdr-plugin script (Closes: #874676)
---
 debian/debianize-vdrplugin | 29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/debian/debianize-vdrplugin b/debian/debianize-vdrplugin
index be8a7cd..600dda4 100755
--- a/debian/debianize-vdrplugin
+++ b/debian/debianize-vdrplugin
@@ -2,20 +2,22 @@
 
 detect_plugin_name()
 {
-    local PATTERN='.*\/\(.*\)-\([0-9][0-9a-zA-Z+.~-]*\)$'
-    if pwd | grep -q -E ".*\/.*-[0-9][0-9a-zA-Z+.~-]*$" ; then
-        PLUGIN=`pwd | sed "s/$PATTERN/\1/"`
-        VERSION=`pwd | sed "s/$PATTERN/\2/"`
+    local pattern='.*/(?:vdr-)?(?:plugin-)?([^/]*)-(\d[\da-zA-Z+.~-]*)$'
+    if pwd | grep -q -P "$pattern"; then
+        PLUGIN=`pwd | perl -lpe "s|$pattern|\1|"`
+        VERSION=`pwd | perl -lpe "s|$pattern|\2|"`
     else
-        echo "debianize-vdrplugin expects the upstream sources to be extracted in a"
-        echo "directory named:  <PLUGIN-NAME>-<VERSION>"
-        echo 
-        echo "e.g.: coolplugin-0.0.1"
-        echo 
-        echo "The upsteam tarball should be named: vdr-<PLUGIN-NAME>-<VERSION>.tar.gz"
-        echo 
-        echo "e.g.: vdr-coolplugin-0.0.1.tar.gz"
+        echo "debianize-vdrplugin expects to be executed in the directory containing"
+        echo "the upstream sources. That directory should be named"
+        echo "  [vdr-][plugin-]<PLUGIN-NAME>-<VERSION>,"
+        echo "  e.g. vdr-plugin-coolplugin-0.0.1"
+        echo "  or   vdr-coolplugin-0.0.1"
+        echo "  or   plugin-coolplugin-0.0.1"
+        echo "  or   coolplugin-0.0.1"
         echo 
+        echo "The upsteam tarball should be named"
+        echo "  [vdr-][plugin-]<PLUGIN-NAME>-<VERSION>.tar.gz,"
+        echo "  e.g. vdr-coolplugin-0.0.1.tar.gz"
         exit 1
     fi
 }
@@ -34,6 +36,9 @@ create_orig_tarball()
         ln -sf `basename $tarball` $ORIGTARBALL
         return
     done
+
+    echo "The upstream tarball was not found!"
+    exit 1
 }
 
 check_dh_make()

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



More information about the pkg-vdr-dvb-changes mailing list