#Last updated: "2004/12/16 14:29:03 UTC leifer". # Notes on installing local software # This was quickly hacked up by James Leifer and is probably full of # bugs. No warrenties, no support. Please don't use these recipes # instead of thinking for yourself or else *anything* could happen. #--------------------------------------------------------------- # STRATEGY # # we install into, for example, /opt/ocaml/3.07pl2/ and we then # symlink from /usr/local . this way we can easily uninstall by # searching for symlinks #--------------------------------------------------------------- # GENERAL ASSUMPTIONS # umask 022 export OLDMYPREFIX=#/opt/ocaml/3.06 for example; **think**: put in the old prefix (if any) export MYPREFIX=#/opt/ocaml/3.07pl2 for example; **think**: put in the new prefix sudo mkdir -p "$MYPREFIX" sudo chown leifer:moscova "$MYPREFIX" #-------------------------------------------------------------------- # GENERAL UNINSTALL PROCEDURE # #as **root**, view the links to it: ( if test "z$OLDMYPREFIX" = "z"; then echo stopping: please set OLDMYPREFIX first; exit 1; fi ) && \ find /usr/local -type l -lname "$OLDMYPREFIX"/\* -exec echo "{}" \; #if ok, rerun replacing echo by rm #--------------------------------------------------------------------- # GENERAL INSTALL PROCEDURE # # as **root** ( if test "z$MYPREFIX" = "z"; then echo stopping: please set MYPREFIX first; exit 1; fi ) && \ chown -R root.root "$MYPREFIX" && \ cd /usr/local/bin && ln -s "$MYPREFIX"/bin/* . && \ for m in "$MYPREFIX"/man/man?/*; do test -f "$m" && cd /usr/local`dirname "${m#"$MYPREFIX"}"` && ln -s "$m" .; done && \ cd /usr/local/info && for i in "$MYPREFIX"/doc/info/*; do test -f "i" && ln -s "$i" . ; done #todo: add the info pages to the database #-------------------------------------------------------------------------- # ocaml and freshocaml # #first, follow GENERAL ASSUMPTIONS #as **root** and as **user**, choose the emacs version (emacs -version) #export MYEMACSVERSION=21.2.1 #as **user** we have -refman.txt -refman.html -refman.html.tar.gz -refman.info.tar.gz #and the untarred tarball #cd to the untarred source dir #compile and install (if test "z$MYPREFIX" = "z"; then echo stopping: please set MYPREFIX first; exit 1; fi ) && \ ./configure -prefix "$MYPREFIX" >log.configure 2>&1 && \ echo ./configure done && \ make world >log.world 2>&1 && \ echo make world done && \ make bootstrap >log.bootstrap 2>&1 && \ echo make bootstap done && \ echo ok || echo error! #only for ocaml make opt >log.opt 2>&1 && \ echo make opt done && \ make opt.opt >log.opt.opt 2>&1 && \ echo make opt.opt done #for both make install >log.install 2>&1 && \ echo make install done && \ echo ok || echo error! #then delete the 'useful' (sic) colors block from emacs/caml-font.el # then do ( cd emacs && EMACSDIR="$MYPREFIX"/emacs make >log.emacs 2>&1 && \ make install-ocamltags >log.camltags 2>&1 && \ echo ok ) mkdir "$MYPREFIX"/doc && cp ocaml-3.07-refman.txt ocaml-3.07-refman.html "$MYPREFIX"/doc && zcat ocaml-3.07-refman.html.tar.gz | (cd "$MYPREFIX"/doc && tar -xf - ) && zcat ocaml-3.07-refman.info.tar.gz | (cd "$MYPREFIX"/doc && tar -xf - && mv infoman info ) #follow the GENERAL INSTALL PROCEDURE (as **root**) if you want to install system wide # then, as **root** ( if test "z$MYEMACSVERSION" = "z"; then echo stopping: please set MYEMACSVERSION first; exit 1; fi ) && \ cd /usr/local/share/emacs/"$MYEMACSVERSION"/site-lisp && ln -s "$MYPREFIX"/emacs/* . # as **root**, choose one of the following: #cd /usr/local/lib && ln -s "$MYPREFIX"/lib/ocaml #cd /usr/local/lib && ln -s "$MYPREFIX"/lib/fresh-ocaml # as **root**, change the ownership back: chown -R root:root "$MYPREFIX" #-------------------------------------------------------------------- # spamoracle # # follow the GENERAL ASSUMPTIONS # follow the GENERAL UNINSTALL PROCEDURE #as **user** in the untarred source directory cp Makefile Makefile.orig && \ { echo BINDIR="$MYPREFIX"/bin && echo MANDIR="${MYPREFIX}"/man && grep -v -E '^BINDIR=|^MANDIR=' Makefile.orig; } > Makefile && \ mkdir -p "$MYPREFIX"/bin && \ mkdir -p "$MYPREFIX"/man/man{1,5} && \ make all install # follow the GENERAL INSTALL PROCEDURE #Local Variables: #time-stamp-format: "%04Y/%02m/%02d %02H:%02M:%02S UTC %u" #time-stamp-time-zone: "UTC" #time-stamp-start: "#Last updated:[ ]+\\\\?[\"<]+" #End: