aboutsummaryrefslogtreecommitdiff
path: root/archivers/dpkg
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-02-06 21:05:29 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-02-06 21:05:29 +0000
commit76965980d68b73a826d2dbdb554e8b00f5d06531 (patch)
tree5df47d827ff12e0d74a07f99069c4dd8f92e2072 /archivers/dpkg
parentefb578bb649096db0b6f89f8e357faa300602750 (diff)
downloadports-76965980d68b73a826d2dbdb554e8b00f5d06531.tar.gz
ports-76965980d68b73a826d2dbdb554e8b00f5d06531.zip
Notes
Diffstat (limited to 'archivers/dpkg')
-rw-r--r--archivers/dpkg/Makefile86
-rw-r--r--archivers/dpkg/distinfo6
-rw-r--r--archivers/dpkg/files/patch-Makefile.conf.in11
-rw-r--r--archivers/dpkg/files/patch-Makefile.in11
-rw-r--r--archivers/dpkg/files/patch-archtable15
-rw-r--r--archivers/dpkg/files/patch-configure33
-rw-r--r--archivers/dpkg/files/patch-getopt_Makefile.am9
-rw-r--r--archivers/dpkg/files/patch-getopt_Makefile.in27
-rw-r--r--archivers/dpkg/files/patch-lib_Makefile.am9
-rw-r--r--archivers/dpkg/files/patch-lib_Makefile.in30
-rw-r--r--archivers/dpkg/files/patch-main_Makefile.in10
-rw-r--r--archivers/dpkg/files/patch-man_Makefile.in11
-rw-r--r--archivers/dpkg/files/patch-scripts_Makefile.in12
-rw-r--r--archivers/dpkg/files/patch-scripts_cleanup-info.pl19
-rw-r--r--archivers/dpkg/files/patch-scripts_dpkg-checkbuilddeps.pl21
-rw-r--r--archivers/dpkg/files/patch-scripts_dpkg-genchanges.pl14
-rw-r--r--archivers/dpkg/files/patch-scripts_dpkg-scanpackages.pl15
-rw-r--r--archivers/dpkg/files/patch-scripts_dpkg-scansources.pl16
-rw-r--r--archivers/dpkg/files/patch-scripts_dpkg-shlibdeps.pl25
-rw-r--r--archivers/dpkg/files/patch-scripts_dpkg-source.pl77
-rw-r--r--archivers/dpkg/files/patch-scripts_install-info.pl25
-rw-r--r--archivers/dpkg/files/patch-scripts_update-alternatives.pl28
-rw-r--r--archivers/dpkg/files/patch-src_help.c11
-rw-r--r--archivers/dpkg/files/patch-src_remove.c40
-rw-r--r--archivers/dpkg/files/patch-utils_Makefile.in11
-rw-r--r--archivers/dpkg/files/patch-utils_start-stop-daemon.c12
-rw-r--r--archivers/dpkg/files/pkg-deinstall.in17
-rw-r--r--archivers/dpkg/files/pkg-install.in17
-rw-r--r--archivers/dpkg/pkg-descr10
-rw-r--r--archivers/dpkg/pkg-plist125
30 files changed, 612 insertions, 141 deletions
diff --git a/archivers/dpkg/Makefile b/archivers/dpkg/Makefile
index 424fef260b63..f08cb55d4840 100644
--- a/archivers/dpkg/Makefile
+++ b/archivers/dpkg/Makefile
@@ -5,36 +5,83 @@
# $FreeBSD$
PORTNAME= dpkg
-PORTVERSION= 1.10.28
-PORTREVISION= 1
+PORTVERSION= 1.13.25
CATEGORIES= archivers sysutils
-MASTER_SITES= ${MASTER_SITE_DEBIAN}
-MASTER_SITE_SUBDIR= pool/main/d/dpkg
+MASTER_SITES= ${MASTER_SITE_DEBIAN_POOL}
DISTNAME= dpkg_${PORTVERSION}
MAINTAINER= perky@FreeBSD.org
-COMMENT= Package maintenance system for Debian
+COMMENT= Debian package maintenance system
+
+BUILD_DEPENDS= po4a:${PORTSDIR}/textproc/po4a
+RUN_DEPENDS= gmd5sum:${PORTSDIR}/sysutils/coreutils \
+ gpatch:${PORTSDIR}/devel/patch
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_ICONV= yes
USE_PERL5= yes
-USE_AUTOTOOLS= autoconf:259
WRKSRC= ${WRKDIR}/dpkg-${PORTVERSION}
-CONFIGURE_ARGS= --with-libiconv-prefix=${LOCALBASE} \
- --with-admindir=${PREFIX}/var/dpkg
-MAKE_ENV= GETTEXTBASE=${LOCALBASE}
+DPKGDIR?= ${DESTDIR}/var/db/dpkg
+PLIST_SUB+= DPKGDIR=${DPKGDIR:C,^/,,}
+
+SUB_FILES= pkg-install pkg-deinstall
+SUB_LIST+= DPKGDIR=${DPKGDIR}
+
+CONFIGURE_ARGS+=--with-admindir=${DPKGDIR} --mandir=${PREFIX}/man \
+ --libdir=${PREFIX}/libexec --program-transform-name="" \
+ --infodir=${PREFIX}/info --with-libintl-prefix=${LOCALBASE}
-MAN1= 822-date.1 dpkg-architecture.1 dpkg-buildpackage.1 \
+MANLANG= "" de fr hu ja pl ru sv
+
+MAN1_DE= 822-date.1 dpkg-architecture.1 dpkg-checkbuilddeps.1 \
+ dpkg-name.1 dpkg-scanpackages.1 dpkg-scansources.1 dpkg.1
+MAN5_DE= deb-control.5 deb-old.5 deb.5 dpkg.cfg.5 dselect.cfg.5
+MAN8_DE= cleanup-info.8 dpkg-divert.8 dpkg-statoverride.8 \
+ start-stop-daemon.8 update-alternatives.8
+
+MAN1_EN= 822-date.1 dpkg-architecture.1 dpkg-buildpackage.1 \
dpkg-checkbuilddeps.1 dpkg-deb.1 dpkg-distaddfile.1 \
dpkg-genchanges.1 dpkg-gencontrol.1 dpkg-name.1 \
dpkg-parsechangelog.1 dpkg-scanpackages.1 dpkg-scansources.1 \
- dpkg-shlibdeps.1 dpkg-source.1 md5sum.1
-MAN5= deb-control.5 deb-old.5 deb.5 dpkg.cfg.5 dselect.cfg.5
-MAN8= cleanup-info.8 dpkg-divert.8 dpkg-query.8 dpkg-split.8 \
- dpkg-statoverride.8 dpkg.8 dselect.8 install-info.8 \
- start-stop-daemon.8 update-alternatives.8
+ dpkg-shlibdeps.1 dpkg-source.1 dpkg.1 dpkg-query.1 \
+ dpkg-split.1 dselect.1
+MAN5_EN= deb-control.5 deb-old.5 deb.5 dpkg.cfg.5 dselect.cfg.5
+MAN8_EN= cleanup-info.8 dpkg-divert.8 dpkg-statoverride.8 \
+ install-info.8 start-stop-daemon.8 update-alternatives.8
+
+MAN1_FR= 822-date.1 dpkg-architecture.1 dpkg-buildpackage.1 \
+ dpkg-checkbuilddeps.1 dpkg-deb.1 dpkg-distaddfile.1 \
+ dpkg-genchanges.1 dpkg-gencontrol.1 dpkg-name.1 \
+ dpkg-parsechangelog.1 dpkg-query.1 dpkg-scanpackages.1 \
+ dpkg-scansources.1 dpkg-shlibdeps.1 dpkg-source.1 dpkg-split.1 \
+ dpkg.1
+MAN5_FR= deb-control.5 deb.5 dpkg.cfg.5
+MAN8_FR= cleanup-info.8 dpkg-divert.8 dpkg-statoverride.8 \
+ install-info.8 start-stop-daemon.8 update-alternatives.8
+
+MAN1_HU= dpkg-deb.1
+MAN5_HU= deb-control.5 dpkg.cfg.5 dselect.cfg.5
+
+MAN1_JA= 822-date.1 dpkg-checkbuilddeps.1 dpkg-deb.1 dpkg-name.1 \
+ dpkg-query.1 dpkg-scanpackages.1 dpkg.1 dselect.1
+
+MAN5_JA= deb-control.5 deb-old.5 deb.5
+MAN8_JA= cleanup-info.8 dpkg-divert.8 dpkg-statoverride.8 \
+ install-info.8 start-stop-daemon.8 update-alternatives.8
+
+MAN1_PL= 822-date.1 dpkg-deb.1 dpkg-query.1 dpkg-split.1 dpkg.1 dselect.1
+MAN5_PL= dpkg.cfg.5 dselect.cfg.5
+MAN8_PL= dpkg-statoverride.8 start-stop-daemon.8 update-alternatives.8
+
+MAN1_RU= 822-date.1 dpkg-checkbuilddeps.1 dpkg.1
+MAN5_RU= deb-control.5
+MAN8_RU= start-stop-daemon.8
+
+MAN1_SV= 822-date.1 dpkg-deb.1 dpkg-query.1 dpkg-split.1 dpkg.1 dselect.1
+MAN5_SV= deb-control.5 deb-old.5 deb.5 dpkg.cfg.5 dselect.cfg.5
+MAN8_SV= start-stop-daemon.8
.if !defined(WITHOUT_NLS)
USE_GETTEXT= yes
@@ -45,10 +92,15 @@ PLIST_SUB+= NLS="@comment "
.endif
post-patch:
- ${REINPLACE_CMD} -e 's,^\(ALL_LINGUAS.*\)tl \(.*\)$$,\1\2,g' \
- ${WRKSRC}/configure.in
+ ${MV} ${WRKSRC}/getopt/obstack.[ch] ${WRKSRC}/lib
post-install:
${MV} ${PREFIX}/sbin/install-info ${PREFIX}/sbin/dpkg-install-info
+.for f in available diversions statoverride status
+ ${TOUCH} ${DPKGDIR}/${f}
+.endfor
+
+ ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
.include <bsd.port.mk>
diff --git a/archivers/dpkg/distinfo b/archivers/dpkg/distinfo
index fcce0e3df443..b7cfd122c2ab 100644
--- a/archivers/dpkg/distinfo
+++ b/archivers/dpkg/distinfo
@@ -1,3 +1,3 @@
-MD5 (dpkg_1.10.28.tar.gz) = 912ece8f3c39192503ff2bcb4c74182e
-SHA256 (dpkg_1.10.28.tar.gz) = 215cc16164053733e9b24c908af00da33ac374f9f8b9b9856236481d8d464334
-SIZE (dpkg_1.10.28.tar.gz) = 2225927
+MD5 (dpkg_1.13.25.tar.gz) = 88effb358aa04d25036b662d588433a6
+SHA256 (dpkg_1.13.25.tar.gz) = a525f321e875a8c16f5b6942bc02ac66b0d284cc6c61704f93e74789ef89d817
+SIZE (dpkg_1.13.25.tar.gz) = 3384618
diff --git a/archivers/dpkg/files/patch-Makefile.conf.in b/archivers/dpkg/files/patch-Makefile.conf.in
deleted file mode 100644
index a524efc5f170..000000000000
--- a/archivers/dpkg/files/patch-Makefile.conf.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.conf.in.orig Sat Apr 22 12:31:27 2006
-+++ Makefile.conf.in Sat Apr 22 12:31:41 2006
-@@ -68,7 +68,7 @@
- DEFS = @DEFS@ -D_GNU_SOURCE
- INCLUDE_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir) -I$(srcdir) -I../include -I.. -I. -I$(top_srcdir)/optlib
-
--NLS_CFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl -I../intl
-+NLS_CFLAGS = -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl -I../intl -I${GETTEXTBASE}/include
- NLS_LIBS = @INTLLIBS@
-
- SSD_LIBS = @SSD_LIBS@
diff --git a/archivers/dpkg/files/patch-Makefile.in b/archivers/dpkg/files/patch-Makefile.in
deleted file mode 100644
index 0996e07617a2..000000000000
--- a/archivers/dpkg/files/patch-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.in.orig Sat Apr 22 12:32:05 2006
-+++ Makefile.in Sat Apr 22 12:32:15 2006
-@@ -10,7 +10,7 @@
- include Makefile.conf
-
- SUBDIRS = include optlib lib dpkg-deb split scripts utils main \
-- @DSELECTDIR@ po methods man doc
-+ @DSELECTDIR@ po methods man
-
- all: version.h all-recursive
-
diff --git a/archivers/dpkg/files/patch-archtable b/archivers/dpkg/files/patch-archtable
deleted file mode 100644
index 90bd211c2a45..000000000000
--- a/archivers/dpkg/files/patch-archtable
+++ /dev/null
@@ -1,15 +0,0 @@
---- archtable.orig Thu Nov 11 12:16:32 2004
-+++ archtable Sat Apr 22 12:51:25 2006
-@@ -50,7 +50,12 @@
- hppa1.1-linux-gnu hppa hppa
- hppa2.0-linux-gnu hppa hppa
- hppa64-linux-gnu hppa hppa
-+alpha-freebsd freebsd-alpha freebsd-alpha
-+amd64-freebsd freebsd-amd64 freebsd-amd64
- i386-freebsd freebsd-i386 freebsd-i386
-+ia64-freebsd freebsd-ia64 freebsd-ia64
-+powerpc-freebsd freebsd-powerpc freebsd-powerpc
-+sparc64-freebsd freebsd-sparc64 freebsd-sparc64
- i386-kfreebsd-gnu kfreebsd-i386 kfreebsd-i386
- i386-netbsdelf-gnu netbsd-i386 netbsd-i386
- i386-knetbsd-gnu knetbsd-i386 knetbsd-i386
diff --git a/archivers/dpkg/files/patch-configure b/archivers/dpkg/files/patch-configure
new file mode 100644
index 000000000000..2bb263eb98ff
--- /dev/null
+++ b/archivers/dpkg/files/patch-configure
@@ -0,0 +1,33 @@
+--- configure.orig Fri Oct 13 06:37:44 2006
++++ configure Mon Nov 13 18:23:21 2006
+@@ -1991,7 +1991,7 @@
+ { echo "$as_me:$LINENO: checking dpkg cpu type" >&5
+ echo $ECHO_N "checking dpkg cpu type... $ECHO_C" >&6; }
+
+-cpu_type="`cd $srcdir/scripts; ./dpkg-architecture.pl -t$target -qDEB_HOST_ARCH_CPU 2>/dev/null`"
++cpu_type="`grep -v ^# cputable | awk 'match("'$target'", $3) { print $1 }'`"
+
+ if test "x$cpu_type" = "x"; then
+ cpu_type=$target_cpu
+@@ -2012,7 +2012,7 @@
+ { echo "$as_me:$LINENO: checking dpkg operating system type" >&5
+ echo $ECHO_N "checking dpkg operating system type... $ECHO_C" >&6; }
+
+-os_type="`cd $srcdir/scripts; ./dpkg-architecture.pl -t$target -qDEB_HOST_ARCH_OS 2>/dev/null`"
++os_type="`grep -v ^# ostable | awk 'match("'$target'", $3) { print $1 }'`"
+
+ if test "x$os_type" = "x"; then
+ os_type=$target_os
+@@ -2033,7 +2033,11 @@
+ { echo "$as_me:$LINENO: checking dpkg architecture name" >&5
+ echo $ECHO_N "checking dpkg architecture name... $ECHO_C" >&6; }
+
+-dpkg_arch="`cd $srcdir/scripts; ./dpkg-architecture.pl -t$target -qDEB_HOST_ARCH 2>/dev/null`"
++if test $os_type = "linux"; then
++ dpkg_arch=$cpu_type
++else
++ dpkg_arch=$os_type-$cpu_type
++fi
+
+ { echo "$as_me:$LINENO: result: $dpkg_arch" >&5
+ echo "${ECHO_T}$dpkg_arch" >&6; }
diff --git a/archivers/dpkg/files/patch-getopt_Makefile.am b/archivers/dpkg/files/patch-getopt_Makefile.am
new file mode 100644
index 000000000000..8e52b6be1e2a
--- /dev/null
+++ b/archivers/dpkg/files/patch-getopt_Makefile.am
@@ -0,0 +1,9 @@
+--- getopt/Makefile.am.orig Wed Jun 21 06:41:12 2006
++++ getopt/Makefile.am Thu Oct 26 18:38:28 2006
+@@ -13,5 +13,4 @@
+ error.h \
+ getopt.c getopt.h \
+ getopt1.c \
+- long-options.c long-options.h \
+- obstack.c obstack.h
++ long-options.c long-options.h
diff --git a/archivers/dpkg/files/patch-getopt_Makefile.in b/archivers/dpkg/files/patch-getopt_Makefile.in
new file mode 100644
index 000000000000..4b190f45b971
--- /dev/null
+++ b/archivers/dpkg/files/patch-getopt_Makefile.in
@@ -0,0 +1,27 @@
+--- getopt/Makefile.in.orig Fri Oct 13 06:37:54 2006
++++ getopt/Makefile.in Thu Oct 26 18:35:34 2006
+@@ -70,7 +70,7 @@
+ libopt_a_AR = $(AR) $(ARFLAGS)
+ libopt_a_LIBADD =
+ am_libopt_a_OBJECTS = closeout.$(OBJEXT) getopt.$(OBJEXT) \
+- getopt1.$(OBJEXT) long-options.$(OBJEXT) obstack.$(OBJEXT)
++ getopt1.$(OBJEXT) long-options.$(OBJEXT)
+ libopt_a_OBJECTS = $(am_libopt_a_OBJECTS)
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+ depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+@@ -232,7 +232,6 @@
+ getopt.c getopt.h \
+ getopt1.c \
+ long-options.c long-options.h \
+- obstack.c obstack.h
+
+ all: all-am
+
+@@ -285,7 +284,6 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/long-options.Po@am__quote@
+-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/obstack.Po@am__quote@
+
+ .c.o:
+ @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
diff --git a/archivers/dpkg/files/patch-lib_Makefile.am b/archivers/dpkg/files/patch-lib_Makefile.am
new file mode 100644
index 000000000000..9cee70340d7a
--- /dev/null
+++ b/archivers/dpkg/files/patch-lib_Makefile.am
@@ -0,0 +1,9 @@
+--- lib/Makefile.am.orig Thu Oct 26 18:38:08 2006
++++ lib/Makefile.am Thu Oct 26 18:37:18 2006
+@@ -34,4 +34,5 @@
+ tarfn.c tarfn.h \
+ utils.c \
+ varbuf.c \
+- vercmp.c
++ vercmp.c \
++ obstack.c obstack.h
diff --git a/archivers/dpkg/files/patch-lib_Makefile.in b/archivers/dpkg/files/patch-lib_Makefile.in
new file mode 100644
index 000000000000..be4dd9665bca
--- /dev/null
+++ b/archivers/dpkg/files/patch-lib_Makefile.in
@@ -0,0 +1,30 @@
+--- lib/Makefile.in.orig Fri Oct 13 06:37:55 2006
++++ lib/Makefile.in Thu Oct 26 18:34:48 2006
+@@ -75,7 +75,8 @@
+ md5.$(OBJEXT) mlib.$(OBJEXT) myopt.$(OBJEXT) \
+ nfmalloc.$(OBJEXT) parse.$(OBJEXT) parsehelp.$(OBJEXT) \
+ showcright.$(OBJEXT) showpkg.$(OBJEXT) tarfn.$(OBJEXT) \
+- utils.$(OBJEXT) varbuf.$(OBJEXT) vercmp.$(OBJEXT)
++ utils.$(OBJEXT) varbuf.$(OBJEXT) vercmp.$(OBJEXT) \
++ obstack.$(OBJEXT)
+ libdpkg_a_OBJECTS = $(am_libdpkg_a_OBJECTS)
+ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+ depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+@@ -257,7 +258,8 @@
+ tarfn.c tarfn.h \
+ utils.c \
+ varbuf.c \
+- vercmp.c
++ vercmp.c \
++ obstack.c obstack.h
+
+ all: all-am
+
+@@ -326,6 +328,7 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/varbuf.Po@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vercmp.Po@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/obstack.Po@am__quote@
+
+ .c.o:
+ @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
diff --git a/archivers/dpkg/files/patch-main_Makefile.in b/archivers/dpkg/files/patch-main_Makefile.in
deleted file mode 100644
index 8d58d6714a67..000000000000
--- a/archivers/dpkg/files/patch-main_Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- main/Makefile.in.orig Thu Oct 12 07:16:21 2006
-+++ main/Makefile.in Thu Oct 12 07:16:38 2006
-@@ -72,6 +72,4 @@
-
- archtable.h: $(top_srcdir)/archtable
- expand $< | \
-- perl -ne 'print " { \"$$1\",$$2\"$$3\",$$4\"$$5\" },\n" \
-- if m/^(?!\s*#)\s*(\S+)(\s+)(\S+)(\s+)(\S+)\s*$$/' \
-- >$@
-+ perl -ne 'print " { \"$$1\",$$2\"$$3\",$$4\"$$5\" },\n" if m/^(?!\s*#)\s*(\S+)(\s+)(\S+)(\s+)(\S+)\s*$$/' >$@
diff --git a/archivers/dpkg/files/patch-man_Makefile.in b/archivers/dpkg/files/patch-man_Makefile.in
deleted file mode 100644
index 9f635b400b5b..000000000000
--- a/archivers/dpkg/files/patch-man_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- man/Makefile.in.orig Sat Apr 22 12:38:00 2006
-+++ man/Makefile.in Sat Apr 22 12:38:35 2006
-@@ -2,7 +2,7 @@
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
-
--SUBDIRS = de en es fr ja pt_BR ru sv
-+SUBDIRS = en
-
- default: all
- include ../Makefile.conf
diff --git a/archivers/dpkg/files/patch-scripts_Makefile.in b/archivers/dpkg/files/patch-scripts_Makefile.in
new file mode 100644
index 000000000000..4228457a5cb5
--- /dev/null
+++ b/archivers/dpkg/files/patch-scripts_Makefile.in
@@ -0,0 +1,12 @@
+--- scripts/Makefile.in.orig Fri Oct 13 06:37:57 2006
++++ scripts/Makefile.in Fri Nov 10 12:54:34 2006
+@@ -282,6 +282,9 @@
+ -e "s:\$$dpkglibdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$dpkglibdir=\"$(pkglibdir)\":" \
+ -e "s:\$$pkgdatadir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$pkgdatadir=\"$(pkgdatadir)\":" \
+ -e "s:\$$admindir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$admindir=\"$(admindir)\":" \
++ -e "s:\$$sysconfdir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$sysconfdir=\"$(sysconfdir)\":" \
++ -e "s:\$$infodir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$infodir=\"$(infodir)\":" \
++ -e "s:\$$prefix[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$prefix=\"$(prefix)\":" \
+ -e "s:\$$version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$version=\"$(PACKAGE_VERSION)\":"
+
+ do_shell_subst = sed -e "s:version=\"[^\"]*\":version=\"$(PACKAGE_VERSION)\":"
diff --git a/archivers/dpkg/files/patch-scripts_cleanup-info.pl b/archivers/dpkg/files/patch-scripts_cleanup-info.pl
new file mode 100644
index 000000000000..c20d4a192039
--- /dev/null
+++ b/archivers/dpkg/files/patch-scripts_cleanup-info.pl
@@ -0,0 +1,19 @@
+--- scripts/cleanup-info.pl.orig Tue Jun 20 19:36:39 2006
++++ scripts/cleanup-info.pl Fri Nov 10 12:22:49 2006
+@@ -25,6 +25,7 @@
+ # use strict;
+
+ my $dpkglibdir = "."; # This line modified by Makefile
++my $prefix = "/usr"; # This line modified by Makefile
+ push(@INC,$dpkglibdir);
+ require 'dpkg-gettext.pl';
+ textdomain("dpkg");
+@@ -56,7 +57,7 @@
+ "), $0;
+ }
+
+-my $infodir = '/usr/info';
++my $infodir = "$prefix/info";
+ my $unsafe = 0;
+ $0 =~ m|[^/]+$|;
+ my $name= $&;
diff --git a/archivers/dpkg/files/patch-scripts_dpkg-checkbuilddeps.pl b/archivers/dpkg/files/patch-scripts_dpkg-checkbuilddeps.pl
new file mode 100644
index 000000000000..8eb20c1bfe99
--- /dev/null
+++ b/archivers/dpkg/files/patch-scripts_dpkg-checkbuilddeps.pl
@@ -0,0 +1,21 @@
+--- scripts/dpkg-checkbuilddeps.pl.orig Sun Jun 18 18:22:03 2006
++++ scripts/dpkg-checkbuilddeps.pl Fri Nov 10 16:23:44 2006
+@@ -4,7 +4,8 @@
+ #use strict;
+ use Getopt::Long;
+
+-my $dpkglibdir="/usr/lib/dpkg";
++my $dpkglibdir="/usr/lib/dpkg"; # This line modified by Makefile
++my $admindir="/var/lib/dpkg"; # This line modified by Makefile
+ push(@INC,$dpkglibdir);
+ #my $controlfile;
+ require 'controllib.pl';
+@@ -79,7 +80,7 @@
+ # thanks to Matt Zimmerman. Returns two hash references that
+ # are exactly what the other functions need...
+ sub parse_status {
+- my $status=shift || "/var/lib/dpkg/status";
++ my $status=shift || "$admindir/status";
+
+ my %providers;
+ my %version;
diff --git a/archivers/dpkg/files/patch-scripts_dpkg-genchanges.pl b/archivers/dpkg/files/patch-scripts_dpkg-genchanges.pl
new file mode 100644
index 000000000000..9083a3b99606
--- /dev/null
+++ b/archivers/dpkg/files/patch-scripts_dpkg-genchanges.pl
@@ -0,0 +1,14 @@
+--- scripts/dpkg-genchanges.pl.orig Wed Jun 28 17:14:04 2006
++++ scripts/dpkg-genchanges.pl Mon Nov 13 21:29:46 2006
+@@ -336,9 +336,9 @@
+ open(STDIN,"< $uf") || &syserr(sprintf(_g("cannot open upload file %s for reading"), $uf));
+ (@s=stat(STDIN)) || &syserr(sprintf(_g("cannot fstat upload file %s"), $uf));
+ $size= $s[7]; $size || &warn(sprintf(_g("upload file %s is empty"), $uf));
+- $md5sum=`md5sum`; $? && subprocerr(sprintf(_g("md5sum upload file %s"), $uf));
++ $md5sum=`gmd5sum`; $? && subprocerr(sprintf(_g("gmd5sum upload file %s"), $uf));
+ $md5sum =~ m/^([0-9a-f]{32})\s*-?\s*$/i ||
+- &failure(sprintf(_g("md5sum upload file %s gave strange output \`%s'"), $uf, $md5sum));
++ &failure(sprintf(_g("gmd5sum upload file %s gave strange output \`%s'"), $uf, $md5sum));
+ $md5sum= $1;
+ defined($md5sum{$f}) && $md5sum{$f} ne $md5sum &&
+ &error(sprintf(_g("md5sum of source file %s (%s) is different ".
diff --git a/archivers/dpkg/files/patch-scripts_dpkg-scanpackages.pl b/archivers/dpkg/files/patch-scripts_dpkg-scanpackages.pl
new file mode 100644
index 000000000000..89ab6e79933c
--- /dev/null
+++ b/archivers/dpkg/files/patch-scripts_dpkg-scanpackages.pl
@@ -0,0 +1,15 @@
+--- scripts/dpkg-scanpackages.pl.orig Sun Jun 18 18:22:03 2006
++++ scripts/dpkg-scanpackages.pl Mon Nov 13 21:30:48 2006
+@@ -167,9 +167,9 @@
+
+ $tv{'Filename'}= "$pathprefix$fn";
+
+- open(C,"md5sum <$fn |") || die "$fn $!";
+- chop($_=<C>); close(C); $? and die sprintf(_g("\`md5sum < %s' exited with %d"), $fn, $?)."\n";
+- /^([0-9a-f]{32})\s*-?\s*$/ or die sprintf(_g("Strange text from \`md5sum < %s': \`%s'"), $fn, $_)."\n";
++ open(C,"gmd5sum <$fn |") || die "$fn $!";
++ chop($_=<C>); close(C); $? and die sprintf(_g("\`gmd5sum < %s' exited with %d"), $fn, $?)."\n";
++ /^([0-9a-f]{32})\s*-?\s*$/ or die sprintf(_g("Strange text from \`gmd5sum < %s': \`%s'"), $fn, $_)."\n";
+ $tv{'MD5sum'}= $1;
+
+ my @stat= stat($fn) or die sprintf(_g("Couldn't stat %s: %s"), $fn, $!)."\n";
diff --git a/archivers/dpkg/files/patch-scripts_dpkg-scansources.pl b/archivers/dpkg/files/patch-scripts_dpkg-scansources.pl
new file mode 100644
index 000000000000..9ddcf7199c41
--- /dev/null
+++ b/archivers/dpkg/files/patch-scripts_dpkg-scansources.pl
@@ -0,0 +1,16 @@
+--- scripts/dpkg-scansources.pl.orig Sun Jun 18 18:22:03 2006
++++ scripts/dpkg-scansources.pl Mon Nov 13 21:31:23 2006
+@@ -298,11 +298,11 @@
+ if (!$pid) {
+ open STDIN, '<&FILE' or xdie sprintf(_g("can't dup %s:"), $file);
+ seek STDIN, 0, 0 or xdie sprintf(_g("can't rewind %s:"), $file);
+- exec 'md5sum' or xdie _g("can't exec md5sum:");
++ exec 'gmd5sum' or xdie _g("can't exec gmd5sum:");
+ }
+ chomp($md5 = join '', <MD5>);
+ unless (close MD5) {
+- xwarn_noerror close_msg 'md5sum';
++ xwarn_noerror close_msg 'gmd5sum';
+ return;
+ }
+ $md5 =~ s/ *-$//; # Remove trailing spaces and -, to work with GNU md5sum
diff --git a/archivers/dpkg/files/patch-scripts_dpkg-shlibdeps.pl b/archivers/dpkg/files/patch-scripts_dpkg-shlibdeps.pl
new file mode 100644
index 000000000000..fc6e9d822714
--- /dev/null
+++ b/archivers/dpkg/files/patch-scripts_dpkg-shlibdeps.pl
@@ -0,0 +1,25 @@
+--- scripts/dpkg-shlibdeps.pl.orig Fri Nov 10 12:02:38 2006
++++ scripts/dpkg-shlibdeps.pl Fri Nov 10 12:54:26 2006
+@@ -3,16 +3,18 @@
+ # dpkg-shlibdeps
+ # $Id: dpkg-shlibdeps.pl,v 1.19.2.2 2004/04/25 17:11:41 keybuk Exp $
+
+-my $dpkglibdir="/usr/lib/dpkg";
++my $dpkglibdir="/usr/lib/dpkg"; # This line modified by Makefile
++my $admindir="/var/lib/dpkg"; # This line modified by Makefile
++my $sysconfdir="/etc"; # This line modified by Makefile
+ my $version="1.4.1.19"; # This line modified by Makefile
+
+ use English;
+ use POSIX qw(:errno_h :signal_h);
+
+-my $shlibsoverride= '/etc/dpkg/shlibs.override';
+-my $shlibsdefault= '/etc/dpkg/shlibs.default';
++my $shlibsoverride= "$sysconfdir/dpkg/shlibs.override";
++my $shlibsdefault= "$sysconfdir/etc/dpkg/shlibs.default";
+ my $shlibslocal= 'debian/shlibs.local';
+-my $shlibsppdir= '/var/lib/dpkg/info';
++my $shlibsppdir= "$admindir/info";
+ my $shlibsppext= '.shlibs';
+ my $varnameprefix= 'shlibs';
+ my $dependencyfield= 'Depends';
diff --git a/archivers/dpkg/files/patch-scripts_dpkg-source.pl b/archivers/dpkg/files/patch-scripts_dpkg-source.pl
new file mode 100644
index 000000000000..b46481566d04
--- /dev/null
+++ b/archivers/dpkg/files/patch-scripts_dpkg-source.pl
@@ -0,0 +1,77 @@
+--- scripts/dpkg-source.pl.orig Tue Jun 20 20:40:27 2006
++++ scripts/dpkg-source.pl Fri Nov 10 13:26:54 2006
+@@ -1,6 +1,7 @@
+ #! /usr/bin/perl
+
+ my $dpkglibdir = ".";
++my $prefix = "/usr"; # This line modified by Makefile
+ my $version = "1.3.0"; # This line modified by Makefile
+
+ my @filesinarchive;
+@@ -616,10 +617,17 @@
+ close(DSC);
+
+ if ($is_signed) {
+- if (-x '/usr/bin/gpg') {
++ my $have_gpg = 0;
++ foreach my $path (split ':', $ENV{PATH}) {
++ if (-x "$path/gpg") {
++ $have_gpg = 1;
++ last;
++ }
++ }
++ if ($have_gpg) {
+ my $gpg_command = 'gpg -q --verify ';
+- if (-r '/usr/share/keyrings/debian-keyring.gpg') {
+- $gpg_command = $gpg_command.'--keyring /usr/share/keyrings/debian-keyring.gpg ';
++ if (-r "$prefix/share/apt/keyrings/freebsd-keyring.gpg") {
++ $gpg_command = $gpg_command."--keyring $prefix/share/apt/keyrings/freebsd-keyring.gpg ";
+ }
+ $gpg_command = $gpg_command.quotemeta($dsc).' 2>&1';
+
+@@ -842,18 +850,18 @@
+ open DIFF, $patch or &error(sprintf(_g("can't open diff `%s'"), $patch));
+ }
+
+- defined($c2= fork) || &syserr(_g("fork for patch"));
++ defined($c2= fork) || &syserr(_g("fork for gpatch"));
+ if (!$c2) {
+- open(STDIN,"<&DIFF") || &syserr(_g("reopen gzip for patch"));
+- chdir($newdirectory) || &syserr(sprintf(_g("chdir to %s for patch"), $newdirectory));
++ open(STDIN,"<&DIFF") || &syserr(_g("reopen gzip for gpatch"));
++ chdir($newdirectory) || &syserr(sprintf(_g("chdir to %s for gpatch"), $newdirectory));
+ $ENV{'LC_ALL'}= 'C';
+ $ENV{'LANG'}= 'C';
+- exec('patch','-s','-t','-F','0','-N','-p1','-u',
+- '-V','never','-g0','-b','-z','.dpkg-orig') or &syserr(_g("exec patch"));
++ exec('gpatch','-s','-t','-F','0','-N','-p1','-u',
++ '-V','never','-g0','-b','-z','.dpkg-orig') or &syserr(_g("exec gpatch"));
+ }
+ close(DIFF);
+- $c2 == waitpid($c2,0) || &syserr(_g("wait for patch"));
+- $? && subprocerr("patch");
++ $c2 == waitpid($c2,0) || &syserr(_g("wait for gpatch"));
++ $? && subprocerr("gpatch");
+
+ &reapgzip if $patch =~ /\.(gz|bz2)$/;
+ }
+@@ -909,7 +917,7 @@
+ open(STDIN,"< $dscdir/$f") || &syserr(sprintf(_g("cannot read %s"), "$dscdir/$f"));
+ (@s= stat(STDIN)) || &syserr(sprintf(_g("cannot fstat %s"), "$dscdir/$f"));
+ $s[7] == $size{$f} || &error(sprintf(_g("file %s has size %s instead of expected %s"), $f, $s[7], $size{$f}));
+- $m= `md5sum`; $? && subprocerr("md5sum $f"); $m =~ s/\n$//;
++ $m= `gmd5sum`; $? && subprocerr("gmd5sum $f"); $m =~ s/\n$//;
+ $m = readmd5sum( $m );
+ $m eq $md5sum{$f} || &error(sprintf(_g("file %s has md5sum %s instead of expected %s"), $f, $m, $md5sum{$f}));
+ open(STDIN,"</dev/null") || &syserr(_g("reopen stdin from /dev/null"));
+@@ -1334,8 +1342,8 @@
+ &internerr( sprintf(_g("tried to add file `%s' twice"), $filename));
+ stat($filename) || &syserr(sprintf(_g("could not stat output file `%s'"), $filename));
+ $size= (stat _)[7];
+- my $md5sum= `md5sum <$filename`;
+- $? && &subprocerr("md5sum $filename");
++ my $md5sum= `gmd5sum <$filename`;
++ $? && &subprocerr("gmd5sum $filename");
+ $md5sum = readmd5sum( $md5sum );
+ $f{'Files'}.= "\n $md5sum $size $filename";
+ }
diff --git a/archivers/dpkg/files/patch-scripts_install-info.pl b/archivers/dpkg/files/patch-scripts_install-info.pl
new file mode 100644
index 000000000000..d679676a5054
--- /dev/null
+++ b/archivers/dpkg/files/patch-scripts_install-info.pl
@@ -0,0 +1,25 @@
+--- scripts/install-info.pl.orig Tue Jun 20 19:36:39 2006
++++ scripts/install-info.pl Fri Nov 10 15:33:54 2006
+@@ -3,6 +3,8 @@
+ use Text::Wrap;
+
+ my $dpkglibdir = "."; # This line modified by Makefile
++my $prefix = "/usr"; # This line modified by Makefile
++my $infodir = "/usr/share/info"; # This line modified by Makefile
+ push (@INC, $dpkglibdir);
+ require 'dpkg-gettext.pl';
+ textdomain("dpkg");
+@@ -51,11 +53,11 @@
+ "), $0;
+ }
+
+-$dirfile = '/usr/share/info/dir';
++$dirfile = "$infodir/dir";
+ $maxwidth=79;
+ $Text::Wrap::columns=$maxwidth;
+ $backup='/var/backups/infodir.bak';
+-$default='/usr/share/base-files/info.dir';
++$default="$prefix/share/base-files/info.dir";
+
+ $menuentry="";
+ $description="";
diff --git a/archivers/dpkg/files/patch-scripts_update-alternatives.pl b/archivers/dpkg/files/patch-scripts_update-alternatives.pl
new file mode 100644
index 000000000000..6a216f994511
--- /dev/null
+++ b/archivers/dpkg/files/patch-scripts_update-alternatives.pl
@@ -0,0 +1,28 @@
+--- scripts/update-alternatives.pl.orig Tue Jun 20 19:36:39 2006
++++ scripts/update-alternatives.pl Fri Nov 10 13:57:31 2006
+@@ -2,6 +2,7 @@
+
+ $admindir= "/var/lib/dpkg"; # This line modified by Makefile
+ $dpkglibdir= "../utils"; # This line modified by Makefile
++$sysconfdir="/etc"; # This line modified by Makefile
+ $version= '0.93.80'; # This line modified by Makefile
+ push (@INC, $dpkglibdir);
+ require 'dpkg-gettext.pl';
+@@ -64,7 +65,7 @@
+ --set <name> <path> set <path> as alternative for <name>.
+ --all call --config on all alternatives.
+
+-<link> is the symlink pointing to /etc/alternatives/<name>.
++<link> is the symlink pointing to $sysconfdir/alternatives/<name>.
+ (e.g. /usr/bin/pager)
+ <name> is the master name for this link group.
+ (e.g. pager)
+@@ -97,7 +98,7 @@
+ exit(2);
+ }
+
+-$altdir= '/etc/alternatives';
++$altdir= $sysconfdir . '/alternatives';
+ $admindir= $admindir . '/alternatives';
+ $testmode= 0;
+ $verbosemode= 0;
diff --git a/archivers/dpkg/files/patch-src_help.c b/archivers/dpkg/files/patch-src_help.c
new file mode 100644
index 000000000000..271cb2681824
--- /dev/null
+++ b/archivers/dpkg/files/patch-src_help.c
@@ -0,0 +1,11 @@
+--- src/help.c.orig Sun Jun 18 18:22:03 2006
++++ src/help.c Mon Nov 13 21:09:32 2006
+@@ -73,7 +73,7 @@
+ #ifdef WITH_START_STOP_DAEMON
+ "start-stop-daemon",
+ #endif
+- "install-info", "update-rc.d", 0
++ "dpkg-install-info", 0
+ };
+
+ struct stat stab;
diff --git a/archivers/dpkg/files/patch-src_remove.c b/archivers/dpkg/files/patch-src_remove.c
new file mode 100644
index 000000000000..d1a3502e52ac
--- /dev/null
+++ b/archivers/dpkg/files/patch-src_remove.c
@@ -0,0 +1,40 @@
+--- src/remove.c.orig Sun Jun 18 18:22:03 2006
++++ src/remove.c Tue Nov 14 09:47:46 2006
+@@ -261,7 +261,18 @@
+ push_leftover(&leftover,namenode);
+ continue;
+ }
+- if (errno != ENOTDIR) ohshite(_("cannot remove `%.250s'"),fnvb.buf);
++ if (errno != ENOTDIR) {
++ /* dpkg includes /. in the packing list.
++ * rmdir("/.") will return EINVAL. dpkg will
++ * only attempt to remove /. when uninstalling
++ * the last package on the system, which is why
++ * Debian has never run into this issue. */
++ if (errno == EINVAL && strcmp(fnvb.buf, "/.") == 0) {
++ continue;
++ } else {
++ ohshite(_("cannot remove `%.250s'"),fnvb.buf);
++ }
++ }
+ debug(dbg_eachfiledetail, "removal_bulk unlinking `%s'", fnvb.buf);
+ {
+ /*
+@@ -378,7 +389,16 @@
+ push_leftover(&leftover,namenode);
+ continue;
+ }
+- if (errno != ENOTDIR) ohshite(_("cannot remove `%.250s'"),fnvb.buf);
++ if (errno != ENOTDIR) {
++ /* As above, packages include /. in their packing list.
++ * Even if we are removing the last package on the system,
++ * don't try to remove /. */
++ if (errno == EINVAL && strcmp(fnvb.buf, "/.") == 0) {
++ continue;
++ } else {
++ ohshite(_("cannot remove `%.250s'"),fnvb.buf);
++ }
++ }
+
+ push_leftover(&leftover,namenode);
+ continue;
diff --git a/archivers/dpkg/files/patch-utils_Makefile.in b/archivers/dpkg/files/patch-utils_Makefile.in
deleted file mode 100644
index 00bf0891f046..000000000000
--- a/archivers/dpkg/files/patch-utils_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- utils/Makefile.in.orig Sat Apr 22 12:20:54 2006
-+++ utils/Makefile.in Sat Apr 22 12:22:12 2006
-@@ -72,7 +72,7 @@
- $(INSTALL_DATA) $(srcdir)/$(MD5_MANPAGES) $(DESTDIR)/$(man1dir)
-
- start-stop-daemon: $(SSD_OBJECTS) ../lib/libdpkg.a
-- $(CC) $(LDFLAGS) -o $@ $(SSD_OBJECTS) $(LIBS) $(SSD_LIBS)
-+ $(CC) $(LDFLAGS) -o $@ $(SSD_OBJECTS) $(LIBS) $(SSD_LIBS) $(NLS_LIBS)
-
- md5sum-static: LDFLAGS += -static
- md5sum-static: ZLIB_LIBS = $(ZLIBS_LIBS_ALSO_STATIC)
diff --git a/archivers/dpkg/files/patch-utils_start-stop-daemon.c b/archivers/dpkg/files/patch-utils_start-stop-daemon.c
index a3b777082fce..744027e63ef0 100644
--- a/archivers/dpkg/files/patch-utils_start-stop-daemon.c
+++ b/archivers/dpkg/files/patch-utils_start-stop-daemon.c
@@ -1,14 +1,14 @@
---- utils/start-stop-daemon.c.orig Thu Nov 11 12:16:35 2004
-+++ utils/start-stop-daemon.c Sat Apr 22 12:25:16 2006
+--- utils/start-stop-daemon.c.orig Wed Jun 21 07:59:36 2006
++++ utils/start-stop-daemon.c Thu Oct 26 18:59:40 2006
@@ -48,6 +48,7 @@
#endif
- #if defined(OSOpenBSD) || defined(OSFreeBSD) || defined(OSNetBSD)
+ #if defined(OSOpenBSD) || defined(OSFreeBSD) || defined(OSNetBSD)
+#define _WANT_UCRED
#include <sys/param.h>
- #include <sys/user.h>
#include <sys/proc.h>
-@@ -859,9 +860,15 @@
+ #include <sys/stat.h>
+@@ -928,9 +929,15 @@
errx(1, "%s", errbuf);
if ((kp = kvm_getprocs(kd, KERN_PROC_PID, pid, &nentries)) == 0)
errx(1, "%s", kvm_geterr(kd));
@@ -24,7 +24,7 @@
else
return 0;
return (proc_uid == (uid_t)uid);
-@@ -880,7 +887,11 @@
+@@ -949,7 +956,11 @@
errx(1, "%s", errbuf);
if ((kp = kvm_getprocs(kd, KERN_PROC_PID, pid, &nentries)) == 0)
errx(1, "%s", kvm_geterr(kd));
diff --git a/archivers/dpkg/files/pkg-deinstall.in b/archivers/dpkg/files/pkg-deinstall.in
new file mode 100644
index 000000000000..b72aac996bcb
--- /dev/null
+++ b/archivers/dpkg/files/pkg-deinstall.in
@@ -0,0 +1,17 @@
+#!/bin/sh
+# $FreeBSD$
+
+DPKGDIR="%%DPKGDIR%%"
+
+case $2 in
+DEINSTALL)
+ # Delete available, diversions, statoverride, and status in ${DPKGDIR}
+ # if they are empty files.
+ for file in available diversions statoverride status; do
+ path=${DPKGDIR}/$file
+ if [ -e $path -a ! -s $path ]; then
+ rm -f $path
+ fi
+ done
+ ;;
+esac
diff --git a/archivers/dpkg/files/pkg-install.in b/archivers/dpkg/files/pkg-install.in
new file mode 100644
index 000000000000..cc1111d69361
--- /dev/null
+++ b/archivers/dpkg/files/pkg-install.in
@@ -0,0 +1,17 @@
+#!/bin/sh
+# $FreeBSD$
+
+LOCALBASE="%%LOCALBASE%%"
+DPKGDIR="%%DPKGDIR%%"
+
+case $2 in
+POST-INSTALL)
+ if [ -d ${LOCALBASE}/var/dpkg -a ${LOCALBASE}/var/dpkg != ${DPKGDIR} ]; then
+ echo ""
+ echo "If you wish to keep the databases from a previous dpkg"
+ echo "installation, move the contents of ${LOCALBASE}/var/dpkg"
+ echo "to ${DPKGDIR}."
+ echo ""
+ fi
+ ;;
+esac
diff --git a/archivers/dpkg/pkg-descr b/archivers/dpkg/pkg-descr
index 6a07bdd14641..c35b1e48424e 100644
--- a/archivers/dpkg/pkg-descr
+++ b/archivers/dpkg/pkg-descr
@@ -1,7 +1,5 @@
-This package contains the programs which handle the installation
-and removal of packages on your system. The primary interface for
-the dpkg suite is the `dselect' program; a more low-level and less
-user-friendly interface is available in the form of the `dpkg'
-command.
+dpkg is the basis of the Debian package management system. It consists of low
+level programs to build, install, remove, and perform other maintenance tasks
+relating to Debian packages. Also included is the dselect front end to dpkg.
-WWW: http://packages.debian.org/stable/base/dpkg.html
+WWW: http://packages.debian.org/dpkg
diff --git a/archivers/dpkg/pkg-plist b/archivers/dpkg/pkg-plist
index 5bf6b1858f93..a450f24f7c66 100644
--- a/archivers/dpkg/pkg-plist
+++ b/archivers/dpkg/pkg-plist
@@ -16,82 +16,127 @@ bin/dpkg-shlibdeps
bin/dpkg-source
bin/dpkg-split
bin/dselect
-bin/md5sum
etc/alternatives/README
etc/dpkg/origins/debian
-lib/dpkg/controllib.pl
-lib/dpkg/enoent
-lib/dpkg/methods/disk/desc.cdrom
-lib/dpkg/methods/disk/desc.harddisk
-lib/dpkg/methods/disk/desc.mounted
-lib/dpkg/methods/disk/desc.nfs
-lib/dpkg/methods/disk/install
-lib/dpkg/methods/disk/names
-lib/dpkg/methods/disk/setup
-lib/dpkg/methods/disk/update
-lib/dpkg/methods/floppy/desc.floppy
-lib/dpkg/methods/floppy/install
-lib/dpkg/methods/floppy/names
-lib/dpkg/methods/floppy/setup
-lib/dpkg/methods/floppy/update
-lib/dpkg/mksplit
-lib/dpkg/parsechangelog/debian
+libexec/dpkg/controllib.pl
+libexec/dpkg/dpkg-gettext.pl
+libexec/dpkg/enoent
+libexec/dpkg/methods/disk/desc.cdrom
+libexec/dpkg/methods/disk/desc.harddisk
+libexec/dpkg/methods/disk/desc.mounted
+libexec/dpkg/methods/disk/desc.nfs
+libexec/dpkg/methods/disk/install
+libexec/dpkg/methods/disk/names
+libexec/dpkg/methods/disk/setup
+libexec/dpkg/methods/disk/update
+libexec/dpkg/methods/floppy/desc.floppy
+libexec/dpkg/methods/floppy/install
+libexec/dpkg/methods/floppy/names
+libexec/dpkg/methods/floppy/setup
+libexec/dpkg/methods/floppy/update
+libexec/dpkg/mksplit
+libexec/dpkg/parsechangelog/debian
+@dirrmtry man/pt_BR/man1
+@dirrmtry man/pt_BR/man5
+@dirrmtry man/pt_BR/man8
+@dirrmtry man/pt_BR
sbin/cleanup-info
sbin/dpkg-divert
sbin/dpkg-statoverride
sbin/dpkg-install-info
sbin/start-stop-daemon
sbin/update-alternatives
-%%DOCSDIR%%/ChangeLog
-%%DOCSDIR%%/THANKS
-%%DOCSDIR%%/TODO
-%%DOCSDIR%%/copyright
-%%DATADIR%%/archtable
+%%DATADIR%%/cputable
+%%DATADIR%%/ostable
%%NLS%%share/locale/bs/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/bs/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/ca/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/ca/LC_MESSAGES/dpkg-dev.mo
+%%NLS%%share/locale/ca/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/cs/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/cs/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/da/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/da/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/de/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/de/LC_MESSAGES/dselect.mo
+%%NLS%%share/locale/dz/LC_MESSAGES/dpkg.mo
+%%NLS%%@dirrmtry share/locale/dz/LC_MESSAGES
+%%NLS%%@dirrmtry share/locale/dz
%%NLS%%share/locale/el/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/el/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/es/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/es/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/eu/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/eu/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/fr/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/dpkg-dev.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/gl/LC_MESSAGES/dpkg.mo
-%%NLS%%share/locale/he/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/gl/LC_MESSAGES/dselect.mo
+%%NLS%%share/locale/hu/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/hu/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/id/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/id/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/it/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/it/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/ja/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/ja/LC_MESSAGES/dselect.mo
+%%NLS%%share/locale/km/LC_MESSAGES/dpkg.mo
+%%NLS%%@dirrmtry share/locale/km/LC_MESSAGES
+%%NLS%%@dirrmtry share/locale/km
%%NLS%%share/locale/ko/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/ko/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/nb/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/nb/LC_MESSAGES/dselect.mo
+%%NLS%%share/locale/ne/LC_MESSAGES/dpkg.mo
+%%NLS%%@dirrmtry share/locale/ne/LC_MESSAGES
+%%NLS%%@dirrmtry share/locale/ne
%%NLS%%share/locale/nl/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/nl/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/nn/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/nn/LC_MESSAGES/dselect.mo
+%%NLS%%share/locale/pa/LC_MESSAGES/dpkg.mo
%%NLS%%share/locale/pl/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/pl/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/pt/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/pt/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/pt_BR/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/pt_BR/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/ro/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/ro/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/ru/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/ru/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/sk/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/sk/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/sv/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/sv/LC_MESSAGES/dselect.mo
+%%NLS%%share/locale/tl/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/tl/LC_MESSAGES/dselect.mo
+%%NLS%%@dirrmtry share/locale/tl/LC_MESSAGES
+%%NLS%%@dirrmtry share/locale/tl
+%%NLS%%share/locale/vi/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/vi/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/zh_CN/LC_MESSAGES/dpkg.mo
+%%NLS%%share/locale/zh_CN/LC_MESSAGES/dselect.mo
%%NLS%%share/locale/zh_TW/LC_MESSAGES/dpkg.mo
-@dirrm var/dpkg/updates
-@dirrm var/dpkg/parts
-@dirrm var/dpkg/methods/mnt
-@dirrm var/dpkg/methods/floppy
-@dirrm var/dpkg/methods/disk
-@dirrm var/dpkg/methods
-@dirrm var/dpkg/info
-@dirrm var/dpkg/alternatives
-@dirrm var/dpkg
-@dirrm var
+%%NLS%%share/locale/zh_TW/LC_MESSAGES/dselect.mo
@dirrm %%DATADIR%%/origins
@dirrm %%DATADIR%%
-@dirrm %%DOCSDIR%%
-@dirrm lib/dpkg/parsechangelog
-@dirrm lib/dpkg/methods/floppy
-@dirrm lib/dpkg/methods/disk
-@dirrm lib/dpkg/methods
-@dirrm lib/dpkg
+@dirrm libexec/dpkg/parsechangelog
+@dirrm libexec/dpkg/methods/floppy
+@dirrm libexec/dpkg/methods/disk
+@dirrm libexec/dpkg/methods
+@dirrm libexec/dpkg
@dirrm etc/dpkg/origins
@dirrm etc/dpkg
@dirrm etc/alternatives
+@cwd /
+@dirrm %%DPKGDIR%%/updates
+@dirrm %%DPKGDIR%%/parts
+@dirrm %%DPKGDIR%%/methods/mnt
+@dirrm %%DPKGDIR%%/methods/floppy
+@dirrm %%DPKGDIR%%/methods/disk
+@dirrm %%DPKGDIR%%/methods
+@dirrm %%DPKGDIR%%/info
+@dirrm %%DPKGDIR%%/alternatives
+@dirrm %%DPKGDIR%%