Dear all,
I have now created a module in scsh's CVS repository (on sourceforge)
called "scsh-packages" to contain everything related to the packaging
proposal. For now, that's the proposal itself, and the installation
library.
The proposal document is still the "old" one, which doesn't talk about
layouts yet. I'll try to change it quickly.
As far as the installation library is concerned, I have done the
following to try to keep as much historical information as possible:
- version 1.1 of install-lib.scm is my original one, without David's
modifications, and without layouts,
- version 1.2 is David's version,
- version 1.3 is David's version with layouts added (including options
--layout-to and --layout-from, as promised).
This should make it easy to see what changed between these versions.
I've also stolen the file "configure.scm" from the scx repository, as I
need it to compute the name of the platform-dependent "lib"
subdirectory for the "scsh" layout.
To give you an idea of what a typical package definition file looks
like now, here is what I currently have for sunet (beware, still
incorrect in some respects!):
----------
(define-package "sunet" (2 0) ()
(install-files '("README" "RELEASE" "COPYING") 'doc)
(install-directory-contents "doc" 'doc)
(install-directory-contents "scheme" 'scheme)
(install-directory "web-server" 'misc-shared)
(install-file "start-web-server" 'scheme "examples")
(call-with-output-file (absolute-file-name "load.scm"
(get-directory 'base #t))
(lambda (port)
(for-each (lambda (e) (write e port) (newline port))
`((config)
(load ,(absolute-file-name "packages.scm"
(get-directory 'scheme
#f))))))))
----------
Some quick notes about layouts: as explained previously, a layout says
where to put different kinds of data. Currently, the following
locations are defined in a layout:
base
Directory containing the package loading script, "load.scm".
misc-shared
Directory containing miscellaneous data, which does not belong to
any other directory, and which is shared among all architectures.
scheme
Directory containing all Scheme code.
lib
Directory containing architecture-dependent libraries.
doc
Directory containing the documentation.
active
Directory containing a link called "<package>", pointing to
"<base>".
The name of a location has to be passed to all installation procedures,
as can be seen in the example above. We will certainly need other
"locations", I'm waiting for ideas.
Michel.
|