module.
+2007-07-21 Guillem Jover <guillem@debian.org>
+
+ * m4/perl.m4 (DPKG_PROG_PERL): Add support for user overridable
+ PERL_LIBDIR variable, autodetected from the system installation.
+ * scripts/Makefile.am (perllibdir): New variable.
+ (nobase_dist_perllib_DATA): Likewise.
+ (install-data-hook): New target.
+ * scripts/Dpkg.pm: New file.
+
2007-07-03 Frank Lichtenheld <djpig@debian.org>
* configure.ac: Bump version to 1.14.6~.
and remove leftover string from man page split.
- Split option descriptions so that it gets easier to distinguish.
- Unify author and copyright information formatting.
+ * Move variables automatically modified at build time to a new style perl
+ module.
[ Updated scripts translations ]
* French (Frédéric Bothamy, Christian Perrier).
usr/share/man/*/start-stop-daemon.8
usr/share/man/*/*/update-alternatives.8
usr/share/man/*/update-alternatives.8
+usr/share/perl5
var/lib/dpkg/alternatives
var/lib/dpkg/info
var/lib/dpkg/parts
AC_DEFUN([DPKG_PROG_PERL],
[AC_ARG_VAR([PERL], [Perl interpreter])dnl
AC_PATH_PROG([PERL], [perl], [/usr/bin/perl])dnl
+AC_ARG_VAR([PERL_LIBDIR], [Perl library directory])dnl
+PERL_LIBDIR=`$PERL -MConfig -e 'print $Config{vendorlib}'`dnl
])# DPKG_PROG_PERL
--- /dev/null
+package Dpkg;
+
+use strict;
+use warnings;
+
+use base qw(Exporter);
+our @EXPORT = qw($version $progname $admindir $dpkglibdir $pkgdatadir);
+
+our ($progname) = $0 =~ m:.*/(.*):;
+
+# The following lines are automatically fixed at install time
+our $version = "1.14";
+our $admindir = "/var/lib/dpkg";
+our $dpkglibdir = ".";
+our $pkgdatadir = "..";
+
+1;
$(bin_SCRIPTS) $(sbin_SCRIPTS) $(changelog_SCRIPTS) \
install-info install-info-stamp
+perllibdir = $(PERL_LIBDIR)
+nobase_dist_perllib_DATA = \
+ Dpkg.pm
dist_pkglib_SCRIPTS = \
controllib.pl \
$(mkdir_p) $(DESTDIR)$(sysconfdir)/alternatives
$(INSTALL_DATA) $(srcdir)/README.alternatives $(DESTDIR)$(sysconfdir)/alternatives/README
+# Ideally we'd use 'sed -i', but unfortunately that's not portable.
+install-data-hook:
+ cp -p $(DESTDIR)$(perllibdir)/Dpkg.pm \
+ $(DESTDIR)$(perllibdir)/Dpkg.pm.tmp
+ $(do_perl_subst) <$(DESTDIR)$(perllibdir)/Dpkg.pm.tmp \
+ >$(DESTDIR)$(perllibdir)/Dpkg.pm
+ rm $(DESTDIR)$(perllibdir)/Dpkg.pm.tmp
+
uninstall-local:
rm -f $(DESTDIR)$(sysconfdir)/alternatives/README
rm -f $(DESTDIR)$(sbindir)/install-info