Subject: [PATCH] Massage the index a bit by stripping the main directory name

From: Raphael Geissert <[email-masked]>
Date: Mon, 2 Feb 2009 21:15:09 -0600

---
 unpack/unpack-srcpkg-l1 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/unpack/unpack-srcpkg-l1 b/unpack/unpack-srcpkg-l1
index 970fb95..854cfe7 100755
--- a/unpack/unpack-srcpkg-l1
+++ b/unpack/unpack-srcpkg-l1
@@ -80,7 +80,7 @@ if (!$tarball) {
 # create index file for package
 spawn({ fail => 'error', out => "$base_dir/index" },
       ["tar", "tfv", $tarball],
-      '|', ["sed", "-e", "s/^h/-/"],
+      '|', ['perl', '-p -w -E', 's,^(([^\s]+\s+){5})[^/]+,$1.,;s,^h,-,'],
       '|', ["sort", "-k", "6"]);
 
 # Create symbolic links to binary packages