dpkg.inc 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. SUMMARY = "Package maintenance system from Debian"
  2. LICENSE = "GPL-2.0-or-later"
  3. HOMEPAGE = "https://salsa.debian.org/dpkg-team/dpkg"
  4. DESCRIPTION = "The primary interface for the dpkg suite is the dselect program. A more low-level and less user-friendly interface is available in the form of the dpkg command."
  5. SECTION = "base"
  6. DEPENDS = "zlib bzip2 perl ncurses libmd"
  7. DEPENDS:class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native libmd-native"
  8. RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl"
  9. RDEPENDS:${PN}:class-native = ""
  10. UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
  11. inherit autotools gettext perlnative pkgconfig perl-version update-alternatives bash-completion
  12. PERL:class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl"
  13. export PERL_LIBDIR = "${libdir}/perl5/${@get_perl_version(d)}"
  14. PERL_LIBDIR:class-native = "${libdir}/perl-native/perl/${@get_perl_version(d)}"
  15. EXTRA_OECONF = "\
  16. --disable-dselect \
  17. --enable-start-stop-daemon \
  18. --with-libz \
  19. --with-libbz2 \
  20. --without-libselinux \
  21. TAR=tar \
  22. "
  23. EXTRA_OECONF:append:class-target = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}"
  24. EXTRA_OECONF:append:class-nativesdk = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}"
  25. PACKAGECONFIG = "liblzma"
  26. PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz"
  27. #autotools.bbclass default AUTOTOOLS_AUXDIR is ${S}, we need to under ${S}/build-aux
  28. AUTOTOOLS_AUXDIR = "${S}/build-aux"
  29. do_configure:prepend () {
  30. mkdir -p ${AUTOTOOLS_AUXDIR}
  31. # autotools_do_configure updates po/Makefile.in.in, we also need
  32. # update dselect/po and scripts/po
  33. cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/dselect/po/
  34. cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/scripts/po/
  35. [ ! -e ${S}/.dist-version ] && echo ${PV} > ${S}/.dist-version
  36. }
  37. do_install:append () {
  38. if [ "${PN}" = "dpkg-native" ]; then
  39. # update-alternatives doesn't have an offline mode
  40. rm ${D}${bindir}/update-alternatives
  41. sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-* ${D}${sbindir}/dpkg-*
  42. else
  43. sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-* ${D}${sbindir}/dpkg-*
  44. fi
  45. }
  46. PROV = "virtual/update-alternatives"
  47. PROV:class-native = ""
  48. PROV:class-nativesdk = ""
  49. PROVIDES += "${PROV}"
  50. FILES:${PN} += "${datadir}/zsh"
  51. PACKAGES =+ "update-alternatives-dpkg"
  52. FILES:update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives"
  53. RPROVIDES:update-alternatives-dpkg += "update-alternatives"
  54. PACKAGES += "${PN}-perl"
  55. FILES:${PN}-perl = "${libdir}/perl5/${@get_perl_version(d)}"
  56. RDEPENDS:${PN}-perl += "perl-module-carp perl-module-constant \
  57. perl-module-cwd perl-module-digest \
  58. perl-module-digest-md5 perl-module-errno \
  59. perl-module-exporter perl-module-fcntl \
  60. perl-module-feature perl-module-file-basename \
  61. perl-module-file-compare perl-module-file-copy \
  62. perl-module-file-find perl-module-file-path \
  63. perl-module-file-spec perl-module-file-temp \
  64. perl-module-list-util perl-module-overload \
  65. perl-module-parent perl-module-storable \
  66. perl-module-filehandle perl-module-io \
  67. perl-module-io-handle perl-module-io-seekable \
  68. perl-module-posix perl-module-scalar-util \
  69. perl-module-selectsaver perl-module-symbol \
  70. perl-module-term-ansicolor perl-module-tie-handle \
  71. perl-module-tie-hash perl-module-storable \
  72. perl-module-time-hires perl-module-time-piece \
  73. perl-module-xsloader"
  74. # Split out start-stop-daemon to its own package. Note that it
  75. # is installed in a different directory than the one used for
  76. # the bitbake version.
  77. #
  78. PACKAGES =+ "${PN}-start-stop"
  79. FILES:${PN}-start-stop = "${sbindir}/start-stop-daemon.${BPN}"
  80. ALTERNATIVE:${PN}-start-stop = "start-stop-daemon"
  81. ALTERNATIVE_LINK_NAME[start-stop-daemon] = "${sbindir}/start-stop-daemon"
  82. ALTERNATIVE_PRIORITY = "100"
  83. EXTRA_RDPENDS = "ldconfig"
  84. EXTRA_RDPENDS:libc-musl = ""
  85. RDEPENDS:${PN} += "${PN}-start-stop ${EXTRA_RDPENDS}"
  86. BBCLASSEXTEND = "native nativesdk"