2024-06-20 00:34:32 +00:00
|
|
|
# libmp | MatterLinux package management library
|
|
|
|
The core library for [`mp`](https://git.matterlinux.xyz/Matter/mp), it has
|
|
|
|
components for transferring, installing, updating and removing packages.
|
|
|
|
|
|
|
|
### Installation
|
|
|
|
If you are using MatterLinux, this package is most likely already installed,
|
|
|
|
as it's a core component of the system. If you are not, then you can build
|
|
|
|
it from the source and install it.
|
|
|
|
|
|
|
|
To this you will need the following tools and libraries:
|
|
|
|
- gcc
|
|
|
|
- make
|
|
|
|
- libarchive
|
|
|
|
- libinih
|
|
|
|
- gettext
|
2024-07-08 09:49:22 +00:00
|
|
|
- sqlite3
|
2024-06-20 00:34:32 +00:00
|
|
|
- gpgme
|
|
|
|
|
|
|
|
After installing these dependencies, you should download the latest release.
|
|
|
|
If you are building this library for development purposes, then you may also
|
|
|
|
build from the latest commit. However latest commit may not always be compilable.
|
|
|
|
|
|
|
|
After obtaining the source code, you can compile the library using the make
|
|
|
|
tool:
|
|
|
|
```bash
|
|
|
|
make
|
|
|
|
```
|
|
|
|
|
|
|
|
To install the library you can use the make tool again:
|
|
|
|
```bash
|
|
|
|
make install
|
|
|
|
```
|
|
|
|
|
|
|
|
### Tutorial and examples
|
|
|
|
MatterLinux wiki has a [tutorial for working with this library](https://matterlinux.xyz/wiki/libmp).
|
|
|
|
There are also some simple examples under the `examples/` directory, you can build these examples
|
|
|
|
using make:
|
|
|
|
```bash
|
|
|
|
make examples
|
|
|
|
```
|
|
|
|
To run the examples, specify the library path:
|
|
|
|
```bash
|
2024-07-08 09:49:22 +00:00
|
|
|
LD_LIBRARY_PATH=./dist ./dist/server
|
2024-06-20 00:34:32 +00:00
|
|
|
```
|