summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/net-snmp/net-snmp.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/net-snmp/net-snmp.inc')
-rw-r--r--meta-oe/recipes-extended/net-snmp/net-snmp.inc95
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 @@
1DESCRIPTION = "Various tools relating to the Simple Network Management Protocol"
2HOMEPAGE = "http://www.net-snmp.org/"
3LICENSE = "BSD"
4
5DEPENDS = "openssl libnl pciutils"
6RDEPENDS_${PN}-server-snmpd += "net-snmp-mibs"
7RDEPENDS_${PN}-server-snmptrapd += "net-snmp-server-snmpd"
8RDEPENDS_${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd"
9RDEPENDS_${PN}-client += "net-snmp-mibs"
10RDEPENDS_${PN}-dev = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})"
11RRECOMMENDS_${PN}-dbg = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})"
12INC_PR = "r6"
13
14inherit autotools update-rc.d siteinfo systemd
15
16TARGET_CC_ARCH += "${LDFLAGS}"
17
18EXTRA_OECONF = "--enable-shared --disable-manuals --with-defaults \
19${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}"
20
21do_install () {
22 oe_runmake install
23}
24
25do_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
44PACKAGES = "${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
47ALLOW_EMPTY_${PN}-server = "1"
48FILES_${PN}-libs = "${libdir}/lib*${SOLIBS}"
49FILES_${PN}-mibs = "${datadir}/snmp/mibs"
50FILES_${PN}-server-snmpd = "${sbindir}/snmpd \
51 ${sysconfdir}/snmp/snmpd.conf \
52 ${sysconfdir}/init.d \
53 ${systemd_unitdir}/system/snmpd.service \
54"
55FILES_${PN}-server-snmptrapd = "${sbindir}/snmptrapd \
56 ${sysconfdir}/snmp/snmptrapd.conf \
57 ${systemd_unitdir}/system/snmptrapd.service \
58"
59FILES_${PN}-client = "${bindir}/* ${datadir}/snmp/"
60FILES_${PN}-dbg += "${libdir}/.debug/ ${sbindir}/.debug/ ${bindir}/.debug/"
61FILES_${PN}-dev += "${bindir}/net-snmp-config ${bindir}/mib2c ${bindir}/mib2c-update"
62
63CONFFILES_${PN}-server-snmpd = "${sysconfdir}/snmp/snmpd.conf"
64CONFFILES_${PN}-server-snmptrapd = "${sysconfdir}/snmp/snmptrapd.conf"
65
66INITSCRIPT_PACKAGES = "${PN}-server"
67INITSCRIPT_NAME_${PN}-server = "snmpd"
68INITSCRIPT_PARAMS_${PN}-server = "defaults"
69
70EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemd', '--without-systemd', d)}"
71
72SYSTEMD_PACKAGES = "${PN}-server-snmpd-systemd \
73 ${PN}-server-snmptrapd-systemd"
74
75SYSTEMD_SERVICE_${PN}-server-snmpd = "snmpd.service"
76SYSTEMD_SERVICE_${PN}-server-snmptrapd = "snmptrapd.service"
77
78RPROVIDES_${PN}-server-snmpd += "${PN}-server-snmpd-systemd"
79RREPLACES_${PN}-server-snmpd += "${PN}-server-snmpd-systemd"
80RCONFLICTS_${PN}-server-snmpd += "${PN}-server-snmpd-systemd"
81
82RPROVIDES_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd"
83RREPLACES_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd"
84RCONFLICTS_${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd"
85
86LEAD_SONAME = "libnetsnmp.so"
87
88pkg_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}