Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SECTION = "devel" |
| 2 | # Need binutils for libiberty.a |
| 3 | # Would need transfig-native for documentation if it wasn't disabled |
| 4 | DEPENDS = "elfutils binutils" |
| 5 | SUMMARY = "An ELF prelinking utility" |
| 6 | DESCRIPTION = "The prelink package contains a utility which modifies ELF shared libraries \ |
| 7 | and executables, so that far fewer relocations need to be resolved at \ |
| 8 | runtime and thus programs come up faster." |
| 9 | LICENSE = "GPLv2" |
| 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b" |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 11 | SRCREV = "927979bbd115eeb8a75db3231906ef6aca4c4eb6" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | PV = "1.0+git${SRCPV}" |
| 13 | |
| 14 | # |
| 15 | # The cron script attempts to re-prelink the system daily -- on |
| 16 | # systems where users are adding applications, this might be reasonable |
| 17 | # but for embedded, we should be re-running prelink -a after an update. |
| 18 | # |
| 19 | # Default is prelinking is enabled. |
| 20 | # |
| 21 | SUMMARY_${PN}-cron = "Cron scripts to control automatic prelinking" |
| 22 | DESCRIPTION_${PN}-cron = "Cron scripts to control automatic prelinking. \ |
| 23 | See: ${sysconfdir}/cron.daily/prelink for configuration information." |
| 24 | |
| 25 | FILES_${PN}-cron = "${sysconfdir}/cron.daily ${sysconfdir}/default" |
| 26 | |
| 27 | PACKAGES =+ "${PN}-cron" |
| 28 | |
| 29 | SRC_URI = "git://git.yoctoproject.org/prelink-cross.git;branch=cross_prelink \ |
| 30 | file://prelink.conf \ |
| 31 | file://prelink.cron.daily \ |
| 32 | file://prelink.default \ |
| 33 | file://macros.prelink" |
| 34 | |
| 35 | TARGET_OS_ORIG := "${TARGET_OS}" |
| 36 | OVERRIDES_append = ":${TARGET_OS_ORIG}" |
| 37 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 38 | S = "${WORKDIR}/git" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 39 | |
| 40 | inherit autotools |
| 41 | |
| 42 | BBCLASSEXTEND = "native" |
| 43 | |
| 44 | EXTRA_OECONF = "--disable-selinux --with-pkgversion=${PV}-${PR} \ |
| 45 | --with-bugurl=http://bugzilla.yoctoproject.org/" |
| 46 | |
| 47 | do_configure_prepend () { |
| 48 | # Disable documentation! |
| 49 | echo "all:" > ${S}/doc/Makefile.am |
| 50 | } |
| 51 | |
| 52 | do_install_append () { |
| 53 | install -d ${D}${sysconfdir}/cron.daily ${D}${sysconfdir}/default ${D}${sysconfdir}/rpm |
| 54 | install -m 0644 ${WORKDIR}/prelink.conf ${D}${sysconfdir}/prelink.conf |
| 55 | install -m 0644 ${WORKDIR}/prelink.cron.daily ${D}${sysconfdir}/cron.daily/prelink |
| 56 | install -m 0644 ${WORKDIR}/prelink.default ${D}${sysconfdir}/default/prelink |
| 57 | install -m 0644 ${WORKDIR}/macros.prelink ${D}${sysconfdir}/rpm/macros.prelink |
| 58 | } |
| 59 | |
| 60 | # If we're using image-prelink, we want to skip this on the host side |
| 61 | # but still do it if the package is installed on the target... |
| 62 | pkg_postinst_prelink() { |
| 63 | #!/bin/sh |
| 64 | |
| 65 | if [ "x$D" != "x" ]; then |
| 66 | ${@bb.utils.contains('USER_CLASSES', 'image-prelink', 'exit 0', 'exit 1', d)} |
| 67 | fi |
| 68 | |
| 69 | prelink -a |
| 70 | } |
| 71 | |
| 72 | pkg_prerm_prelink() { |
| 73 | #!/bin/sh |
| 74 | |
| 75 | if [ "x$D" != "x" ]; then |
| 76 | exit 1 |
| 77 | fi |
| 78 | |
| 79 | prelink -au |
| 80 | } |
| 81 | |