dpkg.inc 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. DESCRIPTION = "Package maintenance system for Debian."
  2. LICENSE = "GPLv2.0+"
  3. SECTION = "base"
  4. INC_PR = "r16"
  5. SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.bz2 \
  6. file://ignore_extra_fields.patch"
  7. DEPENDS = "zlib bzip2 perl"
  8. DEPENDS_virtclass-native = "bzip2-native zlib-native virtual/update-alternatives-native gettext-native perl-native-runtime"
  9. RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives}"
  10. RDEPENDS_${PN}_virtclass-native = ""
  11. S = "${WORKDIR}/${BPN}-${PV}"
  12. PARALLEL_MAKE = ""
  13. inherit autotools gettext perlnative
  14. export PERL_LIBDIR = "${libdir}/perl"
  15. PERL_LIBDIR_virtclass-native = "${libdir}/perl-native/perl"
  16. EXTRA_OECONF = "--without-static-progs \
  17. --without-dselect \
  18. --with-start-stop-daemon \
  19. --with-zlib \
  20. --with-bz2lib \
  21. --without-selinux \
  22. --without-sgml-doc"
  23. do_configure () {
  24. echo >> m4/compiler.m4
  25. sed -i -e 's#PERL_LIBDIR=.*$#PERL_LIBDIR="${libdir}/perl"#' ${S}/configure
  26. autotools_do_configure
  27. }
  28. DPKG_INIT_POSITION ?= "98"
  29. do_install_prepend () {
  30. install -d ${D}/${sysconfdir}/rcS.d
  31. # this happens at S98 where our good 'ole packages script used to run
  32. printf "#!/bin/sh
  33. dpkg --configure -a
  34. rm -f ${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure
  35. " > ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure
  36. chmod 0755 ${D}/${sysconfdir}/rcS.d/S${DPKG_INIT_POSITION}configure
  37. }
  38. do_install_append () {
  39. if [ "${PN}" = "dpkg-native" ]; then
  40. # update-alternatives doesn't have an offline mode
  41. rm ${D}${bindir}/update-alternatives
  42. else
  43. mv ${D}${bindir}/update-alternatives ${D}${sbindir}
  44. fi
  45. }
  46. PROV = "virtual/update-alternatives"
  47. PROV_virtclass-native = ""
  48. PROVIDES += "${PROV}"
  49. PACKAGES =+ "update-alternatives-dpkg"
  50. FILES_update-alternatives-dpkg = "${sbindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives"
  51. RPROVIDES_update-alternatives-dpkg += "update-alternatives"
  52. PACKAGES += "${PN}-perl"
  53. FILES_${PN}-perl = "${libdir}/perl"
  54. BBCLASSEXTEND = "native"