blob: 79a5f501102d259d05ffc8596d2af862daba8ea7 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SECTION = "devel"
2# Need binutils for libiberty.a
3# Would need transfig-native for documentation if it wasn't disabled
4DEPENDS = "elfutils binutils"
5SUMMARY = "An ELF prelinking utility"
6DESCRIPTION = "The prelink package contains a utility which modifies ELF shared libraries \
7and executables, so that far fewer relocations need to be resolved at \
8runtime and thus programs come up faster."
9LICENSE = "GPLv2"
10LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
Patrick Williamsd7e96312015-09-22 08:09:05 -050011SRCREV = "cdee5a4dd226cc5e9f30f370067a9031f398ef3c"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012PV = "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#
21SUMMARY_${PN}-cron = "Cron scripts to control automatic prelinking"
22DESCRIPTION_${PN}-cron = "Cron scripts to control automatic prelinking. \
23See: ${sysconfdir}/cron.daily/prelink for configuration information."
24
25FILES_${PN}-cron = "${sysconfdir}/cron.daily ${sysconfdir}/default"
26
27PACKAGES =+ "${PN}-cron"
28
29SRC_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
35TARGET_OS_ORIG := "${TARGET_OS}"
36OVERRIDES_append = ":${TARGET_OS_ORIG}"
37
38S = "${WORKDIR}/git/trunk"
39
40inherit autotools
41
42BBCLASSEXTEND = "native"
43
44EXTRA_OECONF = "--disable-selinux --with-pkgversion=${PV}-${PR} \
45 --with-bugurl=http://bugzilla.yoctoproject.org/"
46
47do_configure_prepend () {
48 # Disable documentation!
49 echo "all:" > ${S}/doc/Makefile.am
50}
51
52do_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...
62pkg_postinst_prelink() {
63#!/bin/sh
64
65if [ "x$D" != "x" ]; then
66 ${@bb.utils.contains('USER_CLASSES', 'image-prelink', 'exit 0', 'exit 1', d)}
67fi
68
69prelink -a
70}
71
72pkg_prerm_prelink() {
73#!/bin/sh
74
75if [ "x$D" != "x" ]; then
76 exit 1
77fi
78
79prelink -au
80}
81