]> git.pld-linux.org Git - packages/net-snmp.git/blobdiff - net-snmp.spec
- updated to 5.9 (new sonames)
[packages/net-snmp.git] / net-snmp.spec
index ff13f58fb301dd46d31e810bf3289a8096073cf4..c4a2e90370f1f16ee6a1bbdaf531c49a64d7434f 100644 (file)
@@ -1,23 +1,21 @@
 # TODO
 # - make noarch -n mibs-net-snmp package (need separate .spec then)
 # - FHS: #define NETSNMP_AGENTX_SOCKET "/var/agentx/master"
 # TODO
 # - make noarch -n mibs-net-snmp package (need separate .spec then)
 # - FHS: #define NETSNMP_AGENTX_SOCKET "/var/agentx/master"
-# - php-snmp (and likely other bindings) use only %{_libdir}/libnetsnmp.so.*, move other libs back to main (daemon) package?
 #
 # Conditional build:
 #
 # Conditional build:
-%bcond_without autodeps        # don't BR packages only for deps resolving
-%bcond_without rpm             # don't include RPM support
-%bcond_without kerberos5       # don't include kerberos support
-%bcond_without lm_sensors      # don't include sensors support
-%bcond_without perl            # don't include Perl modules and utils
-%bcond_without python          # don't include Python modules
-%bcond_without static_libs     # don't build static library
-
-%ifnarch %{ix86} %{x8664}
+%bcond_without rpm             # RPM support
+%bcond_without kerberos5       # Kerberos support
+%bcond_without lm_sensors      # LM sensors support
+%bcond_without perl            # Perl modules and utils
+%bcond_without python          # Python (3.x) modules
+%bcond_without python2         # Python 2.x modules
+%bcond_without static_libs     # static library
+
+%ifnarch %{ix86} %{x8664} x32
 %undefine      with_lm_sensors
 %endif
 
 %undefine      with_lm_sensors
 %endif
 
-%define                so_version      30
-%include       /usr/lib/rpm/macros.perl
+%define                so_version      40
 Summary:       A collection of SNMP protocol tools
 Summary(es.UTF-8):     Agente SNMP de la UCD
 Summary(pl.UTF-8):     Kolekcja narzędzi do obsługi protokołu SNMP
 Summary:       A collection of SNMP protocol tools
 Summary(es.UTF-8):     Agente SNMP de la UCD
 Summary(pl.UTF-8):     Kolekcja narzędzi do obsługi protokołu SNMP
@@ -25,12 +23,12 @@ Summary(pt_BR.UTF-8):       Agente SNMP da UCD
 Summary(ru.UTF-8):     Набор утилит для протокола SNMP от UC-Davis
 Summary(uk.UTF-8):     Набір утиліт для протоколу SNMP від UC-Davis
 Name:          net-snmp
 Summary(ru.UTF-8):     Набор утилит для протокола SNMP от UC-Davis
 Summary(uk.UTF-8):     Набір утиліт для протоколу SNMP від UC-Davis
 Name:          net-snmp
-Version:       5.7
-Release:       3
+Version:       5.9
+Release:       1
 License:       BSD-like
 Group:         Networking/Daemons
 Source0:       http://downloads.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz
 License:       BSD-like
 Group:         Networking/Daemons
 Source0:       http://downloads.sourceforge.net/net-snmp/%{name}-%{version}.tar.gz
-# Source0-md5: 1038e960d6d616c64c0979180daf0e19
+# Source0-md5: 382da80138897f294299badf9c62c699
 Source1:       %{name}d.init
 Source2:       %{name}d.conf
 Source3:       %{name}d.sysconfig
 Source1:       %{name}d.init
 Source2:       %{name}d.conf
 Source3:       %{name}d.sysconfig
@@ -39,41 +37,48 @@ Source5:    %{name}trapd.conf
 Source6:       %{name}trapd.sysconfig
 Source7:       ucd-ipchains.tar.gz
 # Source7-md5: 29949f1008f1a04d6efefd5b3ea607da
 Source6:       %{name}trapd.sysconfig
 Source7:       ucd-ipchains.tar.gz
 # Source7-md5: 29949f1008f1a04d6efefd5b3ea607da
-Source8:       snmpd.upstart
+Source9:       snmpd.logrotate
 Patch0:                %{name}-acfix.patch
 Patch1:                %{name}-rpm-implicit-libs.patch
 Patch2:                %{name}-config-noflags.patch
 Patch3:                %{name}-manpage.patch
 Patch4:                %{name}-link.patch
 Patch0:                %{name}-acfix.patch
 Patch1:                %{name}-rpm-implicit-libs.patch
 Patch2:                %{name}-config-noflags.patch
 Patch3:                %{name}-manpage.patch
 Patch4:                %{name}-link.patch
-Patch5:                %{name}-llinterfaces.patch
 Patch6:                %{name}-kernel_headers.patch
 Patch7:                %{name}-rpmpath.patch
 Patch6:                %{name}-kernel_headers.patch
 Patch7:                %{name}-rpmpath.patch
-Patch8:                %{name}-snmpksm.patch
-Patch9:                %{name}-python.patch
-Patch10:       %{name}-lvalue.patch
-Patch11:       %{name}-defaultconfig.patch
-Patch12:       %{name}-use-rpm-hrmib.patch
-Patch13:       %{name}-TCP_STATS_CACHE_TIMEOUT.patch
-Patch14:       %{name}-libnl.patch
-Patch15:       %{name}-libpci-init.patch
+Patch8:                %{name}-python.patch
+Patch9:                %{name}-lvalue.patch
+Patch10:       %{name}-defaultconfig.patch
+Patch11:       %{name}-use-rpm-hrmib.patch
+Patch12:       %{name}-TCP_STATS_CACHE_TIMEOUT.patch
+Patch13:       %{name}-logging.patch
+Patch14:       %{name}-Remove-U64-typedef.patch
+Patch15:       1314610.patch
 URL:           http://www.net-snmp.org/
 BuildRequires: autoconf >= 2.63
 BuildRequires: automake
 BuildRequires: elfutils-devel
 %{?with_kerberos5:BuildRequires:       heimdal-devel}
 URL:           http://www.net-snmp.org/
 BuildRequires: autoconf >= 2.63
 BuildRequires: automake
 BuildRequires: elfutils-devel
 %{?with_kerberos5:BuildRequires:       heimdal-devel}
-BuildRequires: libnl-devel >= 1:3.0
+BuildRequires: libnl-devel >= 1:3.2
+BuildRequires: libpcap-devel
 BuildRequires: libssh2-devel
 BuildRequires: libtool >= 1.4
 BuildRequires: libwrap-devel
 %{?with_lm_sensors:BuildRequires:      lm_sensors-devel >= 3.0.1}
 BuildRequires: libssh2-devel
 BuildRequires: libtool >= 1.4
 BuildRequires: libwrap-devel
 %{?with_lm_sensors:BuildRequires:      lm_sensors-devel >= 3.0.1}
+BuildRequires: ncurses-devel
 BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: pciutils-devel
 BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: pciutils-devel
-%{?with_autodeps:BuildRequires:        perl-Term-ReadKey}
+BuildRequires: pcre-devel
 BuildRequires: perl-devel >= 1:5.8.0
 BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: pkgconfig >= 1:0.9.0
 %if %{with python}
 %if %{with python}
-BuildRequires: python-devel
-BuildRequires: python-modules
+%if %{with python2}
+BuildRequires: python-devel >= 1:2.5
+BuildRequires: python-modules >= 1:2.5
 BuildRequires: python-setuptools
 BuildRequires: python-setuptools
+%endif
+BuildRequires: python3-devel >= 1:3.2
+BuildRequires: python3-modules >= 1:3.2
+BuildRequires: python3-setuptools
 BuildRequires: rpm-pythonprov
 %endif
 %if %{with rpm}
 BuildRequires: rpm-pythonprov
 %endif
 %if %{with rpm}
@@ -82,15 +87,16 @@ BuildRequires:      rpm-perlprov >= 3.0.3-16
 %endif
 BuildRequires: rpmbuild(macros) >= 1.527
 Requires(post,preun):  /sbin/chkconfig
 %endif
 BuildRequires: rpmbuild(macros) >= 1.527
 Requires(post,preun):  /sbin/chkconfig
+Requires:      %{name}-agent-libs = %{version}-%{release}
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      /usr/bin/setsid
 Requires:      mibs-%{name} = %{version}-%{release}
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      /usr/bin/setsid
 Requires:      mibs-%{name} = %{version}-%{release}
-Requires:      pciutils >= 3.1.7-5
 Requires:      rc-scripts >= 0.4.3.0
 Provides:      snmpd
 Obsoletes:     cmu-snmp
 Obsoletes:     snmpd
 Obsoletes:     ucd-snmp
 Requires:      rc-scripts >= 0.4.3.0
 Provides:      snmpd
 Obsoletes:     cmu-snmp
 Obsoletes:     snmpd
 Obsoletes:     ucd-snmp
+Conflicts:     pciutils < 3.1.7-5
 Conflicts:     rpm < 4.4.9-43.11
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 Conflicts:     rpm < 4.4.9-43.11
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -158,21 +164,36 @@ NET SNMP libraries.
 %description libs -l pl.UTF-8
 Biblioteki SNMP.
 
 %description libs -l pl.UTF-8
 Biblioteki SNMP.
 
+%package agent-libs
+Summary:       The NET-SNMP runtime agent libraries
+Summary(pl.UTF-8):     Biblioteki uruchomieniowe agenta NET-SNMP
+Group:         Libraries
+Requires:      %{name}-libs = %{version}-%{release}
+
+%description agent-libs
+The net-snmp-agent-libs package contains the runtime agent libraries
+for shared binaries and applications.
+
+%description agent-libs -l pl.UTF-8
+Ten pakiet zawiera biblioteki uruchomieniowe agenta SNMP.
+
 %package devel
 Summary:       The development environment for the net-snmp project
 Summary(es.UTF-8):     Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD
 Summary(pl.UTF-8):     Pliki dla programistów używających bibliotek net-snmp
 Summary(pt_BR.UTF-8):  Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD
 %package devel
 Summary:       The development environment for the net-snmp project
 Summary(es.UTF-8):     Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD
 Summary(pl.UTF-8):     Pliki dla programistów używających bibliotek net-snmp
 Summary(pt_BR.UTF-8):  Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD
-Summary(ru.UTF-8):     Среда разработки для проекта UCD-SNMP
-Summary(uk.UTF-8):     Середовище розробки для проекту UCD-SNMP
+Summary(ru.UTF-8):     Среда разработки для проекта NET-SNMP
+Summary(uk.UTF-8):     Середовище розробки для проекту NET-SNMP
 Group:         Development/Libraries
 Group:         Development/Libraries
+Requires:      %{name}-agent-libs = %{version}-%{release}
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      elfutils-devel
 %{?with_kerberos5:Requires:    heimdal-devel}
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      elfutils-devel
 %{?with_kerberos5:Requires:    heimdal-devel}
-Requires:      libnl-devel >= 1:1.1
+Requires:      libnl-devel >= 1:3.2
 Requires:      libwrap-devel
 %{?with_lm_sensors:Requires:   lm_sensors-devel >= 3.0.1}
 Requires:      openssl-devel >= 0.9.7c
 Requires:      libwrap-devel
 %{?with_lm_sensors:Requires:   lm_sensors-devel >= 3.0.1}
 Requires:      openssl-devel >= 0.9.7c
+Requires:      pciutils-devel
 Obsoletes:     ucd-snmp-devel
 
 %description devel
 Obsoletes:     ucd-snmp-devel
 
 %description devel
@@ -222,12 +243,12 @@ Statyczne biblioteki net-snmp.
 Bibliotecas estáticas para desenvolvimento com net-snmp.
 
 %package compat-devel
 Bibliotecas estáticas para desenvolvimento com net-snmp.
 
 %package compat-devel
-Summary:       The development environment for the UCD-SNMP project
+Summary:       The development environment for the NET-SNMP project
 Summary(es.UTF-8):     Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD
 Summary(es.UTF-8):     Archivos de inclusión y bibliotecas para desarrollo en el SNMP de la UCD
-Summary(pl.UTF-8):     Pliki dla programistów używających bibliotek UCD-SNMP
+Summary(pl.UTF-8):     Pliki dla programistów używających bibliotek NET-SNMP
 Summary(pt_BR.UTF-8):  Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD
 Summary(pt_BR.UTF-8):  Arquivos de inclusão e bibliotecas para desenvolvimento no SNMP da UCD
-Summary(ru.UTF-8):     Среда разработки для проекта UCD-SNMP
-Summary(uk.UTF-8):     Середовище розробки для проекту UCD-SNMP
+Summary(ru.UTF-8):     Среда разработки для проекта NET-SNMP
+Summary(uk.UTF-8):     Середовище розробки для проекту NET-SNMP
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 Requires:      openssl-devel >= 0.9.7d
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 Requires:      openssl-devel >= 0.9.7d
@@ -236,7 +257,7 @@ Obsoletes:  ucd-snmp-devel
 
 %description compat-devel
 The ucd-snmp-devel package contains the development libraries and
 
 %description compat-devel
 The ucd-snmp-devel package contains the development libraries and
-header files for use with the UCD-SNMP project's network management
+header files for use with the NET-SNMP project's network management
 tools.
 
 %description compat-devel -l es.UTF-8
 tools.
 
 %description compat-devel -l es.UTF-8
@@ -255,27 +276,27 @@ para uso no gerenciamento de redes.
 
 %description compat-devel -l ru.UTF-8
 Пакет ucd-snmp-devel содержит библиотеки разработчика и хедера для
 
 %description compat-devel -l ru.UTF-8
 Пакет ucd-snmp-devel содержит библиотеки разработчика и хедера для
-использования с утилитами управления сетью проекта UCD-SNMP.
+использования с утилитами управления сетью проекта NET-SNMP.
 
 %description compat-devel -l uk.UTF-8
 Пакет ucd-snmp-devel містить бібліотеки програміста та хедери для
 
 %description compat-devel -l uk.UTF-8
 Пакет ucd-snmp-devel містить бібліотеки програміста та хедери для
-використання з утилітами керування мережею проекту UCD-SNMP.
+використання з утилітами керування мережею проекту NET-SNMP.
 
 %package compat-static
 
 %package compat-static
-Summary:       Static UCD-SNMP libraries
-Summary(pl.UTF-8):     Statyczne biblioteki UCD-SNMP
+Summary:       Static NET-SNMP libraries
+Summary(pl.UTF-8):     Statyczne biblioteki NET-SNMP
 Summary(pt_BR.UTF-8):  Bibliotecas estáticas para desenvolvimento com ucd-snmp
 Summary(pt_BR.UTF-8):  Bibliotecas estáticas para desenvolvimento com ucd-snmp
-Summary(ru.UTF-8):     Статические библиотеки для проекта UCD-SNMP
-Summary(uk.UTF-8):     Статичні бібліотеки для проекту UCD-SNMP
+Summary(ru.UTF-8):     Статические библиотеки для проекта NET-SNMP
+Summary(uk.UTF-8):     Статичні бібліотеки для проекту NET-SNMP
 Group:         Development/Libraries
 Requires:      %{name}-compat-devel = %{version}-%{release}
 Obsoletes:     ucd-snmp-static
 
 %description compat-static
 Group:         Development/Libraries
 Requires:      %{name}-compat-devel = %{version}-%{release}
 Obsoletes:     ucd-snmp-static
 
 %description compat-static
-Static UCD-SNMP libraries.
+Static NET-SNMP libraries.
 
 %description compat-static -l pl.UTF-8
 
 %description compat-static -l pl.UTF-8
-Statyczne biblioteki UCD-SNMP.
+Statyczne biblioteki NET-SNMP.
 
 %description compat-static -l pt_BR.UTF-8
 Bibliotecas estáticas para desenvolvimento com ucd-snmp.
 
 %description compat-static -l pt_BR.UTF-8
 Bibliotecas estáticas para desenvolvimento com ucd-snmp.
@@ -287,6 +308,9 @@ Group:              Applications/System
 Requires:      mibs-dirs
 Obsoletes:     net-snmp-mibs
 Conflicts:     ucd-snmp-libs
 Requires:      mibs-dirs
 Obsoletes:     net-snmp-mibs
 Conflicts:     ucd-snmp-libs
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
 
 %description -n mibs-net-snmp
 Net-SNMP provided MIBs (Management Information Base).
 
 %description -n mibs-net-snmp
 Net-SNMP provided MIBs (Management Information Base).
@@ -319,6 +343,7 @@ Summary(ru.UTF-8):  Утилиты управления сетью по SNMP из
 Summary(uk.UTF-8):     Утиліти керування мережею по SNMP з проекту NET-SNMP
 Group:         Applications/System
 Requires:      %{name}-libs = %{version}-%{release}
 Summary(uk.UTF-8):     Утиліти керування мережею по SNMP з проекту NET-SNMP
 Group:         Applications/System
 Requires:      %{name}-libs = %{version}-%{release}
+Requires:      %{name}-agent-libs = %{version}-%{release}
 Suggests:      mibs-%{name} = %{version}-%{release}
 Obsoletes:     cmu-snmp-utils
 Obsoletes:     ucd-snmp-utils
 Suggests:      mibs-%{name} = %{version}-%{release}
 Obsoletes:     cmu-snmp-utils
 Obsoletes:     ucd-snmp-utils
@@ -351,6 +376,7 @@ como: snmpwalk, snmptest e outros.
 Summary:       SNMP and NetSNMP::* Perl modules
 Summary(pl.UTF-8):     Moduły Perla SNMP oraz NetSNMP::*
 Group:         Development/Languages/Perl
 Summary:       SNMP and NetSNMP::* Perl modules
 Summary(pl.UTF-8):     Moduły Perla SNMP oraz NetSNMP::*
 Group:         Development/Languages/Perl
+Requires:      %{name}-agent-libs = %{version}-%{release}
 Requires:      %{name}-libs = %{version}-%{release}
 Conflicts:     ucd-snmp-utils-perl
 
 Requires:      %{name}-libs = %{version}-%{release}
 Conflicts:     ucd-snmp-utils-perl
 
@@ -405,8 +431,8 @@ MIB browser in Tk.
 Przeglądarka MIB-ów w Tk.
 
 %package -n python-netsnmp
 Przeglądarka MIB-ów w Tk.
 
 %package -n python-netsnmp
-Summary:       Python netsnmp extension module
-Summary(pl.UTF-8):     Moduł rozszerzenia netsnmp dla Pythona
+Summary:       Python netsnmp extension module
+Summary(pl.UTF-8):     Moduł rozszerzenia netsnmp dla Pythona 2
 Group:         Libraries/Python
 Requires:      %{name}-libs = %{version}-%{release}
 
 Group:         Libraries/Python
 Requires:      %{name}-libs = %{version}-%{release}
 
@@ -418,13 +444,26 @@ tri-lingual SNMP (SNMPv3, SNMPv2c, SNMPv1) client API.
 Moduł rozszerzenia netsnmp dla Pythona udostępnia pełne API klienckie
 SNMP dla trzech wersji tego protokołu (SNMPv3, SNMPv2c, SNMPv1).
 
 Moduł rozszerzenia netsnmp dla Pythona udostępnia pełne API klienckie
 SNMP dla trzech wersji tego protokołu (SNMPv3, SNMPv2c, SNMPv1).
 
+%package -n python3-netsnmp
+Summary:       Python 3 netsnmp extension module
+Summary(pl.UTF-8):     Moduł rozszerzenia netsnmp dla Pythona 3
+Group:         Libraries/Python
+Requires:      %{name}-libs = %{version}-%{release}
+
+%description -n python3-netsnmp
+The 'netsnmp' Python extension module provides a full featured,
+tri-lingual SNMP (SNMPv3, SNMPv2c, SNMPv1) client API.
+
+%description -n python3-netsnmp -l pl.UTF-8
+Moduł rozszerzenia netsnmp dla Pythona udostępnia pełne API klienckie
+SNMP dla trzech wersji tego protokołu (SNMPv3, SNMPv2c, SNMPv1).
+
 %prep
 %setup -q -a7
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %prep
 %setup -q -a7
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
-%patch5 -p1
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
@@ -436,12 +475,14 @@ SNMP dla trzech wersji tego protokołu (SNMPv3, SNMPv2c, SNMPv1).
 %patch14 -p1
 %patch15 -p1
 
 %patch14 -p1
 %patch15 -p1
 
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \
+      perl/SNMP/examples/pingmib.pl
+
 %build
 %{__libtoolize}
 %{__aclocal} -I m4
 %{__autoconf}
 %{__autoheader}
 %build
 %{__libtoolize}
 %{__aclocal} -I m4
 %{__autoconf}
 %{__autoheader}
-cp -f /usr/share/automake/config.sub .
 
 MIBS="\
 host agentx smux \
 
 MIBS="\
 host agentx smux \
@@ -459,7 +500,7 @@ MIBS="$MIBS ucd-snmp/lmsensorsMib"
 # ksm must be first in --with-security-modules
 # usm is always enabled
 %configure \
 # ksm must be first in --with-security-modules
 # usm is always enabled
 %configure \
-       --disable-debugging \
+       ac_cv_path_DPKG_QUERY_PATH= \
        --enable-as-needed \
        %{__disable static_libs static} \
        --with-cflags="%{rpmcflags} %{rpmcppflags} -I/usr/include/et" \
        --enable-as-needed \
        %{__disable static_libs static} \
        --with-cflags="%{rpmcflags} %{rpmcppflags} -I/usr/include/et" \
@@ -476,7 +517,7 @@ MIBS="$MIBS ucd-snmp/lmsensorsMib"
        %{__with_without perl perl-modules} \
        %{__with_without python python-modules} \
        --enable-local-smux \
        %{__with_without perl perl-modules} \
        %{__with_without python python-modules} \
        --enable-local-smux \
-       --with-mibdirs='$HOME/.snmp/mibs:/usr/share/mibs:%{_datadir}/snmp/mibs' \
+       --with-mibdirs='$HOME/.snmp/mibs:/usr/share/mibs' \
        --with-mib-modules="$MIBS" \
        --with-security-modules="%{?with_kerberos5:ksm }tsm" \
        --with-sys-contact="root@localhost" \
        --with-mib-modules="$MIBS" \
        --with-security-modules="%{?with_kerberos5:ksm }tsm" \
        --with-sys-contact="root@localhost" \
@@ -490,23 +531,33 @@ MIBS="$MIBS ucd-snmp/lmsensorsMib"
 
 %{__make} -j1
 
 
 %{__make} -j1
 
+TOPDIR="$(pwd)"
+
 cd perl
 cd perl
-%{__perl} Makefile.PL \
+%{__perl} -I. Makefile.PL \
+       -NET-SNMP-CONFIG="${TOPDIR}/net-snmp-config" \
        -NET-SNMP-IN-SOURCE=true \
        INSTALLDIRS=vendor \
        OPTIMIZE="%{rpmcflags} %{rpmcppflags}" \
        </dev/null
 
 # avoid rpaths generated by MakeMaker
        -NET-SNMP-IN-SOURCE=true \
        INSTALLDIRS=vendor \
        OPTIMIZE="%{rpmcflags} %{rpmcppflags}" \
        </dev/null
 
 # avoid rpaths generated by MakeMaker
-perl -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' */Makefile */*/Makefile
+%{__perl} -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' */Makefile */*/Makefile
 
 
-bd=$(cd ..; pwd)
 %{__make} \
 %{__make} \
-       LDFLAGS="%{rpmldflags} -L$bd/snmplib/.libs/ -L$bd/agent/.libs/"
+       LDFLAGS="%{rpmldflags} -L${TOPDIR}/snmplib/.libs/ -L${TOPDIR}/agent/.libs/"
+cd ..
+
+%if %{with python2}
+cd python
+%py_build \
+       --basedir=$TOPDIR
+cd ..
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,snmp},/var/log,/var/lib/net-snmp,%{_libdir}/snmp/dlmod}
+install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,logrotate.d,sysconfig,snmp},/var/log,/var/lib/net-snmp,%{_libdir}/snmp/dlmod}
 
 %{__make} -j1 install \
        mibdir=%{_datadir}/mibs \
 
 %{__make} -j1 install \
        mibdir=%{_datadir}/mibs \
@@ -525,8 +576,7 @@ install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/snmptrapd
 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmptrapd.conf
 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/snmptrapd
 
 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/snmp/snmptrapd.conf
 cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/snmptrapd
 
-install -d $RPM_BUILD_ROOT/etc/init
-cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/init/snmpd.conf
+cp -p %{SOURCE9} $RPM_BUILD_ROOT/etc/logrotate.d/snmpd
 
 cd perl
 %{__make} -j1 install \
 
 cd perl
 %{__make} -j1 install \
@@ -539,8 +589,7 @@ cd ..
 # IP-Filter (non-Linux)
 %{__rm} $RPM_BUILD_ROOT%{_bindir}/ipf-mod.pl
 
 # IP-Filter (non-Linux)
 %{__rm} $RPM_BUILD_ROOT%{_bindir}/ipf-mod.pl
 
-%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Bundle/Makefile.subs.pl
-%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Bundle/NetSNMP/NetSNMP.{bs,so}
+%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Bundle/MakefileSubs.pm
 rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Bundle/NetSNMP/.packlist
 
 rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
 rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Bundle/NetSNMP/.packlist
 
@@ -562,6 +611,15 @@ done
 %endif
 
 %if %{with python}
 %endif
 
 %if %{with python}
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/netsnmp/tests
+%endif
+
+%if %{with python2}
+cd python
+%py_install \
+       --basedir=$TOPDIR
+cd ..
+
 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/netsnmp/tests
 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/netsnmp/*.py
 %endif
 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/netsnmp/tests
 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/netsnmp/*.py
 %endif
@@ -584,6 +642,9 @@ fi
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
 
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
 
+%post  agent-libs -p /sbin/ldconfig
+%postun        agent-libs -p /sbin/ldconfig
+
 %triggerpostun -- ucd-snmp
 /sbin/chkconfig --add snmpd
 
 %triggerpostun -- ucd-snmp
 /sbin/chkconfig --add snmpd
 
@@ -608,7 +669,7 @@ fi
 
 %attr(754,root,root) /etc/rc.d/init.d/snmpd
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmpd
 
 %attr(754,root,root) /etc/rc.d/init.d/snmpd
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/snmpd
-%config(noreplace) %verify(not md5 mtime size) /etc/init/snmpd.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/snmpd
 
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.conf
 %attr(640,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.local.conf
 
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.conf
 %attr(640,root,root) %config(missingok,noreplace) %verify(not md5 mtime size) %{_sysconfdir}/snmp/snmpd.local.conf
@@ -633,17 +694,20 @@ fi
 %files libs
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libnetsnmp.so.*.*.*
 %files libs
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libnetsnmp.so.*.*.*
-%attr(755,root,root) %{_libdir}/libnetsnmpagent.so.*.*.*
-%attr(755,root,root) %{_libdir}/libnetsnmphelpers.so.*.*.*
-%attr(755,root,root) %{_libdir}/libnetsnmpmibs.so.*.*.*
-%attr(755,root,root) %{_libdir}/libnetsnmptrapd.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libnetsnmp.so.%{so_version}
 %attr(755,root,root) %ghost %{_libdir}/libnetsnmp.so.%{so_version}
+%dir %{_sysconfdir}/snmp
+%dir %{_datadir}/snmp
+
+%files agent-libs
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libnetsnmpagent.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libnetsnmpagent.so.%{so_version}
 %attr(755,root,root) %ghost %{_libdir}/libnetsnmpagent.so.%{so_version}
+%attr(755,root,root) %{_libdir}/libnetsnmphelpers.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libnetsnmphelpers.so.%{so_version}
 %attr(755,root,root) %ghost %{_libdir}/libnetsnmphelpers.so.%{so_version}
+%attr(755,root,root) %{_libdir}/libnetsnmpmibs.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libnetsnmpmibs.so.%{so_version}
 %attr(755,root,root) %ghost %{_libdir}/libnetsnmpmibs.so.%{so_version}
+%attr(755,root,root) %{_libdir}/libnetsnmptrapd.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libnetsnmptrapd.so.%{so_version}
 %attr(755,root,root) %ghost %{_libdir}/libnetsnmptrapd.so.%{so_version}
-%dir %{_sysconfdir}/snmp
-%dir %{_datadir}/snmp
 
 %files devel
 %defattr(644,root,root,755)
 
 %files devel
 %defattr(644,root,root,755)
@@ -661,6 +725,8 @@ fi
 %{_libdir}/libnetsnmpmibs.la
 %{_libdir}/libnetsnmptrapd.la
 %{_includedir}/net-snmp
 %{_libdir}/libnetsnmpmibs.la
 %{_libdir}/libnetsnmptrapd.la
 %{_includedir}/net-snmp
+%{_pkgconfigdir}/netsnmp.pc
+%{_pkgconfigdir}/netsnmp-agent.pc
 %{_datadir}/snmp/mib2c*
 %{_mandir}/man1/mib2c.1*
 %{_mandir}/man1/mib2c-update.1*
 %{_datadir}/snmp/mib2c*
 %{_mandir}/man1/mib2c.1*
 %{_mandir}/man1/mib2c-update.1*
@@ -718,11 +784,15 @@ fi
 %attr(755,root,root) %{_bindir}/snmpgetnext
 %attr(755,root,root) %{_bindir}/snmpinform
 %attr(755,root,root) %{_bindir}/snmpnetstat
 %attr(755,root,root) %{_bindir}/snmpgetnext
 %attr(755,root,root) %{_bindir}/snmpinform
 %attr(755,root,root) %{_bindir}/snmpnetstat
+%attr(755,root,root) %{_bindir}/snmppcap
+%attr(755,root,root) %{_bindir}/snmpping
+%attr(755,root,root) %{_bindir}/snmpps
 %attr(755,root,root) %{_bindir}/snmpset
 %attr(755,root,root) %{_bindir}/snmpstatus
 %attr(755,root,root) %{_bindir}/snmptable
 %attr(755,root,root) %{_bindir}/snmptest
 %attr(755,root,root) %{_bindir}/snmptls
 %attr(755,root,root) %{_bindir}/snmpset
 %attr(755,root,root) %{_bindir}/snmpstatus
 %attr(755,root,root) %{_bindir}/snmptable
 %attr(755,root,root) %{_bindir}/snmptest
 %attr(755,root,root) %{_bindir}/snmptls
+%attr(755,root,root) %{_bindir}/snmptop
 %attr(755,root,root) %{_bindir}/snmptranslate
 %attr(755,root,root) %{_bindir}/snmptrap
 %attr(755,root,root) %{_bindir}/snmpusm
 %attr(755,root,root) %{_bindir}/snmptranslate
 %attr(755,root,root) %{_bindir}/snmptrap
 %attr(755,root,root) %{_bindir}/snmpusm
@@ -739,10 +809,12 @@ fi
 %{_mandir}/man1/snmpgetnext.1*
 %{_mandir}/man1/snmpinform.1*
 %{_mandir}/man1/snmpnetstat.1*
 %{_mandir}/man1/snmpgetnext.1*
 %{_mandir}/man1/snmpinform.1*
 %{_mandir}/man1/snmpnetstat.1*
+%{_mandir}/man1/snmpps.1*
 %{_mandir}/man1/snmpset.1*
 %{_mandir}/man1/snmpstatus.1*
 %{_mandir}/man1/snmptable.1*
 %{_mandir}/man1/snmptest.1*
 %{_mandir}/man1/snmpset.1*
 %{_mandir}/man1/snmpstatus.1*
 %{_mandir}/man1/snmptable.1*
 %{_mandir}/man1/snmptest.1*
+%{_mandir}/man1/snmptop.1*
 %{_mandir}/man1/snmptranslate.1*
 %{_mandir}/man1/snmptrap.1*
 %{_mandir}/man1/snmpusm.1*
 %{_mandir}/man1/snmptranslate.1*
 %{_mandir}/man1/snmptrap.1*
 %{_mandir}/man1/snmpusm.1*
@@ -761,16 +833,13 @@ fi
 %{perl_vendorarch}/NetSNMP
 %dir %{perl_vendorarch}/auto/SNMP
 %{perl_vendorarch}/auto/SNMP/autosplit.ix
 %{perl_vendorarch}/NetSNMP
 %dir %{perl_vendorarch}/auto/SNMP
 %{perl_vendorarch}/auto/SNMP/autosplit.ix
-%{perl_vendorarch}/auto/SNMP/SNMP.bs
 %attr(755,root,root) %{perl_vendorarch}/auto/SNMP/SNMP.so
 %dir %{perl_vendorarch}/auto/NetSNMP
 %dir %{perl_vendorarch}/auto/NetSNMP/*
 %{perl_vendorarch}/auto/NetSNMP/*/autosplit.ix
 %attr(755,root,root) %{perl_vendorarch}/auto/SNMP/SNMP.so
 %dir %{perl_vendorarch}/auto/NetSNMP
 %dir %{perl_vendorarch}/auto/NetSNMP/*
 %{perl_vendorarch}/auto/NetSNMP/*/autosplit.ix
-%{perl_vendorarch}/auto/NetSNMP/*/*.bs
 %attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/*/*.so
 %dir %{perl_vendorarch}/auto/NetSNMP/agent/default_store
 %{perl_vendorarch}/auto/NetSNMP/agent/default_store/autosplit.ix
 %attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/*/*.so
 %dir %{perl_vendorarch}/auto/NetSNMP/agent/default_store
 %{perl_vendorarch}/auto/NetSNMP/agent/default_store/autosplit.ix
-%{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.bs
 %attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.so
 %{_mandir}/man3/NetSNMP::*.3*
 %{_mandir}/man3/SNMP.3*
 %attr(755,root,root) %{perl_vendorarch}/auto/NetSNMP/agent/default_store/default_store.so
 %{_mandir}/man3/NetSNMP::*.3*
 %{_mandir}/man3/SNMP.3*
@@ -778,6 +847,7 @@ fi
 
 %files utils-perl
 %defattr(644,root,root,755)
 
 %files utils-perl
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/checkbandwidth
 %attr(755,root,root) %{_bindir}/fixproc
 %attr(755,root,root) %{_bindir}/net-snmp-cert
 %attr(755,root,root) %{_bindir}/snmp-bridge-mib
 %attr(755,root,root) %{_bindir}/fixproc
 %attr(755,root,root) %{_bindir}/net-snmp-cert
 %attr(755,root,root) %{_bindir}/snmp-bridge-mib
@@ -801,11 +871,21 @@ fi
 %{_mandir}/man1/tkmib.1*
 %endif
 
 %{_mandir}/man1/tkmib.1*
 %endif
 
-%if %{with python}
+%if %{with python2}
 %files -n python-netsnmp
 %defattr(644,root,root,755)
 %dir %{py_sitedir}/netsnmp
 %files -n python-netsnmp
 %defattr(644,root,root,755)
 %dir %{py_sitedir}/netsnmp
-%attr(755,root,root) %{py_sitedir}/netsnmp/*.so
+%attr(755,root,root) %{py_sitedir}/netsnmp/client_intf.so
 %{py_sitedir}/netsnmp/*.py[co]
 %{py_sitedir}/netsnmp_python-*.egg-info
 %endif
 %{py_sitedir}/netsnmp/*.py[co]
 %{py_sitedir}/netsnmp_python-*.egg-info
 %endif
+
+%if %{with python}
+%files -n python3-netsnmp
+%defattr(644,root,root,755)
+%dir %{py3_sitedir}/netsnmp
+%attr(755,root,root) %{py3_sitedir}/netsnmp/client_intf.cpython-*.so
+%{py3_sitedir}/netsnmp/*.py
+%{py3_sitedir}/netsnmp/__pycache__
+%{py3_sitedir}/netsnmp_python-*.egg-info
+%endif
This page took 0.134636 seconds and 4 git commands to generate.