diff options
Diffstat (limited to 'meta-oe/recipes-extended/net-snmp/net-snmp.inc')
-rw-r--r-- | meta-oe/recipes-extended/net-snmp/net-snmp.inc | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/meta-oe/recipes-extended/net-snmp/net-snmp.inc b/meta-oe/recipes-extended/net-snmp/net-snmp.inc deleted file mode 100644 index 5a6ec9f16..000000000 --- a/meta-oe/recipes-extended/net-snmp/net-snmp.inc +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | DESCRIPTION = "Various tools relating to the Simple Network Management Protocol" | ||
2 | HOMEPAGE = "http://www.net-snmp.org/" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | DEPENDS = "openssl libnl pciutils" | ||
6 | RDEPENDS_${PN}-server-snmpd += "net-snmp-mibs" | ||
7 | RDEPENDS_${PN}-server-snmptrapd += "net-snmp-server-snmpd" | ||
8 | RDEPENDS_${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd" | ||
9 | RDEPENDS_${PN}-client += "net-snmp-mibs" | ||
10 | RDEPENDS_${PN}-dev = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})" | ||
11 | RRECOMMENDS_${PN}-dbg = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})" | ||
12 | INC_PR = "r6" | ||
13 | |||
14 | inherit autotools update-rc.d siteinfo systemd | ||
15 | |||
16 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
17 | |||
18 | EXTRA_OECONF = "--enable-shared --disable-manuals --with-defaults \ | ||
19 | ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}" | ||
20 | |||
21 | do_install () { | ||
22 | oe_runmake install | ||
23 | } | ||
24 | |||
25 | do_install_append() { | ||
26 | install -d ${D}${sysconfdir}/snmp | ||
27 | install -d ${D}${sysconfdir}/init.d | ||
28 | install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/snmpd | ||
29 | install -m 644 ${WORKDIR}/snmpd.conf ${D}${sysconfdir}/snmp/ | ||
30 | install -m 644 ${WORKDIR}/snmptrapd.conf ${D}${sysconfdir}/snmp/ | ||
31 | install -d ${STAGING_BINDIR} | ||
32 | install -m 0755 ${D}${bindir}/net-snmp-config ${STAGING_BINDIR}/ | ||
33 | sed -e "s@-I/usr/include@@g" \ | ||
34 | -e "s@^prefix=.*@prefix=${STAGING_DIR_HOST}@g" \ | ||
35 | -e "s@^exec_prefix=.*@exec_prefix=${STAGING_DIR_HOST}@g" \ | ||
36 | -e "s@^includedir=.*@includedir=${STAGING_INCDIR}@g" \ | ||
37 | -e "s@^libdir=.*@libdir=${STAGING_LIBDIR}@g" \ | ||
38 | -i ${STAGING_BINDIR}/net-snmp-config | ||
39 | install -d ${D}${systemd_unitdir}/system | ||
40 | install -m 0644 ${WORKDIR}/snmpd.service ${D}${systemd_unitdir}/system | ||
41 | install -m 0644 ${WORKDIR}/snmptrapd.service ${D}${systemd_unitdir}/system | ||
42 | } | ||
43 | |||
44 | PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-dev ${PN}-staticdev ${PN}-static ${PN}-libs \ | ||
45 | ${PN}-mibs ${PN}-server ${PN}-client ${PN}-server-snmpd ${PN}-server-snmptrapd" | ||
46 | |||
47 | ALLOW_EMPTY_${PN}-server = "1" | ||
48 | FILES_${PN}-libs = "${libdir}/lib*${SOLIBS}" | ||
49 | FILES_${PN}-mibs = "${datadir}/snmp/mibs" | ||
50 | FILES_${PN}-server-snmpd = "${sbindir}/snmpd \ | ||
51 | ${sysconfdir}/snmp/snmpd.conf \ | ||
52 | ${sysconfdir}/init.d \ | ||
53 | ${systemd_unitdir}/system/snmpd.service \ | ||
54 | " | ||
55 | FILES_${PN}-server-snmptrapd = "${sbindir}/snmptrapd \ | ||
56 | ${sysconfdir}/snmp/snmptrapd.conf \ | ||
57 | ${systemd_unitdir}/system/snmptrapd.service \ | ||
58 | " | ||
59 | FILES_${PN}-client = "${bindir}/* ${datadir}/snmp/" | ||
60 | FILES_${PN}-dbg += "${libdir}/.debug/ ${sbindir}/.debug/ ${bindir}/.debug/" | ||
61 | FILES_${PN}-dev += "${bindir}/net-snmp-config ${bindir}/mib2c ${bindir}/mib2c-update" | ||
62 | |||
63 | CONFFILES_${PN}-server-snmpd = "${sysconfdir}/snmp/snmpd.conf" | ||
64 | CONFFILES_${PN}-server-snmptrapd = "${sysconfdir}/snmp/snmptrapd.conf" | ||
65 | |||
66 | INITSCRIPT_PACKAGES = "${PN}-server" | ||
67 | INITSCRIPT_NAME_${PN}-server = "snmpd" | ||
68 | INITSCRIPT_PARAMS_${PN}-server = "defaults" | ||
69 | |||
70 | EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemd', '--without-systemd', d)}" | ||
71 | |||
72 | SYSTEMD_PACKAGES = "${PN}-server-snmpd-systemd \ | ||
73 | ${PN}-server-snmptrapd-systemd" | ||
74 | |||
75 | SYSTEMD_SERVICE_${PN}-server-snmpd = "snmpd.service" | ||
76 | SYSTEMD_SERVICE_${PN}-server-snmptrapd = "snmptrapd.service" | ||
77 | |||
78 | RPROVIDES_${PN}-server-snmpd += "${PN}-server-snmpd-systemd" | ||
79 | RREPLACES_${PN}-server-snmpd += "${PN}-server-snmpd-systemd" | ||
80 | RCONFLICTS_${PN}-server-snmpd += "${PN}-server-snmpd-systemd" | ||
81 | |||
82 | RPROVIDES_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd" | ||
83 | RREPLACES_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd" | ||
84 | RCONFLICTS_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd" | ||
85 | |||
86 | LEAD_SONAME = "libnetsnmp.so" | ||
87 | |||
88 | pkg_postrm_${PN}-server() { | ||
89 | if test "x$D" != "x"; then | ||
90 | OPT="-r $D " | ||
91 | else | ||
92 | OPT="" | ||
93 | /etc/init.d/snmpd stop | ||
94 | fi | ||
95 | } | ||