diff options
| -rw-r--r-- | Cargo.lock | 1 | ||||
| -rw-r--r-- | README.md | 30 | ||||
| -rw-r--r-- | src/cfg/config.rs | 23 |
3 files changed, 41 insertions, 13 deletions
@@ -398,7 +398,6 @@ checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" name = "mesk" version = "0.1.0" dependencies = [ - "cc", "clap 4.5.53", "i2p", "i2p_client", @@ -2,5 +2,31 @@ **Mesk is a source-based package manager based on i2p protocols, tailored for independence and the absence of spyware.** **Powered by I2P.** -> [!WARNING] -> In work now, no release build. +# Package Structure +`.mesk` - **is a compressed gzip tarball containing information on how to build, configure and install it**. + +``` +# Example file-tree of package.mesk +. +├── BUILD +├── INSTALL +├── LICENSE +├── Makefile +├── SETTS +└── src + ├── some_code.c + └── some_code.rs + +``` + +- **BUILD:** Not required if the package does not require compilation/other assembly +- **INSTALL:** Where or how to install the package? For example, you can just leave make install and the package will be installed by make, not mesk. +- **SETTS:** What needs to be configured after installation? For example, install basic configurations (if this is not done in `INSTALL`) or export environment variables. + + +**Binary packages are also supported, but the default installation is source-based.** +You can set the package compilation parameters in the global /etc/mesk.toml. (Read more in the documentation.) For example, the compiler, optimization level settings, etc. Here we are similar to portage. + +The '.mesk` package can be generated automatically, given that the software is open source and based on standard build systems: `make`, `CMake`, `meson`, `cargo`. If the package does not require compilation, you must specify how and where to install it. + +We only support open source software. Binary builds of proprietary applications will not appear in the official repositories, but, for example, there will be open clients for messengers with a closed backend.
\ No newline at end of file diff --git a/src/cfg/config.rs b/src/cfg/config.rs index ee4e3b7..45be37d 100644 --- a/src/cfg/config.rs +++ b/src/cfg/config.rs @@ -22,10 +22,13 @@ pub struct Config { #[derive(Deserialize, Debug, Serialize)] pub struct Log { - logfile: String, - loglevel: Loglevel, + #[serde(rename = "log_file")] + log_file: String, + #[serde(rename = "log_level")] + log_level: Loglevel, } +// Rename needed for editing mesk.toml file fields but dont touch code. #[derive(Deserialize, Debug, Serialize)] pub struct Repo { #[serde(rename = "repo_url")] @@ -36,10 +39,10 @@ pub struct Repo { #[derive(Deserialize, Debug, Serialize)] pub struct Paths { - #[serde(rename = "cachedir")] - cachedir: String, - #[serde(rename = "builddir")] - builddir: String, + #[serde(rename = "cache_dir")] + cache_dir: String, + #[serde(rename = "build_dir")] + build_dir: String, } impl Config { @@ -58,12 +61,12 @@ impl Config { auto_update: true, }, log: Log { - logfile: String::from("/var/log/mesk.log"), - loglevel: Loglevel::Info, + log_file: String::from("/var/log/mesk.log"), + log_level: Loglevel::Info, }, paths: Paths { - cachedir: String::from("/var/cache/mesk"), - builddir: String::from("/var/lib/mesk"), + cache_dir: String::from("/var/cache/mesk"), + build_dir: String::from("/var/lib/mesk"), }, }; |
