Browse Source

Update README.md

master
Sergey Kiselev 5 months ago
parent
commit
5bc1a902d8
  1. 30
      README.md

30
README.md

@ -15,34 +15,38 @@ This module allows Lua scripts to query active storage mounts and filesystem typ
## Installation
### Method 1: Build & Install via FreeBSD Ports Framework (Recommended)
### Method 1: Build & Install via FreeBSD Ports Framework
This method automatically handles Lua `FLAVORS` and registers the module in the system package database (`pkg`).
Use this method to compile the module as a native FreeBSD package (`pkg`) with full `FLAVORS` support. The port is configured to securely fetch the release archive directly from the Gitea repository attachments.
1. Copy the port directory to your local ports tree:
1. Clone this repository and navigate to the directory:
```bash
cp -R port/sysutils/lua-sysmount /usr/ports/sysutils/
git clone https://github.com
cd lua-sysmount
```
2. Build and install for your default Lua version (e.g., Lua 5.4):
2. Symlink the port skeleton into your system's ports tree:
```bash
sudo ln -s \$(pwd)/freebsd-port/sysutils/lua-sysmount /usr/ports/sysutils/lua-sysmount
```
3. Build and generate the binary package for your desired Lua flavor (e.g., Lua 5.4):
```bash
cd /usr/ports/sysutils/lua-sysmount
sudo make install clean
sudo make FLAVOR=lua54 package
```
3. Alternatively, target a specific Lua flavor (e.g., Lua 5.3):
4. Install the newly created package:
```bash
sudo make FLAVOR=lua53 install clean
sudo make FLAVOR=lua54 install clean
```
### Method 2: Manual Standalone Build
If you don't want to use the ports tree, you can compile the `.so` module directly in any directory. It will use `pkg-config` to discover your active Lua setup.
If you don't want to use the ports tree infrastructure, you can compile and install the `.so` module directly from the source directory using `pkg-config`.
```bash
# Clone the repository and navigate to the source directory
git clone https://github.com
cd lua-sysmount/src
# Compile and install globally
make
sudo make install
make clean