Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "Debian's start-stop-daemon utility extracted from the dpkg \ |
| 2 | package" |
| 3 | LICENSE = "PD" |
| 4 | LIC_FILES_CHKSUM = "file://utils/start-stop-daemon.c;endline=21;md5=8fbd0497a7d0b01e99820bffcb58e9ad" |
| 5 | DEPENDS = "zlib bzip2 perl ncurses" |
| 6 | # start-stop-daemon is usually shipped by dpkg |
| 7 | RCONFLICTS_${PN} = "dpkg" |
| 8 | |
| 9 | SRC_URI = " \ |
| 10 | ${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz \ |
| 11 | file://0001-dpkg-start-stop-daemon-Accept-SIG-prefixed-signal-na.patch \ |
| 12 | file://noman.patch \ |
| 13 | file://remove-tar-no-timestamp.patch \ |
| 14 | file://arch_pm.patch \ |
| 15 | file://add_armeb_triplet_entry.patch \ |
| 16 | file://0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch \ |
| 17 | file://0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch \ |
| 18 | file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \ |
| 19 | file://0005-dpkg-compiler.m4-remove-Wvla.patch \ |
| 20 | file://0006-add-musleabi-to-known-target-tripets.patch \ |
| 21 | file://0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch \ |
| 22 | file://0001-dpkg-Support-muslx32-build.patch \ |
| 23 | " |
| 24 | SRC_URI[md5sum] = "e463f58b04acb23659df23d2a7a05cff" |
| 25 | SRC_URI[sha256sum] = "c49c371953aea03f543814dcae37c069e86069333fb2e24e9252e76647663492" |
| 26 | |
| 27 | inherit autotools gettext perlnative pkgconfig perl-version |
| 28 | |
| 29 | S = "${WORKDIR}/dpkg-${PV}" |
| 30 | |
| 31 | EXTRA_OECONF = "\ |
| 32 | --disable-dselect \ |
| 33 | --enable-start-stop-daemon \ |
| 34 | --with-libz \ |
| 35 | --with-libbz2 \ |
| 36 | --without-libselinux \ |
| 37 | " |
| 38 | |
| 39 | PACKAGECONFIG = "liblzma" |
| 40 | PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz" |
| 41 | |
| 42 | export PERL = "${bindir}/perl" |
| 43 | export PERL_LIBDIR = "${libdir}/perl/${@get_perl_version(d)}" |
| 44 | EXTRA_OECONF += "TAR=tar" |
| 45 | |
| 46 | EXTRA_OECONF_append_class-target = " DEB_HOST_ARCH=${DPKG_ARCH}" |
| 47 | |
| 48 | DPKG_ARCH ??= "${@deb_arch_map(d.getVar('TARGET_ARCH'), d.getVar('TUNE_FEATURES'))}" |
| 49 | |
| 50 | def deb_arch_map(arch, tune): |
| 51 | tune_features = tune.split() |
| 52 | if arch == "allarch": |
| 53 | return "all" |
| 54 | if arch in ["i586", "i686"]: |
| 55 | return "i386" |
| 56 | if arch == "x86_64": |
| 57 | if "mx32" in tune_features: |
| 58 | return "x32" |
| 59 | return "amd64" |
| 60 | if arch.startswith("mips"): |
| 61 | endian = ["el", ""]["bigendian" in tune_features] |
| 62 | if "n64" in tune_features: |
| 63 | return "mips64" + endian |
| 64 | if "n32" in tune_features: |
| 65 | return "mipsn32" + endian |
| 66 | return "mips" + endian |
| 67 | if arch == "powerpc": |
| 68 | return arch + ["", "spe"]["spe" in tune_features] |
| 69 | if arch == "aarch64": |
| 70 | return "arm64" |
| 71 | if arch == "arm": |
| 72 | return arch + ["el", "hf"]["callconvention-hard" in tune_features] |
| 73 | return arch |
| 74 | |
| 75 | do_install_append () { |
| 76 | # remove everything that is not related to start-stop-daemon, since there |
| 77 | # is no explicit rule for only installing ssd |
| 78 | find ${D} -type f -not -name "*start-stop-daemon*" -exec rm {} \; |
| 79 | find ${D} -depth -type d -empty -exec rmdir {} \; |
| 80 | |
| 81 | # support for buggy init.d scripts that refer to an alternative |
| 82 | # explicit path to start-stop-daemon |
| 83 | if [ "${base_sbindir}" != "${sbindir}" ]; then |
| 84 | mkdir -p ${D}${base_sbindir} |
| 85 | ln -sf ${sbindir}/start-stop-daemon ${D}${base_sbindir}/start-stop-daemon |
| 86 | fi |
| 87 | } |