[devscripts] 01/01: Install Perl modules into standard directory, $Config{vendorlib}
James McCoy
jamessan at debian.org
Thu May 7 03:46:40 UTC 2015
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch master
in repository devscripts.
commit ab3e1ce600551802bbe39befecfd52c347ac93c6
Author: James McCoy <jamessan at debian.org>
Date: Sun May 3 21:06:05 2015 -0400
Install Perl modules into standard directory, $Config{vendorlib}
Signed-off-by: James McCoy <jamessan at debian.org>
---
Makefile | 14 +++++++-------
Makefile.common | 4 ++--
debian/changelog | 2 ++
{Devscripts => lib/Devscripts}/Compression.pm | 0
{Devscripts => lib/Devscripts}/DB_File_Lock.pm | 0
{Devscripts => lib/Devscripts}/Debbugs.pm | 0
{Devscripts => lib/Devscripts}/PackageDeps.pm | 0
{Devscripts => lib/Devscripts}/Packages.pm | 0
{Devscripts => lib/Devscripts}/Set.pm | 0
{Devscripts => lib/Devscripts}/URI.pm | 0
{Devscripts => lib/Devscripts}/Versort.pm | 0
scripts/Makefile | 8 ++++----
scripts/bts.pl | 1 -
scripts/debchange.pl | 1 -
scripts/debcheckout.pl | 1 -
scripts/debdiff.pl | 1 -
scripts/debuild.pl | 1 -
scripts/dget.pl | 1 -
scripts/dpkg-depcheck.pl | 1 -
scripts/getbuildlog.sh | 1 -
scripts/mk-origtargz.pl | 1 -
scripts/rc-alert.pl | 1 -
scripts/tagpending.pl | 1 -
scripts/uscan.pl | 1 -
test/test_debchange | 2 +-
test/test_debdiff | 2 +-
test/test_mk-origtargz | 2 +-
test/test_uscan | 8 ++------
28 files changed, 20 insertions(+), 34 deletions(-)
diff --git a/Makefile b/Makefile
index 8af5046..fd96376 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,6 @@ include Makefile.common
DESTDIR =
-PERL_MODULES = Devscripts
EXAMPLES = conf.default README.mk-build-deps
all: version make_scripts $(EXAMPLES) translated_manpages
@@ -40,12 +39,13 @@ test-installed:
$(MAKE) -C test/ $@
install: all install_scripts
- cp -a $(PERL_MODULES) $(DESTDIR)$(PERLMOD_DIR)
- cp $(EXAMPLES) $(DESTDIR)$(EXAMPLES_DIR)
- install -D README $(DESTDIR)$(DOCDIR)/README
- install -dD $(DESTDIR)$(MAN1DIR)
- cp doc/*.1 $(DESTDIR)$(MAN1DIR)
- ln -sf edit-patch.1 $(DESTDIR)$(MAN1DIR)/add-patch.1
+ install -d "$(DESTDIR)$(EXAMPLES_DIR)" "$(DESTDIR)$(PERLMOD_DIR)" \
+ "$(DESTDIR)$(DATA_DIR)" "$(DESTDIR)$(DOCDIR)" "$(DESTDIR)$(MAN1DIR)"
+ for f in lib/*; do cp -a "$$f" "$(DESTDIR)$(PERLMOD_DIR)"; done
+ install -m0644 $(EXAMPLES) "$(DESTDIR)$(DATA_DIR)"
+ install -m0644 README "$(DESTDIR)$(DOCDIR)"
+ install -m0644 doc/*.1 "$(DESTDIR)$(MAN1DIR)"
+ ln -sf edit-patch.1 "$(DESTDIR)$(MAN1DIR)/add-patch.1"
test_test:
$(MAKE) -C test/ test
diff --git a/Makefile.common b/Makefile.common
index 0f500d2..c586e80 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -8,6 +8,6 @@ BINDIR = $(PREFIX)/bin
PKGLIBDIR = $(PREFIX)/lib/devscripts
DOCDIR = $(PREFIX)/share/doc/devscripts
MAN1DIR = $(PREFIX)/share/man/man1
-PERLMOD_DIR = $(PREFIX)/share/devscripts
-EXAMPLES_DIR = $(PREFIX)/share/devscripts
+PERLMOD_DIR = $(shell perl -MConfig -e 'print $$Config{vendorlib}')
+DATA_DIR = $(PREFIX)/share/devscripts
SYSCONFDIR = /etc
diff --git a/debian/changelog b/debian/changelog
index 927fcc1..402b31f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ devscripts (2.15.5) UNRELEASED; urgency=medium
+ Always remove empty elements from lists so “-t” doesn't add a new, empty
element. (Closes: #783630)
+ Remove empty lines in debhelper-related files. (Closes: #780667)
+ * Install Perl modules into $Config{vendorlib} and remove the hacks in
+ various scripts to make them see devscript's modules.
-- Cyril Brulebois <kibi at debian.org> Tue, 28 Apr 2015 16:58:36 +0200
diff --git a/Devscripts/Compression.pm b/lib/Devscripts/Compression.pm
similarity index 100%
rename from Devscripts/Compression.pm
rename to lib/Devscripts/Compression.pm
diff --git a/Devscripts/DB_File_Lock.pm b/lib/Devscripts/DB_File_Lock.pm
similarity index 100%
rename from Devscripts/DB_File_Lock.pm
rename to lib/Devscripts/DB_File_Lock.pm
diff --git a/Devscripts/Debbugs.pm b/lib/Devscripts/Debbugs.pm
similarity index 100%
rename from Devscripts/Debbugs.pm
rename to lib/Devscripts/Debbugs.pm
diff --git a/Devscripts/PackageDeps.pm b/lib/Devscripts/PackageDeps.pm
similarity index 100%
rename from Devscripts/PackageDeps.pm
rename to lib/Devscripts/PackageDeps.pm
diff --git a/Devscripts/Packages.pm b/lib/Devscripts/Packages.pm
similarity index 100%
rename from Devscripts/Packages.pm
rename to lib/Devscripts/Packages.pm
diff --git a/Devscripts/Set.pm b/lib/Devscripts/Set.pm
similarity index 100%
rename from Devscripts/Set.pm
rename to lib/Devscripts/Set.pm
diff --git a/Devscripts/URI.pm b/lib/Devscripts/URI.pm
similarity index 100%
rename from Devscripts/URI.pm
rename to lib/Devscripts/URI.pm
diff --git a/Devscripts/Versort.pm b/lib/Devscripts/Versort.pm
similarity index 100%
rename from Devscripts/Versort.pm
rename to lib/Devscripts/Versort.pm
diff --git a/scripts/Makefile b/scripts/Makefile
index 7ddc794..1fb32ed 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -40,14 +40,14 @@ ifeq ($(shell dpkg-vendor --query Vendor),Ubuntu)
# will be for preparing PPA uploads.
sed -i 's/get_ubuntu_devel_distro()/"$(shell lsb_release -cs)"/' $@
endif
- perl -I.. -c $@
+ perl -I ../lib -c $@
%.tmp: %.sh $(VERSION_FILE)
sed -e "s/###VERSION###/$(VERSION)/" $< > $@
bash -n $@
%.tmp: %.pl $(VERSION_FILE)
sed -e "s/###VERSION###/$(VERSION)/" $< > $@
- perl -I.. -c $@
+ perl -I ../lib -c $@
%: %.tmp
cp $< $@
chmod +x $@
@@ -99,8 +99,8 @@ install: all
install -dD $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
cp $(COMPLETION) $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
# Special treatment for debpkg
- install -dD $(DESTDIR)$(PERLMOD_DIR)
- mv $(DESTDIR)$(BINDIR)/debpkg $(DESTDIR)$(PERLMOD_DIR)
+ install -d $(DESTDIR)$(DATA_DIR)
+ mv $(DESTDIR)$(BINDIR)/debpkg $(DESTDIR)$(DATA_DIR)
cp debpkg-wrapper $(DESTDIR)$(BINDIR)/debpkg
.PHONY: test
diff --git a/scripts/bts.pl b/scripts/bts.pl
index 4b0a956..71695b9 100755
--- a/scripts/bts.pl
+++ b/scripts/bts.pl
@@ -53,7 +53,6 @@ use Net::SMTP;
use Cwd;
use IO::File;
use IO::Handle;
-BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::DB_File_Lock;
use Devscripts::Debbugs;
use Fcntl qw(O_RDWR O_RDONLY O_CREAT F_SETFD);
diff --git a/scripts/debchange.pl b/scripts/debchange.pl
index 1ca421f..2bad684 100755
--- a/scripts/debchange.pl
+++ b/scripts/debchange.pl
@@ -42,7 +42,6 @@ use Cwd;
use Dpkg::Vendor qw(get_current_vendor);
use Dpkg::Changelog::Parse;
use Dpkg::Control;
-BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Compression;
use Devscripts::Debbugs;
use POSIX qw(locale_h strftime);
diff --git a/scripts/debcheckout.pl b/scripts/debcheckout.pl
index c5fdd8a..0cd20a3 100755
--- a/scripts/debcheckout.pl
+++ b/scripts/debcheckout.pl
@@ -247,7 +247,6 @@ use File::Basename;
use File::Copy qw/copy/;
use File::Temp qw/tempdir/;
use Cwd;
-BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Compression;
use Devscripts::Versort;
diff --git a/scripts/debdiff.pl b/scripts/debdiff.pl
index 7984945..54c7573 100755
--- a/scripts/debdiff.pl
+++ b/scripts/debdiff.pl
@@ -23,7 +23,6 @@ use File::Basename;
use File::Spec;
use File::Path qw/ rmtree /;
use File::Temp qw/ tempdir tempfile /;
-BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Compression;
use Devscripts::Versort;
diff --git a/scripts/debuild.pl b/scripts/debuild.pl
index 6970010..f1bb498 100755
--- a/scripts/debuild.pl
+++ b/scripts/debuild.pl
@@ -53,7 +53,6 @@ use 5.008;
use File::Basename;
use filetest 'access';
use Cwd;
-BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Compression;
use Dpkg::IPC;
use IO::Handle; # for flushing
diff --git a/scripts/dget.pl b/scripts/dget.pl
index cf060e7..45af642 100755
--- a/scripts/dget.pl
+++ b/scripts/dget.pl
@@ -31,7 +31,6 @@ use Cwd qw(abs_path);
use IO::Dir;
use IO::File;
use Digest::MD5;
-BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Compression;
use Getopt::Long qw(:config gnu_getopt);
use File::Basename;
diff --git a/scripts/dpkg-depcheck.pl b/scripts/dpkg-depcheck.pl
index 70fc291..2bea9cf 100755
--- a/scripts/dpkg-depcheck.pl
+++ b/scripts/dpkg-depcheck.pl
@@ -22,7 +22,6 @@ use Cwd;
use File::Basename;
use Getopt::Long;
-BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Set;
use Devscripts::Packages;
use Devscripts::PackageDeps;
diff --git a/scripts/getbuildlog.sh b/scripts/getbuildlog.sh
index 957362f..6a8c107 100755
--- a/scripts/getbuildlog.sh
+++ b/scripts/getbuildlog.sh
@@ -109,7 +109,6 @@ getbuildlog() {
ver=${match##*ver=}
echo ${ver%%&*}
done | perl -e '
- use lib "/usr/share/devscripts";
use Devscripts::Versort;
while (<>) { push @versions, [$_]; }
@versions = Devscripts::Versort::versort(@versions);
diff --git a/scripts/mk-origtargz.pl b/scripts/mk-origtargz.pl
index 6197537..0126132 100755
--- a/scripts/mk-origtargz.pl
+++ b/scripts/mk-origtargz.pl
@@ -168,7 +168,6 @@ use Dpkg::IPC;
use Dpkg::Version;
use File::Spec;
-BEGIN { push(@INC, '/usr/share/devscripts') } # append to @INC, so that -I . has precedence
use Devscripts::Compression qw/compression_is_supported compression_guess_from_file compression_get_property/;
use Cwd 'abs_path';
use File::Copy;
diff --git a/scripts/rc-alert.pl b/scripts/rc-alert.pl
index 94eafac..003bf46 100755
--- a/scripts/rc-alert.pl
+++ b/scripts/rc-alert.pl
@@ -21,7 +21,6 @@
use strict;
use warnings;
-BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Packages;
use File::Basename;
use Getopt::Long qw(:config gnu_getopt);
diff --git a/scripts/tagpending.pl b/scripts/tagpending.pl
index c657c8b..0b1ba2c 100755
--- a/scripts/tagpending.pl
+++ b/scripts/tagpending.pl
@@ -28,7 +28,6 @@ use strict;
use warnings;
use Getopt::Long qw(:config gnu_getopt);
use File::Basename;
-BEGIN { push @INC, '/usr/share/devscripts'; }
use Devscripts::Debbugs;
sub bugs_info;
diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index 805ac69..841f8b5 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -33,7 +33,6 @@ use File::Temp qw/tempfile tempdir/;
use List::Util qw/first/;
use filetest 'access';
use Getopt::Long qw(:config gnu_getopt);
-BEGIN { push(@INC, '/usr/share/devscripts') } # append to @INC, so that -I . has precedence
use Devscripts::Versort;
use Text::ParseWords;
BEGIN {
diff --git a/test/test_debchange b/test/test_debchange
index 4b69cb2..810d3f1 100755
--- a/test/test_debchange
+++ b/test/test_debchange
@@ -18,7 +18,7 @@ if test "$1" = --installed; then
COMMAND="dch --no-conf"
shift
else
- COMMAND="perl -I ${0%/*}/.. ${0%/*}/../scripts/debchange.pl --no-conf"
+ COMMAND="perl -I ${0%/*}/../lib ${0%/*}/../scripts/debchange.pl --no-conf"
fi
. "${0%/*}/shunit2-helper-functions.sh"
diff --git a/test/test_debdiff b/test/test_debdiff
index 2fb0cfe..61ee8c8 100755
--- a/test/test_debdiff
+++ b/test/test_debdiff
@@ -19,7 +19,7 @@ if test "$1" = --installed; then
COMMAND="debdiff --no-conf"
shift
else
- COMMAND="perl -I ${0%/*}/.. ${0%/*}/../scripts/debdiff.pl --no-conf"
+ COMMAND="perl -I ${0%/*}/../lib ${0%/*}/../scripts/debdiff.pl --no-conf"
fi
WORKDIR="$(readlink -f "${0%/*}")"
diff --git a/test/test_mk-origtargz b/test/test_mk-origtargz
index 615d31d..7209b4e 100755
--- a/test/test_mk-origtargz
+++ b/test/test_mk-origtargz
@@ -22,7 +22,7 @@ if test "$1" = --installed; then
shift
else
top_srcdir=$(readlink -f "${0%/*}/..")
- MK_ORIGTARGZ="perl -I $top_srcdir $top_srcdir/scripts/mk-origtargz.pl"
+ MK_ORIGTARGZ="perl -I $top_srcdir/lib $top_srcdir/scripts/mk-origtargz.pl"
PROGNAME="mk-origtargz.pl"
fi
diff --git a/test/test_uscan b/test/test_uscan
index f45c8c7..5b9537b 100755
--- a/test/test_uscan
+++ b/test/test_uscan
@@ -21,13 +21,9 @@ if test "$1" = --installed; then
shift
else
top_srcdir=$(readlink -f "${0%/*}/..")
- if ! [ -x $top_srcdir/scripts/uscan -a -x $top_srcdir/scripts/mk-origtargz ]
- then
- echo "Please run make in scripts/"
- exit 1
- fi
+ make -C "$top_srcdir/scripts" uscan mk-origtargz
PATH="$top_srcdir/scripts:$PATH"
- PERLLIB="$top_srcdir"
+ PERLLIB="$top_srcdir/lib"
export PERLLIB
COMMAND="uscan --no-conf --compression=xz"
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list