Example installation: Xgopher

Xgopher is another gopher client. It is used as an example of how to install a typical X11 application (using imake for configuration.

We start by installing the source code (fetching, checking directories and finally unpacking the software):

khym:/store/store/khym$ mkdir xgopher
khym:/store/store/khym$ cd xgopher
khym:/store/store/khym/xgopher$ ftp ugle.unit.no
...
khym:/store/store/khym/gopher$ zcat xgopher.1.2.tar.Z _ tar tvf -
  [...]
khym:/store/store/khym/gopher$ zcat xgopher.1.2.tar.Z _ tar xvf -
  [...]
khym:/store/store/khym/gopher$ mv xgopher.1.2 src-1.2
khym:/store/store/khym/gopher$ rm xgopher.1.2.tar.Z

We then create the build tree:

khym:/store/store/khym/xgopher$ shadow
Which machine? [khym] ?
Which application? [xgopher] ?
What version? [1.2] ?
What architechture(s) [sparc] ?
Protecting original source in src-1.2
Shadowing from ../src-1.2 to src-1.2-sparc
../src-1.2/bitmaps:
Making version tree ver-1.2

We now have to do the necessary changes to make the application compile on a Sparc platform. It this case we see from the installation documentation that we need to do some changes in the Imakefile and the file conf.h.

We also need to change the applications defaults file and the help file to use Store. Many X applications have an app-defaults file so it is worth noting that this file must but put into the /store/lib/X11/app-defaults directory, so that the application will be able to find it. If you wish to change the default choices of colors, fonts and so on, you can do modifications to the effect in the installed application defaults file

/store/store/khym/xgopher/ver-1.2/lib/X11/app-defaults/Xgopher

For the X libraries to be able to find it at this location (rather than in the default hardwired directory), we need to set the environment variable XFILESEARCHPATH correctly (this is done in the default X setup for the site). The location of the help-file is hardwired into the xgopher application, so this just needs to be set correctly in the Imakefile.

The changes in the conf.h file are mainly gopher setup information which we will not touch in this example.

After changing Imakefile and conf.h the commend sequence xmkmf; make will do most of the work.

In this example as well we will do most of the installation manually (from the directory /store/store/khym/xgopher/src-1.2-sparc:

$ make -n install
if [ -d /local/X11/bin ]; then set +x; else (set -x; /bin/sh
/local/X11/bin/mkdirhier /local/X11/bin); fi
install -c   xgopher /local/X11/bin
if [ -d /store/lib ]; then set +x; else (set -x; /bin/sh
/local/X11/bin/mkdirhier /store/lib); fi
install -c -m 0444 xgopher.help /store/lib
if [ -d /store/lib/X11/app-defaults ]; then set +x; else (set -x; /bin/sh
/local/X11/bin/mkdirhier /store/lib/X11/app-defaults); fi
install -c -m 0444 Xgopher.ad /store/lib/X11/app-defaults/Xgopher
if [ -d /store/lib/X11/app-defaults ]; then set +x; else (set -x; /bin/sh
/local/X11/bin/mkdirhier /store/lib/X11/app-defaults); fi
install -c -m 0444 Xgopher-color.ad
/store/lib/X11/app-defaults/Xgopher-color
echo "install in . done"
$ make -n install.man
make -n install.man
if [ -d /local/X11/man/man1 ]; then set +x; else (set -x; /bin/sh
/local/X11/bin/mkdirhier /local/X11/man/man1); fi
install -c -m 0444 xgopher.man /local/X11/man/man1/xgopher.1
echo "install.man in . done"
$ mkdir ../ver-1.2/bin
$ mkdir ../ver-1.2/lib
$ mkdir ../ver-1.2/lib/X11
$ mkdir ../ver-1.2/lib/X11/app-defaults
$ mkdir ../ver-1.2/man
$ mkdir ../ver-1.2/man/man1
$ cp xgopher ../ver-1.2/bin/xgopher@sparc
$ cp Xgopher.ad ../ver-1.2/lib/X11/app-defaults/Xgopher
$ cp xgopher.man ../ver-1.2/man/man1/xgopher.1

In the same way as for the text based gopher client example, xgopher can be compiled for an SGI architecture on the file server flory. This examples shows the commands only (output removed in the interest of brevity):

/store/store/flory$ mkdir xgopher-c
/store/store/flory$ cd xgopher-c
/store/store/flory/xgopher-c$ shadow
/store/store/flory/xgopher-c$ cd src-1.2-sgi
/store/store/flory/xgopher-c/src-1.2-sgi$ rm Imakefile conf.h
/store/store/flory/xgopher-c/src-1.2-sgi$
      cp /store/store/khym/xgopher/src-1.2-sparc/Imakefile .
/store/store/flory/xgopher-c/src-1.2-sgi$
      cp /store/store/khym/xgopher/src-1.2-sparc/conf.h .
/store/store/flory/xgopher-c/src-1.2-sgi$ vi Imakefile
/store/store/flory/xgopher-c/src-1.2-sgi$ xmkmf
/store/store/flory/xgopher-c/src-1.2-sgi$ make

We then skip back to khym and do the installation of the executable by hand (that is: copy the file /store/store/flory/xgopher-c/src-1.2-sgi/xgopher over to /store/store/khym/xgopher/ver-1.2/bin/xgopher@sgi.

We then register xgopher:

What application [/store/store/khym/xgopher] ? 
Short name  ... ... [xgopher] ? 
Full name . ... ... [X gopher grensesnitt] ? 
Version ... ... ... [1.2] ? 
Program Type .. ... (? for liste) [FO] ? 
License Type .. ... (? for liste) [Fri] ? 
Signature . ... ... [TIW] ? 
Short Description . ... ... ... (max 30 chars) [X client to gopher] ?
   ==>                              <==
Architectures . ... [m68ksr10 sparc sgi dsult4 m88k38a] ? 
Manual Pages .. ... ('=' to reevaluate) [none] ? 
Other Documentation ('=' to reevaluate) [none] ? 
Emacs Info  ... ... ('=' to reevaluate) [none] ? 
Online Help ... ... [some, press '?'] ? 
Examples .. ... ... ('=' to reevaluate) [none] ? 
Init Files  ... ... ('=' to reevaluate) [none] ? 
Importance  ... ... [2] ? 
Source Code ... ... ('=' to reevaluate) [79-files 480-kb] ? 
Source  ... ... ... [ftp.cso.uiuc.edu:uiuc/src/xgopher-1.2.tar.Z] ? 
Nightly Command ... [] ? 
Not Links . ... ... [] ? 
Current description is:
: Nice-looking interface to the gopher services. Quite unusable.
: Actually much better, almost usable, in version 1.2!
Do you want to edit the description [N]? 
Enter text to be appended (terminate with '.')
.

Note that in this example version 1.1 had already been installed. The description partially refers to the previous version.

Up : Installing software in STORE, Previous: Example installation: Gopher, Next : Installing emacs lisp packages.

Index

arnej@lise.unit.no