[tkined] RPM for tkined snapshot 98-11-04

George Ross (gdmr@dcs.ed.ac.uk)
Mon, 14 Dec 1998 16:56:02 +0000

This is a multipart MIME message.

--==_Exmh_-15757359920
Content-Type: text/plain; charset=us-ascii

For reasons which aren't relevant here I need to install tkined from a
RedHat-Linux RPM instead of just doing it manually. Attached are a
spec-file and a patch to unix/Makefile.in which do the job. I've based this
on the 98-11-04 snapshot.

The Makefile.in patch does three of things: it adds an INSTALL_ROOT variable
in front of the various *_INSTALL_DIR so that rpm's %install section can put
the files into the BuildRoot instead of directly into /usr; it changes
LIB_RUNTIME_DIR to LIB_INSTALL_DIR in a few places where this seemed to make
more sense; and it creates a temporary tnm pkgIndex.tcl without the full
path hard-coded in so that the mib parsing can go through before all the
previously-installed stuff gets to its final home.

--==_Exmh_-15757359920
Content-Type: application/x-patch ; name="Makefile.in.patch"
Content-Description: Makefile.in.patch
Content-Disposition: attachment; filename="Makefile.in.patch"

*** unix/Makefile.in Thu Oct 29 14:32:24 1998
--- /var/tmp/Makefile.in Mon Dec 14 16:11:51 1998
***************
*** 28,49 ****
exec_prefix = @exec_prefix@

# Directory in which to install the program scotty:
! BIN_INSTALL_DIR = $(exec_prefix)/bin

# Directory in which to install dynamic loadable modules:
! LIB_INSTALL_DIR = $(exec_prefix)/lib

# Directory in which dynamic loadable modules are installed:
LIB_RUNTIME_DIR = $(exec_prefix)/lib

# Directory in which to install library files belonging to the extension.
! TNM_INSTALL_DIR = $(prefix)/lib/tnm$(TNM_VERSION)

# Directory in which to install the library of tkined scripts.
! TKI_INSTALL_DIR = $(prefix)/lib/tkined$(TKI_VERSION)

# Top-level directory for manual entries:
! MAN_INSTALL_DIR = $(prefix)/man

# Directory in which to install the manual entries:
MAN1_INSTALL_DIR = $(MAN_INSTALL_DIR)/man1
--- 28,49 ----
exec_prefix = @exec_prefix@

# Directory in which to install the program scotty:
! BIN_INSTALL_DIR = $(INSTALL_ROOT)/$(exec_prefix)/bin

# Directory in which to install dynamic loadable modules:
! LIB_INSTALL_DIR = $(INSTALL_ROOT)/$(exec_prefix)/lib

# Directory in which dynamic loadable modules are installed:
LIB_RUNTIME_DIR = $(exec_prefix)/lib

# Directory in which to install library files belonging to the extension.
! TNM_INSTALL_DIR = $(INSTALL_ROOT)/$(prefix)/lib/tnm$(TNM_VERSION)

# Directory in which to install the library of tkined scripts.
! TKI_INSTALL_DIR = $(INSTALL_ROOT)/$(prefix)/lib/tkined$(TKI_VERSION)

# Top-level directory for manual entries:
! MAN_INSTALL_DIR = $(INSTALL_ROOT)/$(prefix)/man

# Directory in which to install the manual entries:
MAN1_INSTALL_DIR = $(MAN_INSTALL_DIR)/man1
***************
*** 538,544 ****
done;

tnm-install-bin: scotty tnm$(SHLIB_SUFFIX)
! @for i in $(BIN_INSTALL_DIR) $(LIB_RUNTIME_DIR) $(TNM_INSTALL_DIR) ; \
do \
if [ ! -d $$i ] ; then \
echo "Making directory $$i"; \
--- 538,544 ----
done;

tnm-install-bin: scotty tnm$(SHLIB_SUFFIX)
! @for i in $(BIN_INSTALL_DIR) $(LIB_INSTALL_DIR) $(TNM_INSTALL_DIR) ; \
do \
if [ ! -d $$i ] ; then \
echo "Making directory $$i"; \
***************
*** 549,557 ****
done;
@echo "Installing scotty$(TNM_VERSION) and tnm$(TNM_VERSION)$(SHLIB_SUFFIX)"
@$(INSTALL_PROGRAM) scotty $(BIN_INSTALL_DIR)/scotty$(TNM_VERSION)
! @$(INSTALL_DATA) tnm$(SHLIB_SUFFIX) $(LIB_RUNTIME_DIR)/tnm$(TNM_VERSION)$(SHLIB_SUFFIX)
! @chmod 555 $(LIB_RUNTIME_DIR)/tnm$(TNM_VERSION)$(SHLIB_SUFFIX)
@echo 'package ifneeded Tnm $(TNM_VERSION) "load $(LIB_RUNTIME_DIR)/tnm$(TNM_VERSION)[info sharedlibextension]"' > $(TNM_INSTALL_DIR)/pkgIndex.tcl

tnm-install-mibs:
@for i in $(TNM_INSTALL_DIR)/mibs ; \
--- 549,559 ----
done;
@echo "Installing scotty$(TNM_VERSION) and tnm$(TNM_VERSION)$(SHLIB_SUFFIX)"
@$(INSTALL_PROGRAM) scotty $(BIN_INSTALL_DIR)/scotty$(TNM_VERSION)
! @$(INSTALL_DATA) tnm$(SHLIB_SUFFIX) $(LIB_INSTALL_DIR)/tnm$(TNM_VERSION)$(SHLIB_SUFFIX)
! @chmod 555 $(LIB_INSTALL_DIR)/tnm$(TNM_VERSION)$(SHLIB_SUFFIX)
@echo 'package ifneeded Tnm $(TNM_VERSION) "load $(LIB_RUNTIME_DIR)/tnm$(TNM_VERSION)[info sharedlibextension]"' > $(TNM_INSTALL_DIR)/pkgIndex.tcl
+ @[ -d tmp-install-tnm ] || mkdir tmp-install-tnm
+ @echo 'package ifneeded Tnm $(TNM_VERSION) "load tnm$(TNM_VERSION)[info sharedlibextension]"' > tmp-install-tnm/pkgIndex.tcl

tnm-install-mibs:
@for i in $(TNM_INSTALL_DIR)/mibs ; \
***************
*** 571,578 ****
$(INSTALL_DATA) $$i $(TNM_INSTALL_DIR)/mibs ; \
done ; \
done
! @TCLLIBPATH="$(TNM_INSTALL_DIR) $$TCLLIBPATH"; \
export TCLLIBPATH; \
echo 'foreach f $$tnm(mibs) {puts "Parsing $$f"; Tnm::mib load $$f}; exit' | \
./scotty

--- 573,582 ----
$(INSTALL_DATA) $$i $(TNM_INSTALL_DIR)/mibs ; \
done ; \
done
! @TCLLIBPATH="tmp-install-tnm $(TNM_INSTALL_DIR) $$TCLLIBPATH"; \
export TCLLIBPATH; \
+ TNM_LIBRARY="$(TNM_INSTALL_DIR)"; \
+ export TNM_LIBRARY; \
echo 'foreach f $$tnm(mibs) {puts "Parsing $$f"; Tnm::mib load $$f}; exit' | \
./scotty

***************
*** 680,686 ****
done;

tki-install-bin: tkined$(SHLIB_SUFFIX) tkined $(TKI_LIBRARY_DIR)/pkgIndex.tcl
! @for i in $(BIN_INSTALL_DIR) $(LIB_RUNTIME_DIR) $(TKI_INSTALL_DIR) ; \
do \
if [ ! -d $$i ] ; then \
echo "Making directory $$i"; \
--- 684,690 ----
done;

tki-install-bin: tkined$(SHLIB_SUFFIX) tkined $(TKI_LIBRARY_DIR)/pkgIndex.tcl
! @for i in $(BIN_INSTALL_DIR) $(LIB_INSTALL_DIR) $(TKI_INSTALL_DIR) ; \
do \
if [ ! -d $$i ] ; then \
echo "Making directory $$i"; \
***************
*** 691,698 ****
done;
@echo "Installing tkined$(TKI_VERSION) and tkined$(TKI_VERSION)$(SHLIB_SUFFIX)"
@$(INSTALL_PROGRAM) tkined $(BIN_INSTALL_DIR)/tkined$(TKI_VERSION)
! @$(INSTALL_DATA) tkined$(SHLIB_SUFFIX) $(LIB_RUNTIME_DIR)/tkined$(TKI_VERSION)$(SHLIB_SUFFIX)
! @chmod 555 $(LIB_RUNTIME_DIR)/tkined$(TKI_VERSION)$(SHLIB_SUFFIX)
@echo 'package ifneeded Tkined $(TKI_VERSION) "load $(LIB_RUNTIME_DIR)/tkined$(TKI_VERSION)[info sharedlibextension]"' > $(TKI_INSTALL_DIR)/pkgIndex.tcl
@$(INSTALL_DATA) $(TKI_DIR)/tkined.defaults $(TKI_INSTALL_DIR)

--- 695,702 ----
done;
@echo "Installing tkined$(TKI_VERSION) and tkined$(TKI_VERSION)$(SHLIB_SUFFIX)"
@$(INSTALL_PROGRAM) tkined $(BIN_INSTALL_DIR)/tkined$(TKI_VERSION)
! @$(INSTALL_DATA) tkined$(SHLIB_SUFFIX) $(LIB_INSTALL_DIR)/tkined$(TKI_VERSION)$(SHLIB_SUFFIX)
! @chmod 555 $(LIB_INSTALL_DIR)/tkined$(TKI_VERSION)$(SHLIB_SUFFIX)
@echo 'package ifneeded Tkined $(TKI_VERSION) "load $(LIB_RUNTIME_DIR)/tkined$(TKI_VERSION)[info sharedlibextension]"' > $(TKI_INSTALL_DIR)/pkgIndex.tcl
@$(INSTALL_DATA) $(TKI_DIR)/tkined.defaults $(TKI_INSTALL_DIR)

***************
*** 780,786 ****
tnm-uninstall:
@echo "Removing scotty$(TNM_VERSION) and tnm$(TNM_VERSION)$(SHLIB_SUFFIX)"
@rm -f $(BIN_INSTALL_DIR)/scotty$(TNM_VERSION)
! @rm -f $(LIB_RUNTIME_DIR)/tnm$(TNM_VERSION)$(SHLIB_SUFFIX)
@for i in $(LIB_INSTALL_DIR)/tnm$(TNM_VERSION)/* ; \
do \
if [ "`basename $$i`" != "site" ] ; then \
--- 784,790 ----
tnm-uninstall:
@echo "Removing scotty$(TNM_VERSION) and tnm$(TNM_VERSION)$(SHLIB_SUFFIX)"
@rm -f $(BIN_INSTALL_DIR)/scotty$(TNM_VERSION)
! @rm -f $(LIB_INSTALL_DIR)/tnm$(TNM_VERSION)$(SHLIB_SUFFIX)
@for i in $(LIB_INSTALL_DIR)/tnm$(TNM_VERSION)/* ; \
do \
if [ "`basename $$i`" != "site" ] ; then \
***************
*** 797,803 ****
tki-uninstall:
@echo "Removing tkined$(TNM_VERSION) and tkined$(TNM_VERSION)$(SHLIB_SUFFIX)"
@rm -f $(BIN_INSTALL_DIR)/tkined$(TKI_VERSION)
! @rm -f $(LIB_RUNTIME_DIR)/tkined$(TKI_VERSION)$(SHLIB_SUFFIX)
@for i in $(LIB_INSTALL_DIR)/tkined$(TKI_VERSION)/* ; \
do \
if [ "`basename $$i`" != "site" ] ; then \
--- 801,807 ----
tki-uninstall:
@echo "Removing tkined$(TNM_VERSION) and tkined$(TNM_VERSION)$(SHLIB_SUFFIX)"
@rm -f $(BIN_INSTALL_DIR)/tkined$(TKI_VERSION)
! @rm -f $(LIB_INSTALL_DIR)/tkined$(TKI_VERSION)$(SHLIB_SUFFIX)
@for i in $(LIB_INSTALL_DIR)/tkined$(TKI_VERSION)/* ; \
do \
if [ "`basename $$i`" != "site" ] ; then \

--==_Exmh_-15757359920
Content-Type: text/plain ; name="tkined.spec"; charset=us-ascii
Content-Description: tkined.spec
Content-Disposition: attachment; filename="tkined.spec"

Summary: tkined (tk-based SNMP manager)
Name: tkined
Version: 98.11.04
Release: 1
Group: Networking/Utilities
Packager: George Ross <gdmr@dcs.ed.ac.uk>
Source: ftp://ftp.ibr.cs.tu-bs.de/pub/local/tkined/devel/scotty-98-11-04.tar.gz
Patch: Makefile.in.patch
Copyright: Freely distributable (see "license.terms")
BuildRoot: /disk/home/farg/tkined/Linux/BuildRoot

%description
This is "scotty, a software package which
allows to build network management applications using Tcl (and
Tk). The scotty package includes the Tnm Tcl extension which provides
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, SNMPv2USEC, SNMPv2C)
- 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."

%prep
%setup -n scotty
%patch

%build
cd unix
./configure
make

%install
rm -rf $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT/usr/lib $RPM_BUILD_ROOT/usr/man
cd unix
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/usr/lib; export LD_LIBRARY_PATH
make install INSTALL_ROOT=$RPM_BUILD_ROOT
make -i sinstall INSTALL_ROOT=$RPM_BUILD_ROOT

%clean

%files
%doc unix/README
%doc license.terms
%attr(4755,root,-) /usr/bin/nmicmpd
%attr(4755,root,-) /usr/bin/nmtrapd
/usr/bin/scotty3.0.0
/usr/bin/tkined1.5.0
/usr/lib
/usr/man

--==_Exmh_-15757359920
Content-Type: text/plain; charset=us-ascii

Dr George D M Ross, Department of Computer Science, University of Edinburgh
Kings Buildings, Mayfield Road, Edinburgh, Scotland, EH9 3JZ
Mail: gdmr@dcs.ed.ac.uk Voice: +44 131 650 5147 Fax: +44 131 667 7209
PGP: 1024/B74A4F7D 14 E8 B3 00 20 04 68 F8 95 40 CB 36 A4 D4 FA 90

--==_Exmh_-15757359920--

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.