From 0a7ada489d96713244ba998dee4b40817e980f51 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Tue, 3 Feb 2004 13:51:51 +0000 Subject: [PATCH] + Install example scripts + Use library search path to find SUnet in example scripts + Add option to install without SSAX --- Makefile | 16 ++++++++-------- pkg-def.scm | 40 +++++++++++++++++++++++++-------------- start-extended-web-server | 4 ++-- start-surflet-server | 7 +------ start-web-server | 4 ++-- 5 files changed, 39 insertions(+), 32 deletions(-) diff --git a/Makefile b/Makefile index 304fa28..303dad9 100644 --- a/Makefile +++ b/Makefile @@ -6,14 +6,14 @@ distname = sunet-$(version_id) distdir = /tmp -DISTFILES = COPYING README RELEASE \ - pkg-def.scm install-lib-module.scm install-lib.scm install-pkg \ - Makefile scheme/packages.scm \ - start-web-server \ - scheme/httpd/*.scm scheme/httpd/surflets/*.scm \ - scheme/ftpd/*.scm scheme/lib/*.scm \ - doc/pdf/sunet.pdf doc/html \ - doc/latex/*.tex doc/latex/*.sty doc/latex/*.t2p doc/latex/*.hdir \ +DISTFILES = COPYING README RELEASE \ + pkg-def.scm install-lib-module.scm install-lib.scm install-pkg \ + Makefile scheme/packages.scm \ + start-web-server start-extended-web-server start-surflet-server \ + scheme/httpd/*.scm scheme/httpd/surflets/*.scm \ + scheme/ftpd/*.scm scheme/lib/*.scm \ + doc/pdf/sunet.pdf doc/html \ + doc/latex/*.tex doc/latex/*.sty doc/latex/*.t2p doc/latex/*.hdir \ web-server sunet-$(version_id).tar.gz: diff --git a/pkg-def.scm b/pkg-def.scm index c5d077c..9756515 100644 --- a/pkg-def.scm +++ b/pkg-def.scm @@ -1,17 +1,29 @@ -(define-package "sunet" (2 1) () - (install-directory-contents "scheme" 'scheme) - (install-directory "web-server" 'misc-shared) - (install-directory-contents "doc" 'doc) +(define-package "sunet" (2 1) + ((options (with-surflets "Install with SUrflets (requires SSAX)" "" #t #t #t + ,parse-boolean ,show-boolean))) + (let ((surflets? (get-option-value 'with-surflets))) + (install-directory-contents "scheme" 'scheme) + (install-directory "web-server" 'misc-shared) + (install-file "start-web-server" 'misc-shared "web-server") + (install-file "start-extended-web-server" 'misc-shared "web-server") + (if surflets? + (install-file "start-surflet-server" 'misc-shared "web-server")) + (install-directory-contents "doc" 'doc) - (let ((doc-dir (get-directory 'doc #t)) - (misc-shared-dir (get-directory 'misc-shared #t))) - (create-symlink (string-append doc-dir "/html") - (string-append misc-shared-dir "/web-server/root/htdocs/sunet-manual"))) + (let ((doc-dir (get-directory 'doc #t)) + (misc-shared-dir (get-directory 'misc-shared #t))) + (create-symlink (string-append doc-dir "/html") + (string-append misc-shared-dir + "/web-server/root/htdocs/sunet-manual"))) + - (let ((scheme-dir (get-directory 'scheme #t))) - (write-to-load-script - `((user) - (config) - (load ,(string-append scheme-dir "/packages.scm")) - (user)))) + (let ((scheme-dir (get-directory 'scheme #t))) + (write-to-load-script + `((user) + (config) + (load ,(string-append scheme-dir "/packages.scm")) + ,@(if surflets? + `((load ,(string-append scheme-dir "/httpd/surflets/packages.scm"))) + '()) + (user))))) ) diff --git a/start-extended-web-server b/start-extended-web-server index 75af5ea..b863e19 100755 --- a/start-extended-web-server +++ b/start-extended-web-server @@ -1,6 +1,6 @@ #!/bin/sh echo "Loading..." -exec scsh +lpsd -ll packages.scm -dm -o http-test -e main -s "$0" "$@" +exec scsh -lel sunet-2.1/load.scm -dm -o http-test -e main -s "$0" "$@" !# (define-structure http-test @@ -160,4 +160,4 @@ exec scsh +lpsd -ll packages.scm -dm -o http-test -e main -s "$0" "$@" ;;; Local Variables: ;;; mode:scheme -;;; End: \ No newline at end of file +;;; End: diff --git a/start-surflet-server b/start-surflet-server index 25ccca2..d38c98b 100755 --- a/start-surflet-server +++ b/start-surflet-server @@ -1,12 +1,7 @@ #!/bin/sh echo "Loading..." -# $sunetscheme is either $SUNET/scheme or $PWD/scheme -# Kind of a hack, I know. We're still waiting for this library -#installing system. -sunetscheme=${SUNET:-$PWD}/scheme -ssaxhome=${SSAX:-../SSAX} # path to SSAX -exec scsh -lm $sunetscheme/packages.scm -lm $ssaxhome/lib/packages.scm -lm $sunetscheme/httpd/surflets/packages.scm -dm -o surflet-server -e main -s "$0" "$@" +exec scsh -lel sunet-2.1/load.scm -lel ssax/load.scm -dm -o surflet-server -e main -s "$0" "$@" !# (define-structure surflet-server diff --git a/start-web-server b/start-web-server index dc6aa8c..4c5d725 100755 --- a/start-web-server +++ b/start-web-server @@ -1,6 +1,6 @@ #!/bin/sh echo "Loading..." -exec scsh +lpsd -ll packages.scm -dm -o http-test -e main -s "$0" "$@" +exec scsh -lel sunet-2.1/load.scm -dm -o http-test -e main -s "$0" "$@" !# (define-structure http-test @@ -137,4 +137,4 @@ exec scsh +lpsd -ll packages.scm -dm -o http-test -e main -s "$0" "$@" ;;; Local Variables: ;;; mode:scheme -;;; End: \ No newline at end of file +;;; End: