Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2006-2007 Openedhand Ltd. |
| 3 | # |
| 4 | # SPDX-License-Identifier: MIT |
| 5 | # |
| 6 | |
| 7 | ROOTFS_PKGMANAGE = "dpkg apt" |
| 8 | |
| 9 | do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot" |
| 10 | do_populate_sdk[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot bzip2-native:do_populate_sysroot" |
| 11 | do_rootfs[recrdeptask] += "do_package_write_deb do_package_qa" |
| 12 | do_rootfs[vardeps] += "PACKAGE_FEED_URIS PACKAGE_FEED_BASE_PATHS PACKAGE_FEED_ARCHS" |
| 13 | |
| 14 | do_rootfs[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock" |
| 15 | do_populate_sdk[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock" |
| 16 | do_populate_sdk_ext[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock" |
| 17 | |
| 18 | python rootfs_deb_bad_recommendations() { |
| 19 | if d.getVar("BAD_RECOMMENDATIONS"): |
| 20 | bb.warn("Debian package install does not support BAD_RECOMMENDATIONS") |
| 21 | } |
| 22 | do_rootfs[prefuncs] += "rootfs_deb_bad_recommendations" |
| 23 | |
| 24 | DEB_POSTPROCESS_COMMANDS = "" |
| 25 | |
| 26 | opkglibdir = "${localstatedir}/lib/opkg" |
| 27 | |
| 28 | python () { |
| 29 | # Map TARGET_ARCH to Debian's ideas about architectures |
| 30 | darch = d.getVar('SDK_ARCH') |
| 31 | if darch in ["x86", "i486", "i586", "i686", "pentium"]: |
| 32 | d.setVar('DEB_SDK_ARCH', 'i386') |
| 33 | elif darch == "x86_64": |
| 34 | d.setVar('DEB_SDK_ARCH', 'amd64') |
| 35 | elif darch == "arm": |
| 36 | d.setVar('DEB_SDK_ARCH', 'armel') |
| 37 | elif darch == "aarch64": |
| 38 | d.setVar('DEB_SDK_ARCH', 'arm64') |
| 39 | else: |
| 40 | bb.fatal("Unhandled SDK_ARCH %s" % darch) |
| 41 | } |