### 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:
3. Build and generate the binary package for your desired Lua flavor (e.g., Lua 5.4):
```bash
```bash
cd /usr/ports/sysutils/lua-sysmount
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
```bash
sudo make FLAVOR=lua53 install clean
sudo make FLAVOR=lua54 install clean
```
```
### Method 2: Manual Standalone Build
### 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
```bash
# Clone the repository and navigate to the source directory
git clone https://github.com
cd lua-sysmount/src
cd lua-sysmount/src
# Compile and install globally
make
make
sudo make install
sudo make install
make clean
make clean
@ -59,8 +63,8 @@ You can test the native binding directly from your interactive Lua shell: