Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle sites #224

Open
Ninjapouet opened this issue Jul 9, 2024 · 0 comments · Fixed by #229
Open

Handle sites #224

Ninjapouet opened this issue Jul 9, 2024 · 0 comments · Fixed by #229
Labels
enhancement New feature or request

Comments

@Ninjapouet
Copy link

Going on with shared/etc/misc files sites is quite common and dune has some support for it. We should add this support also.

@Ninjapouet Ninjapouet added the enhancement New feature or request label Jul 9, 2024
Ninjapouet pushed a commit to Ninjapouet/drom that referenced this issue Jul 15, 2024
It adds a `[sites]` section in packages' description. In this section, one can declare the sites like `etc = ["conf"]` which will trigger the `etc/<package>/conf` directory.

As we follow the general `dune` semantic, only the following root sites are available:
- `lib`
- `bin`
- `sbin`
- `toplevel`
- `share`
- `etc`
- `stublibs`
- `doc`

For `lib` and `share`, additionnal specification must be provided :
```
[[sites.lib]]
root = false
exec = true
dir = "foo"

[[sites.share]]
root = true
dir = "www"
```

`root` means that `<package>` subdir shall be ignored (default is `false`) and `exec` means that executable flag must be set for files installed here (ignore in `share` and default is `false`).

By default, the generated dynamic sites modules is "Sites" accessible through `<package module>.Sites". One can modify this name in `name` field :
```
[sites]
name = "mysites"
```
will provide the `Mysites` module instead of `Sites`.
Ninjapouet pushed a commit to Ninjapouet/drom that referenced this issue Jul 15, 2024
It adds a `[sites]` section in packages' description. In this section, one can declare the sites like `etc = ["conf"]` which will trigger the `etc/<package>/conf` directory.

As we follow the general `dune` semantic, only the following root sites are available:
- `lib`
- `bin`
- `sbin`
- `toplevel`
- `share`
- `etc`
- `stublibs`
- `doc`

For `lib` and `share`, additionnal specification must be provided :
```
[[sites.lib]]
root = false
exec = true
dir = "foo"

[[sites.share]]
root = true
dir = "www"
```

`root` means that `<package>` subdir shall be ignored (default is `false`) and `exec` means that executable flag must be set for files installed here (ignored in `share` and default is `false`).

By default, the generated dynamic sites modules is "Sites" accessible through `<package module>.Sites`. One can modify this name in `name` field :
```
[sites]
name = "mysites"
```
will provide the `Mysites` module instead of `Sites`.
Ninjapouet pushed a commit to Ninjapouet/drom that referenced this issue Jul 16, 2024
It adds a `[sites]` section in packages' description. In this section, one can declare the sites like `etc = ["conf"]` which will trigger the `etc/<package>/conf` directory.

As we follow the general `dune` semantic, only the following root sites are available:
- `lib`
- `bin`
- `sbin`
- `toplevel`
- `share`
- `etc`
- `stublibs`
- `doc`

For `lib` and `share`, additionnal specification must be provided :
```
[[sites.lib]]
root = false
exec = true
dir = "foo"

[[sites.share]]
root = true
dir = "www"
```

`root` means that `<package>` subdir shall be ignored (default is `false`) and `exec` means that executable flag must be set for files installed here (ignored in `share` and default is `false`).

By default, the generated dynamic sites modules is "Sites" accessible through `<package module>.Sites`. One can modify this name in `name` field :
```
[sites]
name = "mysites"
```
will provide the `Mysites` module instead of `Sites`.
Ninjapouet pushed a commit to Ninjapouet/drom that referenced this issue Jul 16, 2024
It adds a `[sites]` section in packages' description. In this section, one can declare the sites like `etc = ["conf"]` which will trigger the `etc/<package>/conf` directory.

As we follow the general `dune` semantic, only the following root sites are available:
- `lib`
- `bin`
- `sbin`
- `toplevel`
- `share`
- `etc`
- `stublibs`
- `doc`

For `lib` and `share`, additionnal specification must be provided :
```
[[sites.lib]]
root = false
exec = true
dir = "foo"

[[sites.share]]
root = true
dir = "www"
```

`root` means that `<package>` subdir shall be ignored (default is `false`) and `exec` means that executable flag must be set for files installed here (ignored in `share` and default is `false`).

By default, the generated dynamic sites modules is "Sites" accessible through `<package module>.Sites`. One can modify this name in `name` field :
```
[sites]
name = "mysites"
```
will provide the `Mysites` module instead of `Sites`.
Ninjapouet pushed a commit to Ninjapouet/drom that referenced this issue Jul 18, 2024
Ninjapouet pushed a commit to Ninjapouet/drom that referenced this issue Jul 19, 2024
@Ninjapouet Ninjapouet linked a pull request Jul 19, 2024 that will close this issue
lefessan added a commit that referenced this issue Jul 19, 2024
Fixed #224: added sites managment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant