rev 10655 - scripts

Modestas Vainius modax-guest at alioth.debian.org
Tue May 20 12:31:01 UTC 2008


Author: modax-guest
Date: 2008-05-20 12:31:00 +0000 (Tue, 20 May 2008)
New Revision: 10655

Modified:
   scripts/autofixtll
Log:
v0.5.6: Support changing of the quilt command and do not require debian subdir if custom build command is used

Modified: scripts/autofixtll
===================================================================
--- scripts/autofixtll	2008-05-20 12:21:19 UTC (rev 10654)
+++ scripts/autofixtll	2008-05-20 12:31:00 UTC (rev 10655)
@@ -81,6 +81,11 @@
 cannot be automatically resolved and restart build process immediately when the
 editor is closed.
 
+=item B<--quilt>=I<command>, B<-q> I<command>
+
+Use the specified command to invoke quilt instead of default 
+`QUILT_PATCHES=debian/patches quilt'
+
 =back
 
 =head1 LICENSE
@@ -128,8 +133,8 @@
 );
 
 #### Some defaults
+my $MSG_PREFIX = "--=--";
 my $QUILT = "QUILT_PATCHES=debian/patches quilt";
-my $MSG_PREFIX = "--=--";
 
 ############### Implementation ###############################
 
@@ -511,11 +516,13 @@
 }
 
 sub check_environment {
-    my ($builddir, $patchname) = @_;
+    my ($builddir, $buildcmd, $patchname) = @_;
 
     print "$MSG_PREFIX Script Version v$main::VERSION $MSG_PREFIX", "\n";
 
-    system("dh_testdir") == 0 or die "$MSG_PREFIX Please run this script from the debianized source tree $MSG_PREFIX\n";
+    if ($buildcmd =~ m/^debian/) {
+        system("dh_testdir") == 0 or die "$MSG_PREFIX Please run this script from the debianized source tree $MSG_PREFIX\n";
+    }
 
     my $toppatch = `$QUILT top`;
     chomp $toppatch;
@@ -534,7 +541,7 @@
 
 ############## Main loop ##############################
 
-$main::VERSION = "0.5.5";
+$main::VERSION = "0.5.6";
 
 my $sourcedir = Cwd::getcwd();
 my $builddir = "obj-" . get_gnu_build_type();
@@ -553,12 +560,13 @@
         "exec-in-build-dir|i!" => \$exec_in_build_dir,
         "patch-name|p=s" => \$patchname,
         "do-backups|backup!" => \$do_backups,
+        "quilt|q=s" => \$QUILT,
     )) {
 
     pod2usage(-exitval => 1, -verbose => 2, -noperldoc => 1) if ($show_help);
 
     $builddir = Cwd::realpath(File::Spec->catdir($sourcedir, $builddir));
-    check_environment($builddir, $patchname);
+    check_environment($builddir, $buildcmd, $patchname);
 
     if (load_libraries(\@LIBS) == 0) {
         die "Error: No dynamic symbols found in predefined libraries";




More information about the pkg-kde-commits mailing list