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