Le mirroring des dépôts vers Github est maintenant natif dans Gitlab (et donc Framagit). Merci de passer à la fonction native pour que nous puissions couper notre solution maison. Détails sur https://docs.gitlab.com/ee/workflow/repository_mirroring.html#pushing-to-a-remote-repository (pensez à supprimer le webhook de notre solution maison).

Commit a034c174 by Bat

Updated spec and readme

parent cd12529b
# poulp
# Poulp
poulp is like npm, but for Vala.
Poulp is like npm, but for Vala.
It is a little programm that'll help you generating files or projects, compiling your app, or installing librairies.
It is a little programm that'll help you generating files or projects, compiling your app, managing your dependencies and more.
# Usage
## Usage
First, create a `poulp.json` file. You can also use `poulp init` to do it.
First, create a `poulp.toml` file. You can also use `poulp init` to do it.
```json
{
"name": "my-app",
"version": "1.4.6",
"dependencies": {
"gtk+-3.0": "*",
"gio-2.0": "*",
"libsoup-2.4": "*",
"semver": "^0.2.0"
}
}
```toml
name = "my-app"
version = "1.42.0"
[dependencies]
"gtk+3.0" = "*"
"gio-2.0" = "*"
"libsoup-2.4" = "*"
semver = "^0.2.0"
```
Then, open a terminal and just run the following command.
......@@ -36,69 +34,10 @@ valac *.vala -o build/my-app --pkg gtk+-3.0 --pkg gio-2.0 --pkg libsoup-2.4 --pk
If you need some libraries that are not installed, run `poulp install`. With the manifest above, it will probably install a matching version of [`semver`](https://framagit.org/Bat/semver).
When installing a library, it will search for it in remote repositories, clone the matching git repository, compile it for your system and install it.
# Complete manifest
Here is a complete manifest, to let you see all available properties.
```json
{
"name": "my-app",
"version": "0.1.0",
"description": "A cool application",
"keywords": [
"website", "valse", "cool"
],
"homepage": "https://jean.dupont.fr/myapp.html",
"bugs": {
"url": "git.dupont.fr/jean/my-app/issues",
"email": "jean@dupont.fr"
},
"license": "LGPLv4",
"author": "Jean Dupont",
"contributors": [
"Jean Dupont", "Jeanne Dupont"
],
"maintainers": [
"The MyApp maintainment team"
],
"files": [
"*.vala", "*.wala", "models/*.vala", "static/*", "*.gs", "*.c"
],
"repository": "https://git.dupont.fr/my-app.git",
"vapi-dir": "src/vapis/",
"output": "custom-build-path/my-app",
"scripts": {
"test": [
"poulp build",
"./$(POULP_BUILD_OUPUT)"
]
},
"dependencies": {
"gio-2.0": "*",
"valse": "^0.1.2",
},
"dev-dependencies": [
"valadate-0.1"
],
"vala-version": ">=0.20.1",
"compilerParams": [
"-o", "$(POULP_NAME)-$(POULP_VERSION)"
]
}
```
# Available commands
- help - display help messages about poulp and commands
- init - init a new project
- install - install librairies in `poulp.json` or the specified ones
- build - build the project
- lint - lint your code
- repo - manage distant repositories
- run - run a script definde in `poulp.json`
For more informations, please refer to [the website](https://poulp.frama.io).
# Hosting libraries
You can see an exemple repo here : https://gitlab.com/Bat41/poulp-repo-test/tree/master/.
You can see an exemple repo here: https://gitlab.com/Bat41/poulp-repo-test/tree/master/.
You can use it with poulp by doing `poulp repo add https://gitlab.com/Bat41/poulp-repo-test/raw/master/dist`.
# poulp's specification
*This document aims to provide a description of how poulp will work when it will be prouction-ready.*
*This document aims to provide a description of how poulp will work when it will be production-ready.*
## poulp.json
## poulp.toml
The `poulp.json` file contains some [JSON](http://json.org) defining the properties of a project. It is located at the root of the project.
The `poulp.toml` file contains some [TOML](https://github.com/toml-lang/toml) defining the properties of a project. It is located at the root of the project.
It can contains the following keys.
......@@ -12,12 +12,12 @@ It can contains the following keys.
The name of the project. It should only contain (small) letters, numbers or hyphens, and it must start with a letter.
```ruby
"my-project" # correct
"my-project-123" # correct
```toml
name = "my-project" # correct
name = "my-project-123" # correct
"GTK+ App" # Incorrect : capitals, + and space
"42-the-meaning-of-life-etc" # Incorrect : begins with a number
name = "GTK+ App" # Incorrect : capitals, +, and space
name = "42-the-meaning-of-life-etc" # Incorrect : begins with a number
```
*This key is mandatory.*
......@@ -34,7 +34,7 @@ This is just a short description of your package.
### keywords
An array containing strings, which are the keywords of your package. It help people finding them when doing `poulp search`, and on the repositories websites using [poulp server](https://framagit.org/valse/poulp-server).
An array containing strings, which are the keywords of your package. It help people finding them when doing `poulp search`, and on the repositories websites using [poulp server](https://framagit.org/poulp/poulp-server).
### homepage
......@@ -42,26 +42,18 @@ This is a string containing the URL of the projects website.
### bugs
Specifies where to report bugs. It is an object, which can contain this fields.
Specifies where to report bugs. It is an table, which can contain this fields.
- `url`, the bug tracker URL ;
- `email`, an email adress where we can send bug reports.
### license
The name of the license of your project.
The name of the license of your project, or the path to the file containing its license.
### author
### authors
The name of the author of the project. It could contain an email adress after the name, between `<` `>`.
### contributors
A list of the peoples (string looking like the `author` field) who contributed to this project.
### maintainers
A list of the peoples (string looking like the `author` field) who maintains this project.
The names of the authors of the project. They could contain an email adress after the name, between `<` `>`.
### files
......@@ -69,7 +61,7 @@ The files to include at compilation.
### repository
The URL of the projects repository, where we can find the source code.
The URL of the projects repository, where we can find the source code. It will be used when running `poulp publish`.
### vapi-dir
......@@ -77,7 +69,7 @@ The path to a directory containing personal VAPIs.
### output
Where to put the result of the compilation. Defaults to `build/name-version` (where `name` is the name of the project and `version` the version).
Where to put the result of the compilation. Defaults to `build/name-version` (where `name` is the name of the project and `version` its version).
### library
......@@ -85,7 +77,7 @@ A boolean that tells us if this project is a library or not. If it is, it will b
### scripts
Some custom scripts, that can be run whit `poulp run`. It's an object containing the fields you want (their name will be used as the argument of `poulp run`). Each of those fields are arrays with the list of the command to run.
Some custom scripts, that can be run whit `poulp run`. It's a table containing the fields you want (their name will be used as the argument of `poulp run`). Each of those fields are arrays with the list of the command to run.
### dependencies
......@@ -99,7 +91,30 @@ Same as `dependencies`, but will only be installed by people developing the proj
### vala-version
The minimal Vala version to use with this project.
The Vala version to use with this project. It is also a semantic versionning range.
### features
Compiler features that can be enabled or disabled. This table contains only booleans (`true` means enables, `false` disabled). Available features are:
- fast-vapi, to generate fast `.vapi` files, without "absolute" symbols (e.g `using Gtk;` and `Button` instead of `Gtk.Button`)
- vapi-comments, to keep comments in `.vapi`
- debug, to make your project easily debuggable with `gdb`
- thread, to enable multithreading support in the compiler
- memory-profiler, to enable GLib memory profiler
- standard-packages, to disable packaging `glib-2.0`, `gobject-2.0` and `gmodule-2.0`
- assert, to disable `assert`
- checking, to enable `checking`
- deprecated, to allow the `[Deprecated]` attribute
- hide-internal, to mark `internal` symbols as `private` in C code (`internal` doesn't exist in C)
- experimental, to enable experimental features
- warnings, to turn off warnings
- fatal-warnings, if you want warnings to make your build failing
- since-check, to avoid checking if the symbol exists in local packages
- non-null, to ensure that nothing is never `null`
- gobject-tracing, to turn on GObject tracing
- version-header, if you want to write the valac version in the `.h` file
- c-warnings, to turn off c warnings
### compiler-params
......@@ -217,7 +232,7 @@ The remote repositories just contains one file, named `packages.json`. It contai
This file has an object, named `packages` which contains key-value pairs of packages (the name is the key, and the git repository the value).
*Example `package.json` file*
*Example `packages.json` file*
```
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment