Revert "Revert "and added files""
[bcm963xx.git] / userapps / opensource / net-snmp / dist / net-snmp.spec
1 Summary: Tools and servers for the SNMP protocol
2 Name: net-snmp
3 Version: %version
4 Release: %release
5 URL: http://net-snmp.sourceforge.net/
6 Copyright: BSDish
7 Group: System Environment/Daemons
8 Source: http://prdownloads.sourceforge.net/net-snmp/net-snmp-%{version}.tar.gz
9 Prereq: openssl
10 Obsoletes: cmu-snmp ucd-snmp ucd-snmp-utils
11 BuildRoot: /tmp/%{name}-root
12 Packager: The Net-SNMP Coders <http://sourceforge.net/projects/net-snmp/>
13 %description
14
15 Net-SNMP provides tools and libraries relating to the Simple Network
16 Management Protocol including: An extensible agent, An SNMP library,
17 tools to request or set information from SNMP agents, tools to
18 generate and handle SNMP traps, etc.  Using SNMP you can check the
19 status of a network of computers, routers, switches, servers, ... to
20 evaluate the state of your network.
21
22 %package devel
23 Group: Development/Libraries
24 Summary: The includes and static libraries from the Net-SNMP package.
25 Requires: net-snmp = %{version}
26 Obsoletes: cmu-snmp-devel ucd-snmp-devel
27
28 %description devel
29 The net-snmp-devel package contains headers and libraries which are
30 useful for building SNMP applications, agents, and sub-agents.
31
32 %prep
33 %setup -q
34
35
36 %build
37 %configure --with-defaults --with-sys-contact="Unknown" \
38         --with-mib-modules="host disman/event-mib"      \
39         --with-sysconfdir="/etc/net-snmp"               \
40         --enable-shared                                 \
41         --with-cflags="$RPM_OPT_FLAGS"
42
43 make
44
45 %install
46 # ----------------------------------------------------------------------
47 # 'install' sets the current directory to _topdir/BUILD/{name}-{version}
48 # ----------------------------------------------------------------------
49 rm -rf $RPM_BUILD_ROOT
50
51 %makeinstall
52
53 # Remove 'snmpinform' from the temporary directory because it is a
54 # symbolic link, which cannot be handled by the rpm installation process.
55 %__rm -f $RPM_BUILD_ROOT%{_prefix}/bin/snmpinform
56
57 %post
58 # ----------------------------------------------------------------------
59 # The 'post' script is executed just after the package is installed.
60 # ----------------------------------------------------------------------
61 # Create the symbolic link 'snmpinform' after all other files have
62 # been installed.
63 %__rm -f $RPM_INSTALL_PREFIX/bin/snmpinform
64 %__ln_s $RPM_INSTALL_PREFIX/bin/snmptrap $RPM_INSTALL_PREFIX/bin/snmpinform
65
66 # run ldconfig
67 PATH="$PATH:/sbin" ldconfig -n $RPM_INSTALL_PREFIX/lib
68
69 %preun
70 # ----------------------------------------------------------------------
71 # The 'preun' script is executed just before the package is erased.
72 # ----------------------------------------------------------------------
73 # Remove the symbolic link 'snmpinform' before anything else, in case
74 # it is in a directory that rpm wants to remove (at present, it isn't).
75 %__rm -f $RPM_INSTALL_PREFIX/bin/snmpinform
76
77 %postun
78 # ----------------------------------------------------------------------
79 # The 'postun' script is executed just after the package is erased.
80 # ----------------------------------------------------------------------
81 PATH="$PATH:/sbin" ldconfig -n $RPM_INSTALL_PREFIX/lib
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %files
87 %defattr(-,root,root)
88
89 # Install the following documentation in _defaultdocdir/{name}-{version}/
90 %doc AGENT.txt ChangeLog CodingStyle COPYING
91 %doc EXAMPLE.conf.def FAQ INSTALL NEWS PORTING TODO
92 %doc README README.agentx README.hpux11 README.krb5
93 %doc README.snmpv3 README.solaris README.thread README.win32
94          
95 %dir %{_datadir}/snmp/
96
97 #%config(noreplace) /etc/net-snmp/snmpd.conf
98          
99 %{_datadir}/snmp/snmpconf-data
100
101 %{_bindir}
102 %{_sbindir}
103 %{_mandir}/man1/*
104 %{_mandir}/man5/*
105 %{_mandir}/man8/*
106 /usr/lib/*.so*
107
108 %files devel
109 %defattr(-,root,root)
110
111 %{_includedir}
112 %{_libdir}/*.a
113 %{_libdir}/*.la
114 %{_mandir}/man3/*
115
116 %verifyscript
117 echo "No additional verification is done for net-snmp"
118
119 %changelog
120 * Wed Oct 09 2002 Wes Hardaker <hardaker@users.sourceforge.net>
121 - Incorperated most of Mark Harig's better version of the rpm spec and Makefile
122
123 * Wed Oct 09 2002 Wes Hardaker <hardaker@users.sourceforge.net>
124 - Made it possibly almost usable.
125
126 * Mon Apr 22 2002 Robert Story <rstory@users.sourceforge.net>
127 - created