Description: adjust use lib and similar invocations for Debian package
Origin: vendor
diff --git a/mt-atom.cgi b/mt-atom.cgi
index 8ba50d0..17cfce4 100755
--- a/mt-atom.cgi
+++ b/mt-atom.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::AtomServer';
diff --git a/mt-comments.cgi b/mt-comments.cgi
index 85fd6b3..0956ca7 100755
--- a/mt-comments.cgi
+++ b/mt-comments.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Comments';
diff --git a/mt-feed.cgi b/mt-feed.cgi
index 49d8a70..46457af 100755
--- a/mt-feed.cgi
+++ b/mt-feed.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::ActivityFeeds';
diff --git a/mt-ftsearch.cgi b/mt-ftsearch.cgi
index 62e0937..95d0f25 100755
--- a/mt-ftsearch.cgi
+++ b/mt-ftsearch.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Search::FreeText';
diff --git a/mt-search.cgi b/mt-search.cgi
index b56591d..66e51ed 100755
--- a/mt-search.cgi
+++ b/mt-search.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Search';
diff --git a/mt-tb.cgi b/mt-tb.cgi
index 549c2f8..47d9846 100755
--- a/mt-tb.cgi
+++ b/mt-tb.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Trackback';
diff --git a/mt-upgrade.cgi b/mt-upgrade.cgi
index 2ba0bca..0eb005c 100755
--- a/mt-upgrade.cgi
+++ b/mt-upgrade.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Upgrader';
diff --git a/mt-wizard.cgi b/mt-wizard.cgi
index 8bf5777..822288f 100755
--- a/mt-wizard.cgi
+++ b/mt-wizard.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::Wizard';
diff --git a/mt.cgi b/mt.cgi
index ab26123..27a9d4a 100755
--- a/mt.cgi
+++ b/mt.cgi
@@ -7,5 +7,5 @@
 # $Id$
 
 use strict;
-use lib $ENV{MT_HOME} ? "$ENV{MT_HOME}/lib" : 'lib';
+use lib '/usr/share/movabletype/extlib';
 use MT::Bootstrap App => 'MT::App::CMS';
diff --git a/tools/convert-db b/tools/convert-db
index 5849ff1..bf97c17 100755
--- a/tools/convert-db
+++ b/tools/convert-db
@@ -12,7 +12,7 @@ use Getopt::Long;
 GetOptions( "old:s" => \my($old_config),
             "new:s" => \my($new_config));
 
-use lib qw( lib extlib );
+use lib '/usr/share/movabletype/extlib';
 use File::Spec;
 use MT;
 
diff --git a/tools/list-objects b/tools/list-objects
index 6662e80..fa6acda 100755
--- a/tools/list-objects
+++ b/tools/list-objects
@@ -2,7 +2,7 @@
 use strict;
 binmode STDOUT, ":utf8";
 
-use lib 'extlib', 'lib', '../lib';
+use lib '/usr/share/movabletype/extlib';
 
 my %opts;
 use Getopt::Long;
diff --git a/tools/mt-tmpl-preview b/tools/mt-tmpl-preview
index 7eeac60..a051120 100755
--- a/tools/mt-tmpl-preview
+++ b/tools/mt-tmpl-preview
@@ -1,6 +1,7 @@
 #!/usr/bin/perl -w
 
 use strict;
+use lib '/usr/share/movabletype/extlib';
 
 # establish blog id for cases where we process
 # a template from a file...
@@ -9,7 +10,6 @@ if (!$blog_id) {
     die "Please specify a MT_BLOG shell parameter.";
 }
 
-use lib 'lib';
 use MT::Bootstrap;
 use MT;
 use MT::Template::Context;
diff --git a/tools/plugin-config b/tools/plugin-config
index 4f67a41..2097411 100755
--- a/tools/plugin-config
+++ b/tools/plugin-config
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
+use lib '/usr/share/movabletype/extlib';
 
-use lib 'lib', '../lib';
 use MT::Bootstrap;
 use MT;
 use MT::PluginData;
diff --git a/tools/remove-object b/tools/remove-object
index 5c5074c..93d67c8 100755
--- a/tools/remove-object
+++ b/tools/remove-object
@@ -1,7 +1,6 @@
 #!/usr/bin/perl -w
 use strict;
-
-use lib 'lib';
+use lib '/usr/share/movabletype/extlib';
 
 use MT;
 my $mt = MT->new or die MT->errstr;
diff --git a/tools/run-periodic-tasks b/tools/run-periodic-tasks
index 7c16bf1..886236f 100755
--- a/tools/run-periodic-tasks
+++ b/tools/run-periodic-tasks
@@ -7,8 +7,7 @@
 # $Id$
 
 use strict;
-
-use lib 'lib', '../lib', 'extlib', '../extlib';
+use lib '/usr/share/movabletype/extlib';
 
 my $daemonize = 0;
 my $sleep     = 5;
diff --git a/tools/sig-validate b/tools/sig-validate
index 910ed6f..caba8d9 100755
--- a/tools/sig-validate
+++ b/tools/sig-validate
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 
-use lib 'lib';
+use lib '/usr/share/movabletype/extlib';
 
 use MT::App::Comments;
 
diff --git a/tools/upgrade b/tools/upgrade
index 07e32fc..6b5f31c 100755
--- a/tools/upgrade
+++ b/tools/upgrade
@@ -10,7 +10,7 @@ package MT::Tool::Upgrade;
 use strict;
 use utf8;
 
-use lib  qw( extlib lib );
+use lib '/usr/share/movabletype/extlib';
 use base qw( MT::Tool );
 
 use Carp qw(confess);
diff --git a/mt-xmlrpc.cgi b/mt-xmlrpc.cgi
index 9c2c667..eb4386e 100755
--- a/mt-xmlrpc.cgi
+++ b/mt-xmlrpc.cgi
@@ -7,10 +7,10 @@
 # $Id$
 
 use strict;
+use lib '/usr/share/movabletype/extlib';
 my $MT_DIR;
 
 sub BEGIN {
-    require File::Spec;
     if ( !( $MT_DIR = $ENV{MT_HOME} ) ) {
         if ( $0 =~ m!(.*[/\\])! ) {
             $MT_DIR = $1;
@@ -20,8 +20,6 @@ sub BEGIN {
         }
         $ENV{MT_HOME} = $MT_DIR;
     }
-    unshift @INC, File::Spec->catdir( $MT_DIR, 'lib' );
-    unshift @INC, File::Spec->catdir( $MT_DIR, 'extlib' );
 }
 
 use XMLRPC::Transport::HTTP;
