2006-09-05 07:24:58 +00:00
|
|
|
DESCRIPTION = "Package maintenance system for Debian."
|
2011-12-15 23:16:22 +00:00
|
|
|
LICENSE = "GPLv2.0+"
|
2006-09-05 07:24:58 +00:00
|
|
|
SECTION = "base"
|
|
|
|
|
2013-02-25 02:45:13 +00:00
|
|
|
INC_PR = "r19"
|
2011-08-05 01:07:08 +00:00
|
|
|
|
2012-08-28 14:02:40 +00:00
|
|
|
SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz \
|
2011-08-18 00:17:52 +00:00
|
|
|
file://ignore_extra_fields.patch"
|
2006-10-31 09:13:45 +00:00
|
|
|
|
2013-03-08 15:45:27 +00:00
|
|
|
DEPENDS = "zlib bzip2 perl ncurses"
|
2013-02-01 02:38:17 +00:00
|
|
|
DEPENDS_class-native = "bzip2-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
|
2010-01-13 23:25:08 +00:00
|
|
|
RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives}"
|
2012-10-27 08:48:17 +00:00
|
|
|
RDEPENDS_${PN}_class-native = ""
|
2010-01-13 23:25:08 +00:00
|
|
|
|
|
|
|
S = "${WORKDIR}/${BPN}-${PV}"
|
2006-09-05 07:24:58 +00:00
|
|
|
|
|
|
|
PARALLEL_MAKE = ""
|
2006-09-19 09:04:09 +00:00
|
|
|
|
2013-02-04 15:50:40 +00:00
|
|
|
inherit autotools gettext perlnative pkgconfig
|
2006-09-19 09:04:09 +00:00
|
|
|
|
2011-11-14 17:43:45 +00:00
|
|
|
export PERL_LIBDIR = "${libdir}/perl"
|
2012-10-27 08:48:17 +00:00
|
|
|
PERL_LIBDIR_class-native = "${libdir}/perl-native/perl"
|
2006-09-19 09:04:09 +00:00
|
|
|
|
2011-11-14 17:43:45 +00:00
|
|
|
EXTRA_OECONF = "--without-static-progs \
|
|
|
|
--without-dselect \
|
|
|
|
--with-start-stop-daemon \
|
|
|
|
--with-zlib \
|
|
|
|
--with-bz2lib \
|
|
|
|
--without-selinux \
|
|
|
|
--without-sgml-doc"
|
|
|
|
|
|
|
|
do_configure () {
|
|
|
|
echo >> m4/compiler.m4
|
|
|
|
sed -i -e 's#PERL_LIBDIR=.*$#PERL_LIBDIR="${libdir}/perl"#' ${S}/configure
|
|
|
|
autotools_do_configure
|
|
|
|
}
|
|
|
|
|
2013-02-25 02:45:13 +00:00
|
|
|
POSTLOG ?= "/var/log/postinstall.log"
|
|
|
|
REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>${POSTLOG} 2>&1', '', d)}"
|
2011-11-14 17:43:45 +00:00
|
|
|
|
|
|
|
DPKG_INIT_POSITION ?= "98"
|
2011-09-13 13:30:37 +00:00
|
|
|
do_install_prepend () {
|
|
|
|
install -d ${D}/${sysconfdir}/rcS.d
|
2006-09-19 09:04:09 +00:00
|
|
|
# this happens at S98 where our good 'ole packages script used to run
|
2013-02-25 02:45:13 +00:00
|
|
|
echo "#!/bin/sh
|
|
|
|
dpkg --configure -a ${REDIRECT_CMD}
|
2012-03-03 17:52:29 +00:00
|
|
|
rm -f ${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
|
|
|
|
" > ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
|
|
|
|
chmod 0755 ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
|
2006-09-19 09:04:09 +00:00
|
|
|
}
|
|
|
|
|
2011-11-14 17:43:45 +00:00
|
|
|
do_install_append () {
|
2011-11-16 22:01:46 +00:00
|
|
|
if [ "${PN}" = "dpkg-native" ]; then
|
|
|
|
# update-alternatives doesn't have an offline mode
|
|
|
|
rm ${D}${bindir}/update-alternatives
|
|
|
|
else
|
|
|
|
mv ${D}${bindir}/update-alternatives ${D}${sbindir}
|
|
|
|
fi
|
2006-09-19 09:04:09 +00:00
|
|
|
}
|
2011-11-14 17:43:45 +00:00
|
|
|
|
2012-07-04 10:15:54 +00:00
|
|
|
# Create a wrapper for the perl script to avoid the "bad interpreter"
|
|
|
|
# error when the tmpdir is longer than 150.
|
2012-10-27 08:48:17 +00:00
|
|
|
do_install_append_class-native () {
|
2012-07-04 10:15:54 +00:00
|
|
|
tmp=`find ${D}${bindir} -type f -exec grep -m 1 -l '#!/.*/perl-native/perl' {} \;`
|
|
|
|
for i in $tmp; do
|
|
|
|
create_wrapper $i ${STAGING_BINDIR_NATIVE}/perl-native/perl
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2011-11-16 22:01:46 +00:00
|
|
|
PROV = "virtual/update-alternatives"
|
2012-10-27 08:48:17 +00:00
|
|
|
PROV_class-native = ""
|
2011-11-16 22:01:46 +00:00
|
|
|
|
|
|
|
PROVIDES += "${PROV}"
|
2011-11-14 17:43:45 +00:00
|
|
|
|
|
|
|
PACKAGES =+ "update-alternatives-dpkg"
|
|
|
|
FILES_update-alternatives-dpkg = "${sbindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives"
|
|
|
|
RPROVIDES_update-alternatives-dpkg += "update-alternatives"
|
|
|
|
|
|
|
|
PACKAGES += "${PN}-perl"
|
|
|
|
FILES_${PN}-perl = "${libdir}/perl"
|
|
|
|
|
|
|
|
BBCLASSEXTEND = "native"
|
|
|
|
|
|
|
|
|