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"
|
|
|
|
|
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"
|
2013-09-30 22:17:46 +00:00
|
|
|
RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz"
|
|
|
|
RDEPENDS_${PN}_class-native = "xz"
|
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
|
|
|
|
2013-05-29 15:09:54 +00:00
|
|
|
export PERL = "${bindir}/perl"
|
|
|
|
PERL_class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl"
|
|
|
|
|
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 \
|
2013-05-30 07:42:01 +00:00
|
|
|
--without-liblzma \
|
2011-11-14 17:43:45 +00:00
|
|
|
--without-selinux \
|
|
|
|
--without-sgml-doc"
|
|
|
|
|
|
|
|
do_configure () {
|
2013-03-21 14:21:50 +00:00
|
|
|
echo >> ${S}/m4/compiler.m4
|
2011-11-14 17:43:45 +00:00
|
|
|
sed -i -e 's#PERL_LIBDIR=.*$#PERL_LIBDIR="${libdir}/perl"#' ${S}/configure
|
|
|
|
autotools_do_configure
|
|
|
|
}
|
|
|
|
|
|
|
|
DPKG_INIT_POSITION ?= "98"
|
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
|
2013-06-12 16:21:29 +00:00
|
|
|
sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-*
|
2011-11-16 22:01:46 +00:00
|
|
|
else
|
|
|
|
mv ${D}${bindir}/update-alternatives ${D}${sbindir}
|
2013-04-30 12:41:56 +00:00
|
|
|
sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-*
|
2011-11-16 22:01:46 +00:00
|
|
|
fi
|
2006-09-19 09:04:09 +00:00
|
|
|
}
|
2011-11-14 17:43:45 +00:00
|
|
|
|
2013-04-11 11:09:25 +00:00
|
|
|
pkg_postinst_${PN} () {
|
|
|
|
#!/bin/sh
|
|
|
|
if [ "x$D" != "x" ] && [ -f $D/var/lib/dpkg/status ]; then
|
2013-04-18 20:52:05 +00:00
|
|
|
install -d $D${sysconfdir}/rcS.d
|
2013-04-11 11:09:25 +00:00
|
|
|
|
|
|
|
# this happens at S98 where our good 'ole packages script used to run
|
|
|
|
echo "#!/bin/sh
|
2013-05-23 04:43:34 +00:00
|
|
|
[ -e ${sysconfdir}/default/postinst ] && . ${sysconfdir}/default/postinst
|
|
|
|
if [ \"\$POSTINST_LOGGING\" = \"1\" ]; then
|
|
|
|
dpkg --configure -a >\$LOGFILE 2>&1
|
|
|
|
else
|
|
|
|
dpkg --configure -a
|
|
|
|
fi
|
2013-04-11 11:09:25 +00:00
|
|
|
rm -f ${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
|
2013-04-18 20:52:05 +00:00
|
|
|
" > $D${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
|
|
|
|
chmod 0755 $D${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}run-postinsts
|
2013-04-11 11:09:25 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
|