Download:
MD5 sum: package-md5-checksum
dpkg
x.y.z
http://where/is/your/package
./configure --prefix=/tools \
--disable-nls --without-dselect \
--without-start-stop-daemon \
--without-update-alternatives \
--without-install-info \
--without-zlib --with-bz2=static --without-selinux
(cd lib && make)
(cd src && make)
(cd dpkg-deb && make)
(cd dpkg-split && make)
cp src/dpkg src/dpkg-* /tools/bin
cp dpkg-deb/dpkg-deb /tools/bin
cp dpkg-split/dpkg-split /tools/bin
mkdir -pv /tools/etc/dpkg/{,dpkg.cfg.d}
cp debian/dpkg.cfg /tools/etc/dpkg
cat >> /tools/etc/dpkg/dpkg.cfg << EOF
# admindir on LFS system
admindir /var/lib/dpkg
EOF
cat >> /tools/etc/dpkg/dpkg.cfg << EOF
# disable fatal error on path checking
force-bad-path
EOF
dpkg
x.y.z
http://where/is/your/package
./configure --prefix=/tools \
--disable-nls --without-dselect \
--without-start-stop-daemon \
--without-update-alternatives \
--without-install-info \
--without-zlib --with-bz2=static --without-selinux
(cd lib && make)
(cd src && make)
(cd dpkg-deb && make)
(cd dpkg-split && make)
cp src/dpkg src/dpkg-* /tools/bin
cp dpkg-deb/dpkg-deb /tools/bin
cp dpkg-split/dpkg-split /tools/bin
mkdir -pv /tools/etc/dpkg/{,dpkg.cfg.d}
cp debian/dpkg.cfg /tools/etc/dpkg
cat >> /tools/etc/dpkg/dpkg.cfg << EOF
# admindir on LFS system
admindir /var/lib/dpkg
EOF
cat >> /tools/etc/dpkg/dpkg.cfg << EOF
# disable fatal error on path checking
force-bad-path
EOF
mkdir -pv /var/{log,lib/dpkg/{info,updates}}
mkdir -pv /var/lib/packages
touch /var/lib/dpkg/{available,status}
touch /var/log/dpkg.log
dpkg
x.y.z
http://where/is/your/package
./configure --prefix=/usr \
--without-dselect \
--without-start-stop-daemon \
--without-update-alternatives \
--without-install-info \
--without-selinux
make
mkdir -pv $PKG_DEST
make DESTDIR=$PKG_DEST install
mkdir -pv $PKG_DEST/etc/dpkg/{,dpkg.cfg.d}
cp debian/dpkg.cfg $PKG_DEST/etc/dpkg
cat >> $PKG_DEST/etc/dpkg/dpkg.cfg << EOF
# admindir on LFS system
admindir /var/lib/dpkg
EOF
cat >> $PKG_DEST/etc/dpkg/dpkg.cfg << EOF
# disable fatal error on path checking
force-bad-path
EOF