1*4882a593SmuzhiyunSUMMARY = "Package maintenance system from Debian" 2*4882a593SmuzhiyunLICENSE = "GPL-2.0-or-later" 3*4882a593SmuzhiyunHOMEPAGE = "https://salsa.debian.org/dpkg-team/dpkg" 4*4882a593SmuzhiyunDESCRIPTION = "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*4882a593SmuzhiyunSECTION = "base" 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunDEPENDS = "zlib bzip2 perl ncurses" 8*4882a593SmuzhiyunDEPENDS:class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native" 9*4882a593SmuzhiyunRDEPENDS:${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl" 10*4882a593SmuzhiyunRDEPENDS:${PN}:class-native = "" 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunUPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))" 13*4882a593Smuzhiyun 14*4882a593Smuzhiyuninherit autotools gettext perlnative pkgconfig perl-version update-alternatives 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunPERL:class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl" 17*4882a593Smuzhiyun 18*4882a593Smuzhiyunexport PERL_LIBDIR = "${libdir}/perl5/${@get_perl_version(d)}" 19*4882a593SmuzhiyunPERL_LIBDIR:class-native = "${libdir}/perl-native/perl/${@get_perl_version(d)}" 20*4882a593Smuzhiyun 21*4882a593SmuzhiyunEXTRA_OECONF = "\ 22*4882a593Smuzhiyun --disable-dselect \ 23*4882a593Smuzhiyun --enable-start-stop-daemon \ 24*4882a593Smuzhiyun --with-libz \ 25*4882a593Smuzhiyun --with-libbz2 \ 26*4882a593Smuzhiyun --without-libselinux \ 27*4882a593Smuzhiyun TAR=tar \ 28*4882a593Smuzhiyun " 29*4882a593Smuzhiyun 30*4882a593SmuzhiyunEXTRA_OECONF:append:class-target = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}" 31*4882a593SmuzhiyunEXTRA_OECONF:append:class-nativesdk = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}" 32*4882a593Smuzhiyun 33*4882a593SmuzhiyunPACKAGECONFIG = "liblzma" 34*4882a593SmuzhiyunPACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz" 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun#autotools.bbclass default AUTOTOOLS_AUXDIR is ${S}, we need to under ${S}/build-aux 38*4882a593SmuzhiyunAUTOTOOLS_AUXDIR = "${S}/build-aux" 39*4882a593Smuzhiyun 40*4882a593Smuzhiyundo_configure:prepend () { 41*4882a593Smuzhiyun mkdir -p ${AUTOTOOLS_AUXDIR} 42*4882a593Smuzhiyun # autotools_do_configure updates po/Makefile.in.in, we also need 43*4882a593Smuzhiyun # update dselect/po and scripts/po 44*4882a593Smuzhiyun cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/dselect/po/ 45*4882a593Smuzhiyun cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/scripts/po/ 46*4882a593Smuzhiyun} 47*4882a593Smuzhiyun 48*4882a593Smuzhiyundo_install:append () { 49*4882a593Smuzhiyun if [ "${PN}" = "dpkg-native" ]; then 50*4882a593Smuzhiyun # update-alternatives doesn't have an offline mode 51*4882a593Smuzhiyun rm ${D}${bindir}/update-alternatives 52*4882a593Smuzhiyun sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-* ${D}${sbindir}/dpkg-* 53*4882a593Smuzhiyun else 54*4882a593Smuzhiyun sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-* ${D}${sbindir}/dpkg-* 55*4882a593Smuzhiyun fi 56*4882a593Smuzhiyun} 57*4882a593Smuzhiyun 58*4882a593SmuzhiyunPROV = "virtual/update-alternatives" 59*4882a593SmuzhiyunPROV:class-native = "" 60*4882a593SmuzhiyunPROV:class-nativesdk = "" 61*4882a593Smuzhiyun 62*4882a593SmuzhiyunPROVIDES += "${PROV}" 63*4882a593Smuzhiyun 64*4882a593SmuzhiyunFILES:${PN} += "${datadir}/zsh" 65*4882a593Smuzhiyun 66*4882a593SmuzhiyunPACKAGES =+ "update-alternatives-dpkg" 67*4882a593SmuzhiyunFILES:update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives" 68*4882a593SmuzhiyunRPROVIDES:update-alternatives-dpkg += "update-alternatives" 69*4882a593Smuzhiyun 70*4882a593SmuzhiyunPACKAGES += "${PN}-perl" 71*4882a593SmuzhiyunFILES:${PN}-perl = "${libdir}/perl5/${@get_perl_version(d)}" 72*4882a593Smuzhiyun 73*4882a593SmuzhiyunRDEPENDS:${PN}-perl += "perl-module-carp perl-module-constant \ 74*4882a593Smuzhiyun perl-module-cwd perl-module-digest \ 75*4882a593Smuzhiyun perl-module-digest-md5 perl-module-errno \ 76*4882a593Smuzhiyun perl-module-exporter perl-module-fcntl \ 77*4882a593Smuzhiyun perl-module-feature perl-module-file-basename \ 78*4882a593Smuzhiyun perl-module-file-compare perl-module-file-copy \ 79*4882a593Smuzhiyun perl-module-file-find perl-module-file-path \ 80*4882a593Smuzhiyun perl-module-file-spec perl-module-file-temp \ 81*4882a593Smuzhiyun perl-module-list-util perl-module-overload \ 82*4882a593Smuzhiyun perl-module-parent perl-module-storable \ 83*4882a593Smuzhiyun perl-module-filehandle perl-module-io \ 84*4882a593Smuzhiyun perl-module-io-handle perl-module-io-seekable \ 85*4882a593Smuzhiyun perl-module-posix perl-module-scalar-util \ 86*4882a593Smuzhiyun perl-module-selectsaver perl-module-symbol \ 87*4882a593Smuzhiyun perl-module-term-ansicolor perl-module-tie-handle \ 88*4882a593Smuzhiyun perl-module-tie-hash perl-module-storable \ 89*4882a593Smuzhiyun perl-module-time-hires perl-module-time-piece \ 90*4882a593Smuzhiyun perl-module-xsloader" 91*4882a593Smuzhiyun 92*4882a593Smuzhiyun# Split out start-stop-daemon to its own package. Note that it 93*4882a593Smuzhiyun# is installed in a different directory than the one used for 94*4882a593Smuzhiyun# the bitbake version. 95*4882a593Smuzhiyun# 96*4882a593SmuzhiyunPACKAGES =+ "${PN}-start-stop" 97*4882a593SmuzhiyunFILES:${PN}-start-stop = "${sbindir}/start-stop-daemon.${BPN}" 98*4882a593SmuzhiyunALTERNATIVE:${PN}-start-stop = "start-stop-daemon" 99*4882a593SmuzhiyunALTERNATIVE_LINK_NAME[start-stop-daemon] = "${sbindir}/start-stop-daemon" 100*4882a593SmuzhiyunALTERNATIVE_PRIORITY = "100" 101*4882a593Smuzhiyun 102*4882a593SmuzhiyunEXTRA_RDPENDS = "ldconfig" 103*4882a593SmuzhiyunEXTRA_RDPENDS:libc-musl = "" 104*4882a593SmuzhiyunRDEPENDS:${PN} += "${PN}-start-stop ${EXTRA_RDPENDS}" 105*4882a593Smuzhiyun 106*4882a593SmuzhiyunBBCLASSEXTEND = "native nativesdk" 107