Buildroot patches for STk RPM

From: David Fox <dsfox_at_cogsci.ucsd.edu>
Date: 03 Feb 1999 12:12:48 -0800

Hi Erick, hi everybody, it been a long time...

Here is a patch to allow installation of STk in a temporary directory.
This is generally considered good form so you can build the package
without destroying the installed version. First a patch to the spec
file and then a patch that modifies some of the Makefile.in's:
-- 
David Fox           http://hci.ucsd.edu/dsf             xoF divaD
UCSD HCI Lab                                         baL ICH DSCU
------------------------ Cut Here ------------------------
--- STk.spec~	Tue Jan 26 15:16:57 1999
+++ STk.spec	Wed Feb  3 11:48:03 1999
_at_@ -1,12 +1,13 @@
-%define		release 1
 Summary: 	Scheme Interpreter with access to the Tk toolkit
 Name:    	STk
 Version: 	3.99.4
-Release: 	%{release}
+Release: 	2
 Copyright: 	distributable
 Source: 	STk-3.99.4.tar.gz
+Patch:		STk-buildroot.patch
 Group:		Development/Languages
 Packager:	Erick Gallesio <eg_at_unice.fr>
+BuildRoot:	/tmp/STk
 
 %package devel
 Summary: 	Header files and libraries for STkq
_at_@ -44,14 +45,23 @@
 
 %prep
 %setup
+%patch -p1 -b .orig
 
 %build
 CFLAGS=-O2 sh configure --prefix=/usr/local
 make
 
-%install 
-make install
-make install.libs
+%install
+
+rm -rf %{buildroot}
+mkdir -p %{buildroot}
+
+make install root=%{buildroot}
+make install.libs root=%{buildroot}
+
+%clean
+
+rm -rf %{buildroot}
 
 %post
 if [ -d /usr/local/lib/stk/site-scheme ] 
------------------------ Cut Here ------------------------
------------------------ Cut Here ------------------------
diff -ru STk-3.99.4/Makefile.in~ STk-3.99.4/Makefile.in
--- STk-3.99.4/Makefile.in~	Wed Feb  3 10:15:47 1999
+++ STk-3.99.4/Makefile.in	Wed Feb  3 11:10:07 1999
_at_@ -102,33 +102,33 @@
 demos:
 	/bin/sh -c "(cd Demos; ../Src/test-stk -f S-scape README.html)"
 
-install: all clean-before
-	(cd Tcl;     	$(MAKE) install)
-	(cd Tk;      	$(MAKE) install)
-	(cd Mp;		$(MAKE) install)
-	(cd Src;     	$(MAKE) install.stk)
-	(cd Snow;     	$(MAKE) install.snow)
-	(cd Lib;     	$(MAKE) install)
-	(cd STklos;  	$(MAKE) install)
-	(cd Extensions; $(MAKE) install)
-	(cd Demos;   	$(MAKE) install)
-	(cd Help;	$(MAKE) install)
-	(cd Doc;	$(MAKE) install)
+install: clean-before
+	(cd Tcl;     	$(MAKE) install prefix=$(root)$(prefix))
+	(cd Tk;      	$(MAKE) install INSTALL_ROOT=$(root))
+	(cd Mp;		$(MAKE) install prefix=$(root)$(prefix))
+	(cd Src;     	$(MAKE) install.stk root=$(root))
+	(cd Snow;     	$(MAKE) install.snow root=$(root))
+	(cd Lib;     	$(MAKE) install root=$(root))
+	(cd STklos;  	$(MAKE) install prefix=$(root)$(prefix))
+	(cd Extensions; $(MAKE) install prefix=$(root)$(prefix))
+	(cd Demos;   	$(MAKE) install root=$(root))
+	(cd Help;	$(MAKE) install prefix=$(root)$(prefix))
+	(cd Doc;	$(MAKE) install prefix=$(root)$(prefix))
 	_at_echo ""
 	_at_echo "Installation completed."
 
 install.libs:
-	-if [ ! -d $(confdir) ] ; then mkdir -p $(confdir); fi
-	$(CP) config.make $(confdir)
-	-if [ ! -d $(incdir) ] ; then mkdir -p $(incdir); fi
-	/bin/rm -f $(stkdir)/include
-	(cd $(stkdir) ; ln -s $(VERSION)/include ./include)
-	(cd Tcl;     	$(MAKE) install.libs)
-	(cd Tk;      	$(MAKE) install.libs)
-	(cd Mp;		$(MAKE) install.libs)
-	(cd Src;     	$(MAKE) install.stk.libs)
-	(cd Snow;     	$(MAKE) install.snow.libs)
-	chmod 0755 $(confdir) $(ardir) $(confdir)/* $(ardir)/*
+	-if [ ! -d $(root)$(confdir) ] ; then mkdir -p $(root)$(confdir); fi
+	$(CP) config.make $(root)$(confdir)
+	-if [ ! -d $(root)$(incdir) ] ; then mkdir -p $(root)$(incdir); fi
+	/bin/rm -f $(root)$(stkdir)/include
+	(cd $(root)$(stkdir) ; ln -s $(VERSION)/include ./include)
+	(cd Tcl;     	$(MAKE) install.libs prefix=$(root)$(prefix))
+	(cd Tk;      	$(MAKE) install.libs prefix=$(root)$(prefix))
+	(cd Mp;		$(MAKE) install.libs prefix=$(root)$(prefix))
+	(cd Src;     	$(MAKE) install.stk.libs root=$(root))
+	(cd Snow;     	$(MAKE) install.snow.libs root=$(root))
+	chmod 0755 $(root)$(confdir) $(root)$(ardir) $(root)$(confdir)/* $(root)$(ardir)/*
 	_at_echo ""
 	_at_echo "Full installation completed."
 
_at_@ -152,7 +152,7 @@
 	_at_echo "Terminé. Le fichier est dans /tmp/STk-$(VERSION)-common.tar.gz"
 
 clean-before:
-	_at_if [ -d $(prefix)/lib/stk ]; \
+	_at_if [ -d $(root)$(prefix)/lib/stk ]; \
 	then \
 	  echo "*** WARNING:"; \
 	  echo "*** A previous version of STk has already been installed in"; \
_at_@ -164,7 +164,7 @@
 	  echo "*** (Waiting 10s) " ; \
 	  sleep 10;\
 	fi
-	_at_if [ -d $(prefix)/lib/stk/$(VERSION) ]; \
+	_at_if [ -d $(root)$(prefix)/lib/stk/$(VERSION) ]; \
 	then \
 	  echo "*** WARNING:"; \
 	  echo "*** This STk version ($(VERSION)) has already been installed "; \
diff -ru STk-3.99.4/Demos/Makefile~ STk-3.99.4/Demos/Makefile
--- STk-3.99.4/Demos/Makefile~	Mon Apr 20 13:15:01 1998
+++ STk-3.99.4/Demos/Makefile	Wed Feb  3 11:09:17 1999
_at_@ -4,7 +4,7 @@
 
 include ../config.make
 
-DEMODIR=$(libdir)/Demos
+DEMODIR=$(root)$(libdir)/Demos
 
 what:
 	_at_echo "Type make install to install demos"
diff -ru STk-3.99.4/Lib/Makefile~ STk-3.99.4/Lib/Makefile
--- STk-3.99.4/Lib/Makefile~	Wed Sep 30 05:02:29 1998
+++ STk-3.99.4/Lib/Makefile	Wed Feb  3 11:11:02 1999
_at_@ -8,9 +8,9 @@
 
 include ../config.make
 
-SITE_SCHEME=$(stkdir)/site-scheme
-STK_IMAGES=$(libdir)/Images
-STK_STK=$(libdir)/STk
+SITE_SCHEME=$(root)$(stkdir)/site-scheme
+STK_IMAGES=$(root)$(libdir)/Images
+STK_STK=$(root)$(libdir)/STk
 STK_STK_MATCH=$(STK_STK)/Match
 lib: 
 
diff -ru STk-3.99.4/Src/Makefile.in~ STk-3.99.4/Src/Makefile.in
--- STk-3.99.4/Src/Makefile.in~	Wed Feb  3 10:15:50 1999
+++ STk-3.99.4/Src/Makefile.in	Wed Feb  3 11:06:45 1999
_at_@ -109,38 +109,38 @@
 	_at_echo "You must specify 'install.stk' or "install.snow'"
 
 install.stk: stk
-	-if [ ! -d $(bindir) ] ; then mkdir -p $(bindir); fi
-	/bin/rm -f $(bindir)/stk $(bindir)/stk-$(VERSION) 
-	ln -s $(execdir)/stk $(bindir)/stk-$(VERSION) 
-	ln -s $(execdir)/stk $(bindir)/stk 
-	-if [ ! -d $(execdir) ] ; then mkdir -p $(execdir); fi
-	$(CP) stk $(execdir)
-	$(STRIP) $(execdir)/stk
-	chmod 0755 $(bindir)/stk-$(VERSION) $(bindir)/stk $(execdir)/stk
+	-if [ ! -d $(root)$(bindir) ] ; then mkdir -p $(root)$(bindir); fi
+	/bin/rm -f $(root)$(bindir)/stk $(root)$(bindir)/stk-$(VERSION) 
+	ln -s $(execdir)/stk $(root)$(bindir)/stk-$(VERSION) 
+	ln -s $(execdir)/stk $(root)$(bindir)/stk 
+	-if [ ! -d $(root)$(execdir) ] ; then mkdir -p $(root)$(execdir); fi
+	$(CP) stk $(root)$(execdir)
+	$(STRIP) $(root)$(execdir)/stk
+	chmod 0755 $(root)$(execdir)/stk
 
 install.stk.libs:
-	-if [ ! -d $(ardir) ] ; then mkdir -p $(ardir); fi
-	$(CP) libstk.a $(ardir)
-	$(RANLIB) $(ardir)/libstk.a
-	-if [ ! -d $(incdir) ] ; then mkdir -p $(incdir); fi
-	$(CP) stk.h tk-glue.h tcl-glue.h $(incdir)
+	-if [ ! -d $(root)$(ardir) ] ; then mkdir -p $(root)$(ardir); fi
+	$(CP) libstk.a $(root)$(ardir)
+	$(RANLIB) $(root)$(ardir)/libstk.a
+	-if [ ! -d $(root)$(incdir) ] ; then mkdir -p $(root)$(incdir); fi
+	$(CP) stk.h tk-glue.h tcl-glue.h $(root)$(incdir)
 
 install.snow: snow
-	-if [ ! -d $(bindir) ] ; then mkdir -p $(bindir); fi
-	/bin/rm -f $(bindir)/snow-$(VERSION) $(bindir)/snow
-	ln -s $(execdir)/snow $(bindir)/snow-$(VERSION) 
-	ln -s $(execdir)/snow $(bindir)/snow 
-	-if [ ! -d $(execdir) ] ; then mkdir -p $(execdir); fi
-	$(CP) snow $(execdir)
-	$(STRIP) $(execdir)/snow
-	chmod 0755 $(bindir)/snow-$(VERSION) $(bindir)/snow $(execdir)/snow
+	-if [ ! -d $(root)$(bindir) ] ; then mkdir -p $(root)$(bindir); fi
+	/bin/rm -f $(root)$(bindir)/snow-$(VERSION) $(root)$(bindir)/snow
+	ln -s $(execdir)/snow $(root)$(bindir)/snow-$(VERSION) 
+	ln -s $(execdir)/snow $(root)$(bindir)/snow 
+	-if [ ! -d $(root)$(execdir) ] ; then mkdir -p $(root)$(execdir); fi
+	$(CP) snow $(root)$(execdir)
+	$(STRIP) $(root)$(execdir)/snow
+	chmod 0755 $(root)$(execdir)/snow
 
 install.snow.libs:
-	-if [ ! -d $(ardir) ] ; then mkdir -p $(ardir); fi
-	$(CP) libsnow.a $(ardir)
-	$(RANLIB) $(ardir)/libsnow.a	
-	-if [ ! -d $(incdir) ] ; then mkdir -p $(incdir); fi
-	$(CP) stk.h tcl-glue.h $(incdir)
+	-if [ ! -d $(root)$(ardir) ] ; then mkdir -p $(root)$(ardir); fi
+	$(CP) libsnow.a $(root)$(ardir)
+	$(RANLIB) $(root)$(ardir)/libsnow.a	
+	-if [ ! -d $(root)$(incdir) ] ; then mkdir -p $(root)$(incdir); fi
+	$(CP) stk.h tcl-glue.h $(root)$(incdir)
 
 
 clean: 
diff -ru STk-3.99.4/Tcl/Makefile.in~ STk-3.99.4/Tcl/Makefile.in
--- STk-3.99.4/Tcl/Makefile.in~	Wed Feb  3 10:16:01 1999
+++ STk-3.99.4/Tcl/Makefile.in	Wed Feb  3 10:39:57 1999
_at_@ -35,7 +35,7 @@
 	ar q libevtcl.a $(EVWINOBJ)
 	$(RANLIB) libevtcl.a
 
-install: all
+install:
 
 install.libs: install
 	-if [ ! -d $(ardir) ] ; then mkdir -p $(ardir); fi 
------------------------ Cut Here ------------------------
Received on Wed Feb 03 1999 - 22:06:52 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST