Re: [Snmptt-developer] Spec file to build an RPM
Brought to you by:
alex_b
From: Alan I. <al...@ec...> - 2011-04-22 01:39:00
|
Oops, didn't catch that one was already available. Disregard previous message. On Thu, Apr 21, 2011 at 5:25 PM, Alan Ivey <al...@ec...> wrote: > I've created a spec file to build an SNMPtt RPM. I've tested this on CentOS > 5.5 64-bit. > > Name: snmptt > Version: 1.3 > Release: 1%{?dist} > Summary: SNMP Trap Translator is an SNMP trap handler for use with > the Net-SNMP / UCD-SNMP snmptrapd program > > Group: Applications/Internet > License: GPLv2+ > URL: http://snmptt.sourceforge.net/ > Source0: > http://downloads.sourceforge.net/%{name}/%{name}_%{version}.tgz > BuildRoot: %{_tmppath}/%{name}_%{version} > BuildArch: noarch > > Requires: net-snmp > > %description > SNMPTT (SNMP Trap Translator) is an SNMP trap handler written in Perl for > use > with the Net-SNMP / UCD-SNMP snmptrapd program (www.net-snmp.org). SNMPTT > supports Linux, Unix and Windows. Many network devices including but not > limited to network switches, routers, remote access servers, UPSs, printers > > and operating systems such as Unix and Windows NT have the ability to send > notifications to an SNMP manager running on a network management station. > The > notifications can be either SNMP Traps, or SNMP Inform messages. The > notification can contain a wide array of information such as port failures, > > link failures, access violations, power outages, paper jams, hard drive > failures etc. The MIB (Management Information Base) available from the > vendor > determines the notifications supported by each device. > > > %prep > %setup -q -n %{name}_%{version} > > %build > > %install > rm -rf $RPM_BUILD_ROOT > mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} > mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp > mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/snmptt > mkdir -p ${RPM_BUILD_ROOT}%{_initrddir} > mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/spool/snmptt > mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d > install -m 0755 -d ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp > install -m 0755 -d ${RPM_BUILD_ROOT}%{_localstatedir}/log/snmptt > install -m 0755 -d ${RPM_BUILD_ROOT}%{_localstatedir}/spool/snmptt > install -m 0755 snmptt ${RPM_BUILD_ROOT}%{_sbindir}/snmptt > install -m 0755 snmptthandler ${RPM_BUILD_ROOT}%{_sbindir}/snmptthandler > install -m 0755 snmpttconvert ${RPM_BUILD_ROOT}%{_sbindir}/snmpttconvert > install -m 0755 snmpttconvertmib > ${RPM_BUILD_ROOT}%{_sbindir}/snmpttconvertmib > install -m 0644 examples/snmptt.conf.generic > ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmptt.conf > install -m 0644 snmptt.ini ${RPM_BUILD_ROOT}%{_sysconfdir}/snmp/snmptt.ini > install -m 0755 snmptt-init.d ${RPM_BUILD_ROOT}%{_initrddir}/snmptt > install -m 0644 snmptt.logrotate > ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/snmptt > > %clean > rm -rf $RPM_BUILD_ROOT > > %post > echo "" > echo "Add the service using chkconfig: > chkconfig --add snmptt > > Configure the service to start at runlevel 2345: > chkconfig --level 2345 snmptt on > > Snmptt will be started at the next reboot, or can be started immediately > with: > service snmptt start > or > /etc/rc.d/init.d/snmptt start > > To manually start snmptt, use: > snmptt --daemon" > > %files > %defattr(-,root,root,-) > %dir %{_sysconfdir}/snmp > %dir %{_localstatedir}/log/snmptt > %dir %{_localstatedir}/spool/snmptt > %config(noreplace) %{_sysconfdir}/snmp/snmptt.conf > %config(noreplace) %{_sysconfdir}/snmp/snmptt.ini > %{_sbindir}/snmptt > %{_sbindir}/snmptthandler > %{_sbindir}/snmpttconvert > %{_sbindir}/snmpttconvertmib > %{_initrddir}/snmptt > %{_sysconfdir}/logrotate.d/snmptt > > %changelog > * Thu Apr 21 2011 Alan Ivey <al...@ec...> - 1.3-1 > - First RPM > > > > -- > Alan Ivey > Systems Administrator, EchoDitto > al...@ec... > 202-285-9455 ext 115 > AIM: echodittoalan > > > > > > > > -- Alan Ivey Systems Administrator, EchoDitto al...@ec... 202-285-9455 ext 115 AIM: echodittoalan |