From 922aafdcbfc7c48485c403a21b78fa1fb51c305c Mon Sep 17 00:00:00 2001 From: michel-schinz Date: Mon, 17 May 2004 20:11:17 +0000 Subject: [PATCH] *** empty log message *** --- pkg-def.scm | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 pkg-def.scm diff --git a/pkg-def.scm b/pkg-def.scm new file mode 100644 index 0000000..5bca348 --- /dev/null +++ b/pkg-def.scm @@ -0,0 +1,42 @@ +;; Package definition for the installation library itself. + +;; Template for scsh-install-pkg script, must be plugged with the +;; directory containing the Scheme code. +(define scsh-install-pkg-template #<" #t #f #f + ,identity ,identity))) + + (let ((bindir (get-option-value 'bindir))) + (if (not bindir) + (display-error-and-exit + "no binary directory specified (use --bindir option).")) + + ;; Install "package" part (doc & Scheme code) + (install-file "doc/proposal.pdf" 'doc "pdf") + (install-files '("scheme/install-lib.scm" "scheme/install-lib-module.scm") + 'scheme) + (write-to-load-script + `((config) + (load ,(absolute-file-name "install-lib-module.scm" + (get-directory 'scheme #f))) + (user))) + + ;; Install "program" part (scsh-install-pkg script). + (if (or (get-option-value 'dry-run) (get-option-value 'verbose)) + (format #t "creating scsh-install-pkg script in ~a\n" bindir)) + + (if (not (get-option-value 'dry-run)) + (begin + (create-directory&parents bindir #o755) + (call-with-output-file (absolute-file-name "scsh-install-pkg" bindir) + (lambda (port) + (format port scsh-install-pkg-template (get-directory 'base #f)) + (set-file-mode port #o755)))))))