blob: 00b1e9187a411442652b0a6eaa5b628683a1cfa2 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Package maintenance system from Debian"
2LICENSE = "GPLv2.0+"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06003HOMEPAGE = "https://salsa.debian.org/dpkg-team/dpkg"
4DESCRIPTION = "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 Williamsc124f4f2015-09-15 14:41:29 -05005SECTION = "base"
6
Patrick Williamsc124f4f2015-09-15 14:41:29 -05007DEPENDS = "zlib bzip2 perl ncurses"
Patrick Williams213cb262021-08-07 19:21:33 -05008DEPENDS:class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
9RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl"
10RDEPENDS:${PN}:class-native = ""
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011
Andrew Geisslerb7d28612020-07-24 16:15:54 -050012UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060013
Brad Bishop08902b02019-08-20 09:16:51 -040014inherit autotools gettext perlnative pkgconfig perl-version update-alternatives
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015
Patrick Williams213cb262021-08-07 19:21:33 -050016PERL:class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050017
Andrew Geissler595f6302022-01-24 19:11:47 +000018export PERL_LIBDIR = "${libdir}/perl5/${@get_perl_version(d)}"
Patrick Williams213cb262021-08-07 19:21:33 -050019PERL_LIBDIR:class-native = "${libdir}/perl-native/perl/${@get_perl_version(d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050020
21EXTRA_OECONF = "\
22 --disable-dselect \
23 --enable-start-stop-daemon \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050024 --with-libz \
25 --with-libbz2 \
26 --without-libselinux \
Brad Bishop19323692019-04-05 15:28:33 -040027 TAR=tar \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050028 "
29
Patrick Williams213cb262021-08-07 19:21:33 -050030EXTRA_OECONF:append:class-target = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}"
31EXTRA_OECONF:append:class-nativesdk = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}"
Brad Bishop19323692019-04-05 15:28:33 -040032
Brad Bishop6e60e8b2018-02-01 10:27:11 -050033PACKAGECONFIG = "liblzma"
34PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz"
35
Andrew Geisslerb7d28612020-07-24 16:15:54 -050036
37#autotools.bbclass default AUTOTOOLS_AUXDIR is ${S}, we need to under ${S}/build-aux
38AUTOTOOLS_AUXDIR = "${S}/build-aux"
39
Patrick Williams213cb262021-08-07 19:21:33 -050040do_configure:prepend () {
Andrew Geisslerb7d28612020-07-24 16:15:54 -050041 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 Williams213cb262021-08-07 19:21:33 -050048do_install:append () {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050049 if [ "${PN}" = "dpkg-native" ]; then
50 # update-alternatives doesn't have an offline mode
51 rm ${D}${bindir}/update-alternatives
Andrew Geissler595f6302022-01-24 19:11:47 +000052 sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-* ${D}${sbindir}/dpkg-*
Patrick Williamsc124f4f2015-09-15 14:41:29 -050053 else
Andrew Geissler595f6302022-01-24 19:11:47 +000054 sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-* ${D}${sbindir}/dpkg-*
Patrick Williamsc124f4f2015-09-15 14:41:29 -050055 fi
Patrick Williamsc124f4f2015-09-15 14:41:29 -050056}
57
58PROV = "virtual/update-alternatives"
Patrick Williams213cb262021-08-07 19:21:33 -050059PROV:class-native = ""
60PROV:class-nativesdk = ""
Patrick Williamsc124f4f2015-09-15 14:41:29 -050061
62PROVIDES += "${PROV}"
63
Andrew Geissler595f6302022-01-24 19:11:47 +000064FILES:${PN} += "${datadir}/zsh"
65
Patrick Williamsc124f4f2015-09-15 14:41:29 -050066PACKAGES =+ "update-alternatives-dpkg"
Patrick Williams213cb262021-08-07 19:21:33 -050067FILES:update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives"
68RPROVIDES:update-alternatives-dpkg += "update-alternatives"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050069
70PACKAGES += "${PN}-perl"
Andrew Geissler595f6302022-01-24 19:11:47 +000071FILES:${PN}-perl = "${libdir}/perl5/${@get_perl_version(d)}"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050072
Patrick Williams213cb262021-08-07 19:21:33 -050073RDEPENDS:${PN}-perl += "perl-module-carp perl-module-constant \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050074 perl-module-cwd perl-module-digest \
75 perl-module-digest-md5 perl-module-errno \
76 perl-module-exporter perl-module-fcntl \
77 perl-module-feature perl-module-file-basename \
78 perl-module-file-compare perl-module-file-copy \
79 perl-module-file-find perl-module-file-path \
80 perl-module-file-spec perl-module-file-temp \
81 perl-module-list-util perl-module-overload \
82 perl-module-parent perl-module-storable \
83 perl-module-filehandle perl-module-io \
84 perl-module-io-handle perl-module-io-seekable \
85 perl-module-posix perl-module-scalar-util \
86 perl-module-selectsaver perl-module-symbol \
87 perl-module-term-ansicolor perl-module-tie-handle \
88 perl-module-tie-hash perl-module-storable \
89 perl-module-time-hires perl-module-time-piece \
90 perl-module-xsloader"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050091
Patrick Williamsc0f7c042017-02-23 20:41:17 -060092# Split out start-stop-daemon to its own package. Note that it
93# is installed in a different directory than the one used for
94# the bitbake version.
95#
96PACKAGES =+ "${PN}-start-stop"
Patrick Williams213cb262021-08-07 19:21:33 -050097FILES:${PN}-start-stop = "${sbindir}/start-stop-daemon.${BPN}"
98ALTERNATIVE:${PN}-start-stop = "start-stop-daemon"
Brad Bishop08902b02019-08-20 09:16:51 -040099ALTERNATIVE_LINK_NAME[start-stop-daemon] = "${sbindir}/start-stop-daemon"
100ALTERNATIVE_PRIORITY = "100"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600101
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600102EXTRA_RDPENDS = "ldconfig"
Patrick Williams213cb262021-08-07 19:21:33 -0500103EXTRA_RDPENDS:libc-musl = ""
104RDEPENDS:${PN} += "${PN}-start-stop ${EXTRA_RDPENDS}"
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600105
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600106BBCLASSEXTEND = "native nativesdk"