Fixed #224: added sites managment. #229
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It adds a
[sites]
section in packages' description. In this section, one can declare the sites to use and what files must be installed in it. As we follow the generaldune
semantic, only the following root sites are available:lib
bin
sbin
toplevel
share
etc
stublibs
doc
man
Each of those fields takes an array of site specification with the following fields:
root
: a flag indicating if we use the root section or not (only forlib
andshare
, default is false)exec
: a flag indicating if files installed in this site must have the executable flag setdir
: the directory name of the siteinstall
: the files to be installed in this site.The installation specification is a table with the following fields:
source
: the source file, directory or glob to installdestination
: where to install sourcerecursive
: recursively install the subdirectories.For example,
will install all javascript files in the
javascript
dir of the package into<prefix>/share/<package>/www/js
directory.The custom installed files are dynamically available at runtime through the module
Sites
. The module name can be changedwith the field
name
of sectionsites
. The module itself exports an innerSites
module with values corresponding to the filesinstalled. With the previous example :
Will provide the value
Mysites.Sites.www
which is a list of the installed javascript files.