Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Package maintenance system from Debian" |
| 2 | LICENSE = "GPLv2.0+" |
| 3 | SECTION = "base" |
| 4 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 5 | DEPENDS = "zlib bzip2 perl ncurses" |
| 6 | 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] | 7 | RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl" |
| 8 | RDEPENDS_${PN}_class-native = "" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 9 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 10 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/" |
| 11 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 12 | inherit autotools gettext perlnative pkgconfig perl-version |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 13 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 14 | PERL_class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl" |
| 15 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 16 | export PERL_LIBDIR = "${libdir}/perl/${@get_perl_version(d)}" |
| 17 | PERL_LIBDIR_class-native = "${libdir}/perl-native/perl/${@get_perl_version(d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 18 | |
| 19 | EXTRA_OECONF = "\ |
| 20 | --disable-dselect \ |
| 21 | --enable-start-stop-daemon \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 22 | --with-libz \ |
| 23 | --with-libbz2 \ |
| 24 | --without-libselinux \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 25 | TAR=tar \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 26 | " |
| 27 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 28 | EXTRA_OECONF_append_class-target = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}" |
| 29 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 30 | PACKAGECONFIG = "liblzma" |
| 31 | PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz" |
| 32 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | PROV = "virtual/update-alternatives" |
| 44 | PROV_class-native = "" |
| 45 | |
| 46 | PROVIDES += "${PROV}" |
| 47 | |
| 48 | PACKAGES =+ "update-alternatives-dpkg" |
| 49 | FILES_update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives" |
| 50 | RPROVIDES_update-alternatives-dpkg += "update-alternatives" |
| 51 | |
| 52 | PACKAGES += "${PN}-perl" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 53 | FILES_${PN}-perl = "${libdir}/perl/${@get_perl_version(d)}" |
| 54 | |
| 55 | RDEPENDS_${PN}-perl += "perl-module-carp perl-module-constant \ |
| 56 | perl-module-cwd perl-module-digest \ |
| 57 | perl-module-digest-md5 perl-module-errno \ |
| 58 | perl-module-exporter perl-module-fcntl \ |
| 59 | perl-module-feature perl-module-file-basename \ |
| 60 | perl-module-file-compare perl-module-file-copy \ |
| 61 | perl-module-file-find perl-module-file-path \ |
| 62 | perl-module-file-spec perl-module-file-temp \ |
| 63 | perl-module-list-util perl-module-overload \ |
| 64 | perl-module-parent perl-module-storable \ |
| 65 | perl-module-filehandle perl-module-io \ |
| 66 | perl-module-io-handle perl-module-io-seekable \ |
| 67 | perl-module-posix perl-module-scalar-util \ |
| 68 | perl-module-selectsaver perl-module-symbol \ |
| 69 | perl-module-term-ansicolor perl-module-tie-handle \ |
| 70 | perl-module-tie-hash perl-module-storable \ |
| 71 | perl-module-time-hires perl-module-time-piece \ |
| 72 | perl-module-xsloader" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 73 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 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" |
| 80 | |
| 81 | RDEPENDS_${PN} += "${PN}-start-stop" |
| 82 | |
| 83 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 84 | BBCLASSEXTEND = "native" |