[Pkg-mono-svn-commits] rev 3171 - in cli-common/trunk: . debian

Mirco Bauer meebey-guest at alioth.debian.org
Sun May 20 23:44:16 UTC 2007


Author: meebey-guest
Date: 2007-05-20 23:44:15 +0000 (Sun, 20 May 2007)
New Revision: 3171

Added:
   cli-common/trunk/dh_clistrip
Modified:
   cli-common/trunk/cli-policy.sgml
   cli-common/trunk/debian/changelog
   cli-common/trunk/debian/rules
Log:
- implemented dh_clistrip



Modified: cli-common/trunk/cli-policy.sgml
===================================================================
--- cli-common/trunk/cli-policy.sgml	2007-05-20 23:04:28 UTC (rev 3170)
+++ cli-common/trunk/cli-policy.sgml	2007-05-20 23:44:15 UTC (rev 3171)
@@ -1,6 +1,6 @@
 <!doctype debiandoc public "-//DebianDoc//DTD DebianDoc//EN"> <book>
   <title>
-    Debian CLI Policy (DRAFT)
+    Debian CLI Policy
   </title>
   
   <author>

Modified: cli-common/trunk/debian/changelog
===================================================================
--- cli-common/trunk/debian/changelog	2007-05-20 23:04:28 UTC (rev 3170)
+++ cli-common/trunk/debian/changelog	2007-05-20 23:44:15 UTC (rev 3171)
@@ -1,3 +1,13 @@
+cli-common (0.4.9~pre1) unstable; urgency=low
+
+  * NOT RELEASED YET
+  * Mirco 'meebey' Bauer':
+    + dh_clistrip:
+      - New debhelper tool similar to dh_strip to strip (delete) or move
+        debugging symbols of CLI applications and libraries.
+
+ -- Mirco Bauer <meebey at debian.org>  Mon, 21 May 2007 01:43:14 +0200
+
 cli-common (0.4.8) unstable; urgency=low
 
   * Upload to unstable

Modified: cli-common/trunk/debian/rules
===================================================================
--- cli-common/trunk/debian/rules	2007-05-20 23:04:28 UTC (rev 3170)
+++ cli-common/trunk/debian/rules	2007-05-20 23:44:15 UTC (rev 3171)
@@ -11,8 +11,8 @@
 	debiandoc2text cli-policy.sgml
 	debiandoc2html cli-policy.sgml
 	debiandoc2pdf cli-policy.sgml
-	for x in dh_clideps dh_makeclilibs dh_installcligac dh_clifixperms dh_createclipolicy; \
-	  do chmod +x $$x; pod2man -c "Debhelper for CLI (.NET)" $$x > $$x.1; done
+	for x in dh_clideps dh_makeclilibs dh_installcligac dh_clifixperms dh_clistrip dh_createclipolicy; \
+	  do chmod +x $$x; pod2man -c "Debhelper for CLI (Common Language Infrastructure)" $$x > $$x.1; done
 	touch build-stamp
 
 clean:

Added: cli-common/trunk/dh_clistrip
===================================================================
--- cli-common/trunk/dh_clistrip	                        (rev 0)
+++ cli-common/trunk/dh_clistrip	2007-05-20 23:44:15 UTC (rev 3171)
@@ -0,0 +1,105 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_clistrip - strips CLI debug symbols from package build directories
+
+=cut
+
+use strict;
+use File::Find;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_clistrip> [S<I<debhelper options>>] [B<-X>I<item>] [--dbg-package=package]
+
+=head1 DESCRIPTION
+
+dh_clistrip is a debhelper program that removes debug symbols from
+CLI libraries and applications.
+
+dh_clistrip deletes all *.exe.mdb and *.dll.mdb files.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-X>I<item>, B<--exclude=>I<item>
+
+Exclude files that contain "item" anywhere in their filename from being
+deleted. You may use this option multiple times to build up a list of things
+to exclude.
+
+=item B<--dbg-package=>I<package>
+
+Moves the debug symbols to the specified package.
+
+=back
+
+=cut
+
+init();
+
+my $pwd = `pwd`;
+chomp $pwd;
+
+# This variable can be used to turn off stripping (see Policy).
+if (defined $ENV{DEB_BUILD_OPTIONS} && $ENV{DEB_BUILD_OPTIONS} =~ /nostrip/) {
+	exit;
+}
+        
+foreach my $package (@{$dh{DOPACKAGES}}) {
+	my $tmp = tmpdir($package);
+
+	my $debug_pkg = '';
+	if (defined($dh{DEBUGPACKAGES})) {
+		$debug_pkg = @{$dh{DEBUGPACKAGES}}[0];
+		verbose_print("debug_pkg: $debug_pkg");
+	}
+	
+	if ($package eq $debug_pkg) {
+		# skip debug package
+		next;
+	}
+	
+	# find debug symbols
+	find (sub {
+		foreach my $exclude (@{$dh{EXCLUDE}}) {  
+			return if /$exclude/;
+		}
+		return unless -f && /\.(exe|dll)\.mdb$/;
+        	
+		my $file = $_;
+		my $dir = $File::Find::dir;
+		
+		if ($debug_pkg ne '') {
+			my $debug_dir = $dir;
+			verbose_print("dir: $dir");
+			$debug_dir =~ s!$tmp!!;
+			verbose_print("debug_dir: $debug_dir");
+			$debug_dir = $pwd . "/debian/$debug_pkg/" . $debug_dir;
+			verbose_print("debug_dir: $debug_dir");
+			if (! -d $debug_dir) {
+				doit("install", "-d", $debug_dir);
+			}
+			verbose_print("moving $file to $debug_dir");
+			doit("mv", $file, $debug_dir);
+		} else {
+			verbose_print("deleting $file");
+			doit("rm", $file);
+		}
+	}, $tmp);
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of cli-common.
+
+=head1 AUTHOR
+
+Mirco Bauer <meebey at meebey.net>
+
+=cut


Property changes on: cli-common/trunk/dh_clistrip
___________________________________________________________________
Name: svn:executable
   + *




More information about the Pkg-mono-svn-commits mailing list