dpkg.inc 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. SUMMARY = "Package maintenance system from Debian"
  2. LICENSE = "GPLv2.0+"
  3. SECTION = "base"
  4. DEPENDS = "zlib bzip2 perl ncurses"
  5. DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
  6. RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl"
  7. RDEPENDS_${PN}_class-native = ""
  8. UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
  9. inherit autotools gettext perlnative pkgconfig perl-version update-alternatives
  10. PERL_class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl"
  11. export PERL_LIBDIR = "${libdir}/perl/${@get_perl_version(d)}"
  12. PERL_LIBDIR_class-native = "${libdir}/perl-native/perl/${@get_perl_version(d)}"
  13. EXTRA_OECONF = "\
  14. --disable-dselect \
  15. --enable-start-stop-daemon \
  16. --with-libz \
  17. --with-libbz2 \
  18. --without-libselinux \
  19. TAR=tar \
  20. "
  21. EXTRA_OECONF_append_class-target = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}"
  22. PACKAGECONFIG = "liblzma"
  23. PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz"
  24. #autotools.bbclass default AUTOTOOLS_AUXDIR is ${S}, we need to under ${S}/build-aux
  25. AUTOTOOLS_AUXDIR = "${S}/build-aux"
  26. do_configure_prepend () {
  27. mkdir -p ${AUTOTOOLS_AUXDIR}
  28. # autotools_do_configure updates po/Makefile.in.in, we also need
  29. # update dselect/po and scripts/po
  30. cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/dselect/po/
  31. cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/scripts/po/
  32. }
  33. do_install_append () {
  34. if [ "${PN}" = "dpkg-native" ]; then
  35. # update-alternatives doesn't have an offline mode
  36. rm ${D}${bindir}/update-alternatives
  37. sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-*
  38. else
  39. sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-*
  40. fi
  41. }
  42. PROV = "virtual/update-alternatives"
  43. PROV_class-native = ""
  44. PROVIDES += "${PROV}"
  45. PACKAGES =+ "update-alternatives-dpkg"
  46. FILES_update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives"
  47. RPROVIDES_update-alternatives-dpkg += "update-alternatives"
  48. PACKAGES += "${PN}-perl"
  49. FILES_${PN}-perl = "${libdir}/perl/${@get_perl_version(d)}"
  50. RDEPENDS_${PN}-perl += "perl-module-carp perl-module-constant \
  51. perl-module-cwd perl-module-digest \
  52. perl-module-digest-md5 perl-module-errno \
  53. perl-module-exporter perl-module-fcntl \
  54. perl-module-feature perl-module-file-basename \
  55. perl-module-file-compare perl-module-file-copy \
  56. perl-module-file-find perl-module-file-path \
  57. perl-module-file-spec perl-module-file-temp \
  58. perl-module-list-util perl-module-overload \
  59. perl-module-parent perl-module-storable \
  60. perl-module-filehandle perl-module-io \
  61. perl-module-io-handle perl-module-io-seekable \
  62. perl-module-posix perl-module-scalar-util \
  63. perl-module-selectsaver perl-module-symbol \
  64. perl-module-term-ansicolor perl-module-tie-handle \
  65. perl-module-tie-hash perl-module-storable \
  66. perl-module-time-hires perl-module-time-piece \
  67. perl-module-xsloader"
  68. # Split out start-stop-daemon to its own package. Note that it
  69. # is installed in a different directory than the one used for
  70. # the bitbake version.
  71. #
  72. PACKAGES =+ "${PN}-start-stop"
  73. FILES_${PN}-start-stop = "${sbindir}/start-stop-daemon.${BPN}"
  74. ALTERNATIVE_${PN}-start-stop = "start-stop-daemon"
  75. ALTERNATIVE_LINK_NAME[start-stop-daemon] = "${sbindir}/start-stop-daemon"
  76. ALTERNATIVE_PRIORITY = "100"
  77. RDEPENDS_${PN} += "${PN}-start-stop"
  78. BBCLASSEXTEND = "native"