diff options
author | Alexandre Fournier <alexandre.fournier@kiplink.fr> | 2014-05-22 14:36:47 +0200 |
---|---|---|
committer | Joe MacDonald <joe@deserted.net> | 2014-06-03 21:18:51 -0400 |
commit | c4ba56ceebdd0d42f90e2ec509440f105645c376 (patch) | |
tree | eacd55b69b54eb859404d0bf60ee201393c59c2f /meta-networking | |
parent | 9d49c83415d5233ac17d68d21fb5fd6a91085593 (diff) | |
download | meta-openembedded-c4ba56ceebdd0d42f90e2ec509440f105645c376.tar.gz |
net-snmp: install net-snmp-config script to STAGING_BINDIR_CROSS
This recipe was installing net-snmp-config script to STAGING_BINDIR
instead of STAGING_BINDIR_CROSS, during the do_install. It is not
recommended and must be done after staging.
Changes:
* Remove STAGING_BINDIR manipulations from do_install_append
* Add net_snmp_sysroot_preprocess function instead
* Append net_snmp_sysroot_preprocess to SYSROOT_PREPROCESS_FUNCS
Signed-off-by: Alexandre Fournier <alexandre.fournier@kiplink.fr>
Signed-off-by: Joe MacDonald <joe@deserted.net>
Diffstat (limited to 'meta-networking')
-rw-r--r-- | meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.bb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.bb index eb50d0fd44..f1e3a5d349 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.bb +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.bb | |||
@@ -49,19 +49,26 @@ do_install_append() { | |||
49 | install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/snmpd | 49 | install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/snmpd |
50 | install -m 644 ${WORKDIR}/snmpd.conf ${D}${sysconfdir}/snmp/ | 50 | install -m 644 ${WORKDIR}/snmpd.conf ${D}${sysconfdir}/snmp/ |
51 | install -m 644 ${WORKDIR}/snmptrapd.conf ${D}${sysconfdir}/snmp/ | 51 | install -m 644 ${WORKDIR}/snmptrapd.conf ${D}${sysconfdir}/snmp/ |
52 | install -d ${STAGING_BINDIR} | ||
53 | install -m 0755 ${D}${bindir}/net-snmp-config ${STAGING_BINDIR}/ | ||
54 | sed -e "s@-I/usr/include@@g" \ | 52 | sed -e "s@-I/usr/include@@g" \ |
55 | -e "s@^prefix=.*@prefix=${STAGING_DIR_HOST}@g" \ | 53 | -e "s@^prefix=.*@prefix=${STAGING_DIR_HOST}@g" \ |
56 | -e "s@^exec_prefix=.*@exec_prefix=${STAGING_DIR_HOST}@g" \ | 54 | -e "s@^exec_prefix=.*@exec_prefix=${STAGING_DIR_HOST}@g" \ |
57 | -e "s@^includedir=.*@includedir=${STAGING_INCDIR}@g" \ | 55 | -e "s@^includedir=.*@includedir=${STAGING_INCDIR}@g" \ |
58 | -e "s@^libdir=.*@libdir=${STAGING_LIBDIR}@g" \ | 56 | -e "s@^libdir=.*@libdir=${STAGING_LIBDIR}@g" \ |
59 | -i ${STAGING_BINDIR}/net-snmp-config | 57 | -i ${D}${bindir}/net-snmp-config |
60 | install -d ${D}${systemd_unitdir}/system | 58 | install -d ${D}${systemd_unitdir}/system |
61 | install -m 0644 ${WORKDIR}/snmpd.service ${D}${systemd_unitdir}/system | 59 | install -m 0644 ${WORKDIR}/snmpd.service ${D}${systemd_unitdir}/system |
62 | install -m 0644 ${WORKDIR}/snmptrapd.service ${D}${systemd_unitdir}/system | 60 | install -m 0644 ${WORKDIR}/snmptrapd.service ${D}${systemd_unitdir}/system |
63 | } | 61 | } |
64 | 62 | ||
63 | SYSROOT_PREPROCESS_FUNCS += "net_snmp_sysroot_preprocess" | ||
64 | |||
65 | net_snmp_sysroot_preprocess () { | ||
66 | if [ -e ${D}${bindir}/net-snmp-config ]; then | ||
67 | install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
68 | install -m 755 ${D}${bindir}/net-snmp-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ | ||
69 | fi | ||
70 | } | ||
71 | |||
65 | PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-dev ${PN}-staticdev ${PN}-static ${PN}-libs \ | 72 | PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-dev ${PN}-staticdev ${PN}-static ${PN}-libs \ |
66 | ${PN}-mibs ${PN}-server ${PN}-client ${PN}-server-snmpd ${PN}-server-snmptrapd" | 73 | ${PN}-mibs ${PN}-server ${PN}-client ${PN}-server-snmpd ${PN}-server-snmptrapd" |
67 | 74 | ||