ynspkg/README.md

56 lines
1.2 KiB
Markdown
Raw Normal View History

2025-01-05 14:22:47 +01:00
# YNS Package Manager
2025-01-05 15:29:19 +01:00
Simple package manager for Linux. Uses JSON for package definitions.
2025-01-05 14:22:47 +01:00
2025-01-05 15:29:19 +01:00
## Build
2025-01-05 14:22:47 +01:00
2025-01-05 15:29:19 +01:00
Install dependencies:
2025-01-05 14:22:47 +01:00
```bash
2025-01-05 15:32:59 +01:00
sudo apt-get install build-essential cmake libssl-dev zlib1g-dev nlohmann-json3-dev
2025-01-05 14:22:47 +01:00
```
2025-01-05 15:32:59 +01:00
We build our own curl because the system's libcurl is usually only available as a dynamic library. Building our own lets us:
- Create a static binary that works everywhere
- Include only the features we need (HTTP support)
- Avoid dependency problems during static linking
2025-01-05 14:22:47 +01:00
2025-01-05 15:29:19 +01:00
Build steps:
2025-01-05 14:22:47 +01:00
```bash
2025-01-05 15:32:59 +01:00
# Get the code
git clone https://github.com/spitkov/ynspkg.git
cd ynspkg
# Build static curl
chmod +x build_curl.sh
./build_curl.sh
# Build yns
2025-01-05 15:29:19 +01:00
mkdir build && cd build
2025-01-05 14:22:47 +01:00
cmake ..
make
```
## Usage
```bash
2025-01-05 15:29:19 +01:00
yns update # Update package cache
yns install <package> # Install package
yns remove <package> # Remove package
yns upgrade <package> # Upgrade package
yns list # List packages
yns debug # Show debug info
yns interactive # Interactive mode
2025-01-05 14:22:47 +01:00
```
2025-01-05 15:29:19 +01:00
## Package Format
2025-01-05 14:22:47 +01:00
2025-01-05 15:29:19 +01:00
```json
{
"packages": {
"package-name": {
"version": "1.0.0",
"description": "Package description",
"install_script": "#!/bin/bash\n# Installation commands"
}
}
}