Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | SUMMARY = "Various tools relating to the Simple Network Management Protocol" |
| 2 | HOMEPAGE = "http://www.net-snmp.org/" |
| 3 | SECTION = "net" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4 | LICENSE = "BSD-3-Clause & MIT" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 5 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=9d100a395a38584f2ec18a8275261687" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 7 | |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 8 | DEPENDS = "openssl" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 9 | DEPENDS:append:class-target = " pciutils" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 10 | |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 12 | file://init \ |
| 13 | file://snmpd.conf \ |
| 14 | file://snmptrapd.conf \ |
| 15 | file://snmpd.service \ |
| 16 | file://snmptrapd.service \ |
| 17 | file://net-snmp-add-knob-whether-nlist.h-are-checked.patch \ |
| 18 | file://fix-libtool-finish.patch \ |
| 19 | file://net-snmp-testing-add-the-output-format-for-ptest.patch \ |
| 20 | file://run-ptest \ |
| 21 | file://0001-config_os_headers-Error-Fix.patch \ |
| 22 | file://0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch \ |
| 23 | file://0001-get_pid_from_inode-Include-limit.h.patch \ |
| 24 | file://0002-configure-fix-a-cc-check-issue.patch \ |
| 25 | file://0004-configure-fix-incorrect-variable.patch \ |
| 26 | file://net-snmp-5.7.2-fix-engineBoots-value-on-SIGHUP.patch \ |
| 27 | file://net-snmp-fix-for-disable-des.patch \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 28 | file://reproducibility-have-printcap.patch \ |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 29 | file://0001-ac_add_search_path.m4-keep-consistent-between-32bit.patch \ |
William A. Kennington III | 49e9566 | 2021-09-15 16:19:36 -0700 | [diff] [blame] | 30 | file://0001-snmpd-always-exit-after-displaying-usage.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 31 | " |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 32 | SRC_URI[sha256sum] = "eb7fd4a44de6cddbffd9a92a85ad1309e5c1054fb9d5a7dd93079c8953f48c3f" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 33 | |
| 34 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/net-snmp/files/net-snmp/" |
| 35 | UPSTREAM_CHECK_REGEX = "/net-snmp/(?P<pver>\d+(\.\d+)+)/" |
| 36 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 37 | inherit autotools-brokensep update-rc.d siteinfo systemd pkgconfig perlnative ptest multilib_script multilib_header |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 38 | |
| 39 | EXTRA_OEMAKE = "INSTALL_PREFIX=${D} OTHERLDFLAGS='${LDFLAGS}' HOST_CPPFLAGS='${BUILD_CPPFLAGS}'" |
| 40 | |
| 41 | PARALLEL_MAKE = "" |
| 42 | CCACHE = "" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 43 | CLEANBROKEN = "1" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 44 | |
| 45 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 46 | |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 47 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} des smux" |
| 48 | PACKAGECONFIG[des] = "--enable-des, --disable-des" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 49 | PACKAGECONFIG[elfutils] = "--with-elf, --without-elf, elfutils" |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 50 | PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 51 | PACKAGECONFIG[libnl] = "--with-nl, --without-nl, libnl" |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 52 | PACKAGECONFIG[perl] = "--enable-embedded-perl --with-perl-modules=yes, --disable-embedded-perl --with-perl-modules=no, perl" |
Andrew Geissler | eef6386 | 2021-01-29 15:58:13 -0600 | [diff] [blame] | 53 | PACKAGECONFIG[smux] = "" |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 54 | PACKAGECONFIG[systemd] = "--with-systemd, --without-systemd" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 55 | |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 56 | EXTRA_OECONF = " \ |
| 57 | --enable-shared \ |
| 58 | --disable-manuals \ |
| 59 | --with-defaults \ |
| 60 | --with-install-prefix=${D} \ |
| 61 | --with-persistent-directory=${localstatedir}/lib/net-snmp \ |
| 62 | --with-endianness=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \ |
| 63 | --with-mib-modules='${MIB_MODULES}' \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 64 | " |
| 65 | |
Andrew Geissler | eef6386 | 2021-01-29 15:58:13 -0600 | [diff] [blame] | 66 | MIB_MODULES = "" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 67 | MIB_MODULES:append = " ${@bb.utils.filter('PACKAGECONFIG', 'smux', d)}" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 68 | |
| 69 | CACHED_CONFIGUREVARS = " \ |
| 70 | ac_cv_header_valgrind_valgrind_h=no \ |
| 71 | ac_cv_header_valgrind_memcheck_h=no \ |
| 72 | ac_cv_ETC_MNTTAB=/etc/mtab \ |
| 73 | lt_cv_shlibpath_overrides_runpath=yes \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 74 | ac_cv_path_UNAMEPROG=${base_bindir}/uname \ |
| 75 | ac_cv_file__etc_printcap=no \ |
| 76 | NETSNMP_CONFIGURE_OPTIONS= \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 77 | " |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 78 | PERLPROG = "${bindir}/env perl" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 79 | PERLPROG:class-native = "${bindir_native}/env perl" |
| 80 | PERLPROG:append = "${@bb.utils.contains('PACKAGECONFIG', 'perl', ' -I${WORKDIR}', '', d)}" |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 81 | export PERLPROG |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 82 | |
| 83 | HAS_PERL = "${@bb.utils.contains('PACKAGECONFIG', 'perl', '1', '0', d)}" |
| 84 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 85 | PTEST_BUILD_HOST_FILES += "net-snmp-config gen-variables" |
| 86 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 87 | do_configure:prepend() { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 88 | sed -i -e "s|I/usr/include|I${STAGING_INCDIR}|g" \ |
| 89 | "${S}"/configure \ |
| 90 | "${S}"/configure.d/config_os_libs2 |
| 91 | |
| 92 | if [ "${HAS_PERL}" = "1" ]; then |
| 93 | # this may need to be changed when package perl has any change. |
Brad Bishop | 36a3e3e | 2019-10-02 13:29:27 -0400 | [diff] [blame] | 94 | cp -f ${STAGING_DIR_TARGET}/usr/lib*/perl?/*/Config.pm ${WORKDIR}/ |
| 95 | cp -f ${STAGING_DIR_TARGET}/usr/lib*/perl?/*/*/Config_heavy.pl ${WORKDIR}/ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 96 | sed -e "s@libpth => '/usr/lib.*@libpth => '${STAGING_DIR_TARGET}/${libdir} ${STAGING_DIR_TARGET}/${base_libdir}',@g" \ |
| 97 | -e "s@privlibexp => '/usr@privlibexp => '${STAGING_DIR_TARGET}/usr@g" \ |
| 98 | -e "s@scriptdir => '/usr@scriptdir => '${STAGING_DIR_TARGET}/usr@g" \ |
| 99 | -e "s@sitearchexp => '/usr@sitearchexp => '${STAGING_DIR_TARGET}/usr@g" \ |
| 100 | -e "s@sitelibexp => '/usr@sitearchexp => '${STAGING_DIR_TARGET}/usr@g" \ |
| 101 | -e "s@vendorarchexp => '/usr@vendorarchexp => '${STAGING_DIR_TARGET}/usr@g" \ |
| 102 | -e "s@vendorlibexp => '/usr@vendorlibexp => '${STAGING_DIR_TARGET}/usr@g" \ |
| 103 | -i ${WORKDIR}/Config.pm |
| 104 | fi |
| 105 | |
| 106 | } |
| 107 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 108 | do_configure:append() { |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 109 | sed -e "s@^NSC_INCLUDEDIR=.*@NSC_INCLUDEDIR=${STAGING_DIR_TARGET}\$\{includedir\}@g" \ |
| 110 | -e "s@^NSC_LIBDIR=-L.*@NSC_LIBDIR=-L${STAGING_DIR_TARGET}\$\{libdir\}@g" \ |
| 111 | -e "s@^NSC_LDFLAGS=\"-L.* @NSC_LDFLAGS=\"-L${STAGING_DIR_TARGET}\$\{libdir\} @g" \ |
| 112 | -i ${B}/net-snmp-config |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 113 | } |
| 114 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 115 | do_install:append() { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 116 | install -d ${D}${sysconfdir}/snmp |
| 117 | install -d ${D}${sysconfdir}/init.d |
| 118 | install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/snmpd |
| 119 | install -m 644 ${WORKDIR}/snmpd.conf ${D}${sysconfdir}/snmp/ |
| 120 | install -m 644 ${WORKDIR}/snmptrapd.conf ${D}${sysconfdir}/snmp/ |
| 121 | install -d ${D}${systemd_unitdir}/system |
| 122 | install -m 0644 ${WORKDIR}/snmpd.service ${D}${systemd_unitdir}/system |
| 123 | install -m 0644 ${WORKDIR}/snmptrapd.service ${D}${systemd_unitdir}/system |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 124 | sed -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g" \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 125 | -i ${D}${bindir}/net-snmp-create-v3-user |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 126 | sed -e 's@^NSC_SRCDIR=.*@NSC_SRCDIR=.@g' \ |
Andrew Geissler | f103a7f | 2021-05-07 16:09:40 -0500 | [diff] [blame] | 127 | -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 128 | -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 129 | -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 130 | -e 's@[^ ]*--sysroot=[^ "]*@@g' \ |
| 131 | -e 's@[^ ]*--with-libtool-sysroot=[^ "]*@@g' \ |
| 132 | -e 's@[^ ]*--with-install-prefix=[^ "]*@@g' \ |
| 133 | -e 's@[^ ]*PKG_CONFIG_PATH=[^ "]*@@g' \ |
| 134 | -e 's@[^ ]*PKG_CONFIG_LIBDIR=[^ "]*@@g' \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 135 | -i ${D}${bindir}/net-snmp-config |
| 136 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 137 | sed -e 's@[^ ]*-ffile-prefix-map=[^ "]*@@g' \ |
| 138 | -e 's@[^ ]*-fdebug-prefix-map=[^ "]*@@g' \ |
| 139 | -e 's@[^ ]*-fmacro-prefix-map=[^ "]*@@g' \ |
| 140 | -i ${D}${libdir}/pkgconfig/netsnmp*.pc |
| 141 | |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 142 | # ${STAGING_DIR_HOST} is empty for native builds, and the sed command below |
| 143 | # will result in errors if run for native. |
| 144 | if [ "${STAGING_DIR_HOST}" ]; then |
| 145 | sed -e 's@${STAGING_DIR_HOST}@@g' \ |
| 146 | -i ${D}${bindir}/net-snmp-config ${D}${libdir}/pkgconfig/netsnmp*.pc |
| 147 | fi |
Andrew Geissler | ac970dd | 2021-02-12 15:32:45 -0600 | [diff] [blame] | 148 | |
| 149 | sed -e "s@^NSC_INCLUDEDIR=.*@NSC_INCLUDEDIR=\$\{includedir\}@g" \ |
| 150 | -e "s@^NSC_LIBDIR=-L.*@NSC_LIBDIR=-L\$\{libdir\}@g" \ |
| 151 | -e "s@^NSC_LDFLAGS=\"-L.* @NSC_LDFLAGS=\"-L\$\{libdir\} @g" \ |
| 152 | -i ${D}${bindir}/net-snmp-config |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 153 | |
| 154 | oe_multilib_header net-snmp/net-snmp-config.h |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 155 | |
| 156 | if [ "${HAS_PERL}" = "1" ]; then |
| 157 | find ${D}${libdir}/ -type f -name "perllocal.pod" | xargs rm -f |
| 158 | fi |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 159 | } |
| 160 | |
| 161 | do_install_ptest() { |
| 162 | install -d ${D}${PTEST_PATH} |
| 163 | for i in ${S}/dist ${S}/include ${B}/include ${S}/mibs ${S}/configure \ |
| 164 | ${B}/net-snmp-config ${S}/testing; do |
| 165 | if [ -e "$i" ]; then |
| 166 | cp -R --no-dereference --preserve=mode,links -v "$i" ${D}${PTEST_PATH} |
| 167 | fi |
| 168 | done |
| 169 | echo `autoconf -V|awk '/autoconf/{print $NF}'` > ${D}${PTEST_PATH}/dist/autoconf-version |
| 170 | |
| 171 | rmdlist="${D}${PTEST_PATH}/dist/net-snmp-solaris-build" |
| 172 | for i in $rmdlist; do |
| 173 | if [ -d "$i" ]; then |
| 174 | rm -rf "$i" |
| 175 | fi |
| 176 | done |
| 177 | } |
| 178 | |
| 179 | SYSROOT_PREPROCESS_FUNCS += "net_snmp_sysroot_preprocess" |
| 180 | SNMP_DBGDIR = "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}" |
| 181 | |
| 182 | net_snmp_sysroot_preprocess () { |
| 183 | if [ -e ${D}${bindir}/net-snmp-config ]; then |
| 184 | install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ |
| 185 | install -m 755 ${D}${bindir}/net-snmp-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ |
| 186 | sed -e "s@-I/usr/include@-I${STAGING_INCDIR}@g" \ |
| 187 | -e "s@^prefix=.*@prefix=${STAGING_DIR_HOST}${prefix}@g" \ |
| 188 | -e "s@^exec_prefix=.*@exec_prefix=${STAGING_EXECPREFIXDIR}@g" \ |
| 189 | -e "s@^includedir=.*@includedir=${STAGING_INCDIR}@g" \ |
| 190 | -e "s@^libdir=.*@libdir=${STAGING_LIBDIR}@g" \ |
| 191 | -e "s@^NSC_SRCDIR=.*@NSC_SRCDIR=${S}@g" \ |
Andrew Geissler | f103a7f | 2021-05-07 16:09:40 -0500 | [diff] [blame] | 192 | -e "s@-ffile-prefix-map=${SNMP_DBGDIR}@-ffile-prefix-map=${WORKDIR}=${SNMP_DBGDIR}@g" \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 193 | -e "s@-fdebug-prefix-map=${SNMP_DBGDIR}@-fdebug-prefix-map=${WORKDIR}=${SNMP_DBGDIR}@g" \ |
| 194 | -e "s@-fdebug-prefix-map= -fdebug-prefix-map=@-fdebug-prefix-map=${STAGING_DIR_NATIVE}= \ |
| 195 | -fdebug-prefix-map=${STAGING_DIR_HOST}=@g" \ |
| 196 | -e "s@--sysroot=@--sysroot=${STAGING_DIR_HOST}@g" \ |
| 197 | -e "s@--with-libtool-sysroot=@--with-libtool-sysroot=${STAGING_DIR_HOST}@g" \ |
| 198 | -e "s@--with-install-prefix=@--with-install-prefix=${D}@g" \ |
| 199 | -i ${SYSROOT_DESTDIR}${bindir_crossscripts}/net-snmp-config |
| 200 | fi |
| 201 | } |
| 202 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 203 | PACKAGES += "${PN}-libs ${PN}-mibs ${PN}-server ${PN}-client \ |
| 204 | ${PN}-server-snmpd ${PN}-server-snmptrapd \ |
| 205 | ${PN}-lib-netsnmp ${PN}-lib-agent ${PN}-lib-helpers \ |
| 206 | ${PN}-lib-mibs ${PN}-lib-trapd" |
| 207 | |
| 208 | # perl module |
| 209 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'perl', '${PN}-perl-modules', '', d)}" |
| 210 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 211 | ALLOW_EMPTY:${PN} = "1" |
| 212 | ALLOW_EMPTY:${PN}-server = "1" |
| 213 | ALLOW_EMPTY:${PN}-libs = "1" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 214 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 215 | FILES:${PN}-perl-modules = "${libdir}/perl?/*" |
| 216 | RDEPENDS:${PN}-perl-modules = "perl" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 217 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 218 | FILES:${PN}-libs = "" |
| 219 | FILES:${PN}-mibs = "${datadir}/snmp/mibs" |
| 220 | FILES:${PN}-server-snmpd = "${sbindir}/snmpd \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 221 | ${sysconfdir}/snmp/snmpd.conf \ |
| 222 | ${sysconfdir}/init.d \ |
| 223 | ${systemd_unitdir}/system/snmpd.service \ |
| 224 | " |
| 225 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 226 | FILES:${PN}-server-snmptrapd = "${sbindir}/snmptrapd \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 227 | ${sysconfdir}/snmp/snmptrapd.conf \ |
| 228 | ${systemd_unitdir}/system/snmptrapd.service \ |
| 229 | " |
| 230 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 231 | FILES:${PN}-lib-netsnmp = "${libdir}/libnetsnmp${SOLIBS}" |
| 232 | FILES:${PN}-lib-agent = "${libdir}/libnetsnmpagent${SOLIBS}" |
| 233 | FILES:${PN}-lib-helpers = "${libdir}/libnetsnmphelpers${SOLIBS}" |
| 234 | FILES:${PN}-lib-mibs = "${libdir}/libnetsnmpmibs${SOLIBS}" |
| 235 | FILES:${PN}-lib-trapd = "${libdir}/libnetsnmptrapd${SOLIBS}" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 236 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 237 | FILES:${PN} = "" |
| 238 | FILES:${PN}-client = "${bindir}/* ${datadir}/snmp/" |
| 239 | FILES:${PN}-dbg += "${libdir}/.debug/ ${sbindir}/.debug/ ${bindir}/.debug/" |
| 240 | FILES:${PN}-dev += "${bindir}/mib2c \ |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 241 | ${bindir}/mib2c-update \ |
| 242 | ${bindir}/net-snmp-config \ |
| 243 | ${bindir}/net-snmp-create-v3-user \ |
| 244 | " |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 245 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 246 | CONFFILES:${PN}-server-snmpd = "${sysconfdir}/snmp/snmpd.conf" |
| 247 | CONFFILES:${PN}-server-snmptrapd = "${sysconfdir}/snmp/snmptrapd.conf" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 248 | |
| 249 | INITSCRIPT_PACKAGES = "${PN}-server-snmpd" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 250 | INITSCRIPT_NAME:${PN}-server-snmpd = "snmpd" |
| 251 | INITSCRIPT_PARAMS:${PN}-server-snmpd = "start 90 2 3 4 5 . stop 60 0 1 6 ." |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 252 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 253 | SYSTEMD_PACKAGES = "${PN}-server-snmpd \ |
| 254 | ${PN}-server-snmptrapd" |
| 255 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 256 | SYSTEMD_SERVICE:${PN}-server-snmpd = "snmpd.service" |
| 257 | SYSTEMD_SERVICE:${PN}-server-snmptrapd = "snmptrapd.service" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 258 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 259 | RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'net-snmp-perl-modules', '', d)}" |
| 260 | RDEPENDS:${PN} += "net-snmp-client" |
| 261 | RDEPENDS:${PN}-server-snmpd += "net-snmp-mibs" |
| 262 | RDEPENDS:${PN}-server-snmptrapd += "net-snmp-server-snmpd ${PN}-lib-trapd" |
| 263 | RDEPENDS:${PN}-server += "net-snmp-server-snmpd net-snmp-server-snmptrapd" |
| 264 | RDEPENDS:${PN}-client += "net-snmp-mibs net-snmp-libs" |
| 265 | RDEPENDS:${PN}-libs += "libpci \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 266 | ${PN}-lib-netsnmp \ |
| 267 | ${PN}-lib-agent \ |
| 268 | ${PN}-lib-helpers \ |
| 269 | ${PN}-lib-mibs \ |
| 270 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 271 | RDEPENDS:${PN}-ptest += "perl \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 272 | perl-module-test \ |
| 273 | perl-module-file-basename \ |
| 274 | perl-module-getopt-long \ |
| 275 | perl-module-file-temp \ |
| 276 | perl-module-data-dumper \ |
| 277 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 278 | RDEPENDS:${PN}-dev = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})" |
| 279 | RRECOMMENDS:${PN}-dbg = "net-snmp-client (= ${EXTENDPKGV}) net-snmp-server (= ${EXTENDPKGV})" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 280 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 281 | RPROVIDES:${PN}-server-snmpd += "${PN}-server-snmpd-systemd" |
| 282 | RREPLACES:${PN}-server-snmpd += "${PN}-server-snmpd-systemd" |
| 283 | RCONFLICTS:${PN}-server-snmpd += "${PN}-server-snmpd-systemd" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 284 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 285 | RPROVIDES:${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd" |
| 286 | RREPLACES:${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd" |
| 287 | RCONFLICTS:${PN}-server-snmptrapd += "${PN}-server-snmptrapd-systemd" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 288 | |
| 289 | LEAD_SONAME = "libnetsnmp.so" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 290 | |
| 291 | MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/net-snmp-config" |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 292 | |
| 293 | BBCLASSEXTEND = "native" |