%define snap 20030629 %define tkined_version 1.5.0 %define name scotty %define version 3.0.0 %define release 0.%{snap}.2mdk Summary: A Tcl extension to build network management applications Name: %{name} Version: %{version} Release: %{release} License: Freely redistributable and modifiable Group: Development/Other Source0: %{name}-%{snap}.tar.bz2 Source1: tkined_16x16.png Source2: tkined_32x32.png Source3: tkined_48x48.png Patch0: %{name}-tnmmibtcl.patch.bz2 Patch1: scotty-20030629-install_fix.patch.bz2 Patch2: scotty-20030629-soname.patch.bz2 URL: http://wwwhome.cs.utwente.nl/~schoenw/scotty/ BuildRequires: autoconf BuildRequires: chrpath BuildRequires: libsmi2-devel >= 0.4.1 BuildRequires: tcl >= 8.4 BuildRequires: tk >= 8.4 BuildRequires: zlib-devel Requires: libsmi2 >= 0.4.1 Requires: libsmi-mibs-ext >= 0.4.1 Requires: libsmi-mibs-std >= 0.4.1 Requires: smi-tools >= 0.4.1 Requires: tcl >= 8.4 Requires: tk >= 8.4 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %description Scotty is a Tcl extension to build network management applications using Tcl (and Tk). The scotty extension provides new Tcl commands to - send and receive ICMP packets - query the Domain Name System (DNS) - access UDP sockets from Tcl - probe and use some selected SUN RPCs - retrieve and serve documents via HTTP - send and reveice SNMP messages (SNMPv1, SNMPv2C, SNMPv3) - write special purpose SNMP agents in Tcl - parse and access SNMP MIB definitions - schedule jobs that are to be done regularly - realize event driven programming on network maps This scotty distributions also includes the sources for Tkined. Tkined is a network editor which allows to draw maps showing your network configuration. The most important feature of Tkined is its programming interface which allows network management applications to extend the capabilities of Tkined. Most applications for Tkined are written using the Tnm Tcl extension. %package suid Summary: Two Scotty SUID root utilities (for pinging, and receiving SNMP traps) Requires: %{name} = %{version} Group: Development/Other %description suid These two small utilities are used by Scotty to send ICMP packets (pings and such) and for receiving SNMP traps (which requires listening to a priviledged port). Since they are SUID root, they are packaged separately from the main distribution so the user has the option not to install them. %package tkined Summary: An interactive network editor for network management applications Requires: %{name} = %{version} Group: Development/Other %description tkined Tkined is a network editor which allows to draw maps showing your network configuration. The most important feature of Tkined is its programming interface which allows network management applications to extend the capabilities of Tkined. Most applications for Tkined are written using scotty. %prep %setup -q -n %{name}-%{snap} %patch0 -p1 %patch1 -p0 %patch2 -p0 %build # fix missing tnmSmiTcl.o rule echo 'Tnm_SmiObjCmd() {}' > tnm/snmp/tnmSmiTcl.c pushd unix %configure2_5x \ --disable-rpath \ --enable-multicasts %make CFLAGS="%{optflags}" GENERIC_CFLAGS="%{optflags}" popd %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} pushd unix make \ INSTALL_ROOT=%{buildroot} \ MAN_INSTALL_DIR=%{buildroot}%{_mandir} \ install sinstall popd mv unix/README README.unix mv tnm/agents/README tnm.agents.README mv tnm/examples/README tnm.examples.README mv tnm/mibs/README tnm.mibs.README mv tnm/changes tnm.changes mv tkined/changes tkined.changes ln -snf scotty%{version} %{buildroot}%{_bindir}/scotty ln -snf tkined%{tkined_version} %{buildroot}%{_bindir}/tkined cp -pr %{buildroot}/usr/lib/tnm%{version}/examples . rm -r %{buildroot}/usr/lib/tnm%{version}/examples # Add menu entry for tkined install -d %{buildroot}%{_menudir} cat > %{buildroot}%{_menudir}/%{name}-tkined << EOF ?package(%{name}-tkined): \ command="/usr/bin/tkined" \ title="Scotty-tkined" \ longtitle="Scotty-tkined network editor" \ section="Applications/Monitoring" \ icon="%{name}-tkined.png" \ needs="X11" EOF # Install icons install -d %{buildroot}%{_miconsdir} install -d %{buildroot}%{_iconsdir} install -d %{buildroot}%{_liconsdir} install -m644 %{SOURCE1} %{buildroot}%{_miconsdir}/%{name}-tkined.png install -m644 %{SOURCE2} %{buildroot}%{_iconsdir}/%{name}-tkined.png install -m644 %{SOURCE3} %{buildroot}%{_liconsdir}/%{name}-tkined.png # house cleaning rm -f %{buildroot}%{_mandir}/mann/dns* # strip rpath chrpath -d %{buildroot}%{_bindir}/scotty%{version} %post -p /sbin/ldconfig %preun -p /sbin/ldconfig %post tkined cd %{_libdir}/tkined%{tkined_version}/apps echo auto_mkindex . library.tcl | %{_bindir}/tclsh # Done in libs package now /sbin/ldconfig %{update_menus} %postun tkined # Done in libs package now /sbin/ldconfig %{clean_menus} %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr (-,root,root) %doc README README.unix license.terms examples %doc tnm.changes tnm.agents.README tnm.examples.README tnm.mibs.README %attr(755,root,root) %{_bindir}/scotty %attr(755,root,root) %{_bindir}/scotty%{version} %attr(-,root,root) %{_libdir}/tnm%{version}.so %attr(-,root,root) %{_libdir}/tnm%{version} %{_mandir}/mann/* %{_mandir}/man1/scotty.1* %files suid %defattr (-,root,root) %attr(4755,root,root) %{_bindir}/nmicmpd %attr(4755,root,root) %{_bindir}/nmtrapd %{_mandir}/man8/* %files tkined %defattr (-,root,root) %doc README README.unix license.terms tkined.changes %attr(755,root,root) %{_bindir}/tkined %attr(755,root,root) %{_bindir}/tkined%{tkined_version} %attr(-,root,root) %{_libdir}/tkined%{tkined_version}.so %attr(-,root,root) %{_libdir}/tkined%{tkined_version} %{_menudir}/%{name}-tkined %{_miconsdir}/%{name}-tkined.png %{_iconsdir}/%{name}-tkined.png %{_liconsdir}/%{name}-tkined.png %{_mandir}/man1/tkined.1* %changelog * Wed Feb 02 2005 Lenny Cartier <lenny@mandrakesoft.com> 3.0.0-0.20030629.2mdk - rebuild * Sun Jun 29 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 3.0.0-0.20030629.1mdk - 20030629 - used ideas from a package by Torbjorn Turpeinen - added P1 & P2 - strip rpath * Mon Jan 27 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.1.11-3mdk - build release - misc spec file fixes * Wed Aug 28 2002 Lenny Cartier <lenny@mandrakesoft.com> 2.1.11-2mdk - rebuild * Tue Aug 28 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.1.11-1mdk - 2.1.11 * Mon Mar 19 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.1.9-3mdk - rebuild * Wed May 03 2000 Lenny Cartier <lenny@mandrakesoft.com> 2.1.9-2mdk - fix group - bzip2 patch * Tue Feb 29 2000 Lenny Cartier <lenny@mandrakesoft.com> - used srpm provided by Sandor Takacs <taki@cloud.matav.sulinet.hu> - fixed the files section - bzip2 archive