forked from pief/python-netsnmpagent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
python-netsnmpagent.spec.in
46 lines (39 loc) · 1.58 KB
/
python-netsnmpagent.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#
# spec file for package python-netsnmpagent
#
# Copyright (c) 2013-2016 Pieter Hollants <[email protected]>
#
Name: python-netsnmpagent
Version: @NETSNMPAGENT_VERSION@
Release: 0
License: LGPL-3.0
Summary: Facilitates writing Net-SNMP (AgentX) subagents in Python
Url: http://pypi.python.org/pypi/netsnmpagent
Group: Development/Languages/Python
Source: http://pypi.python.org/packages/source/n/netsnmpagent/netsnmpagent-%{version}.tar.gz
BuildRequires: python-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch: noarch
%else
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif
%description
python-netsnmpagent is a Python module that facilitates writing Net-SNMP
subagents in Python. Subagents connect to a locally running Master agent
(snmpd) over a Unix domain socket (eg. "/var/run/agentx/master") and using the
AgentX protocol (RFC2741). They implement custom Management Information Base
(MIB) modules that extend the local node's MIB tree. Usually, this requires
writing a MIB as well, ie. a text file that specifies the structure, names
and data types of the information within the MIB module.
%prep
%setup -q -n netsnmpagent-%{version}
%build
CFLAGS="%{optflags}" python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%files
%defattr(-,root,root,-)
%{python_sitelib}/*
%doc README LICENSE ChangeLog examples
%changelog