utility for creating .rpkg packages
| main.cpp | ||
| Makefile | ||
| README.md | ||
rpkgbuild
A package builder tool for creating .rpkg packages.
Usage
Basic Command
rpkgbuild -d <pkg_dir> [-o <out_dir>]
Options
| Option | Description |
|---|---|
-d <dir> |
Directory containing the package template (required) |
-o <dir> |
Output directory for the compiled .rpkg file (default: .) |
-h, --help |
Display help message |
Package structure
An rpkgbuild template follows this directory structure:
example_pkg_tpl_dir/
├── meta/
│ ├── info (required: package metadata)
│ ├── deps (required: dependencies list)
│ └── hooks/ (optional: installation scripts)
│ ├── preinst
│ ├── postinst
│ ├── prerm
│ └── postrm
└── data/ (required: files to be installed)
├── usr/
├── etc/
└── ...
meta/info
Required fields: name, version, arch, size
Optional fields: desc, url, lic, maintainer
Example:
name="curl"
version="8.7.1"
arch="x86_64"
desc="Tool for transferring data with URL syntax"
url="https://curl.se"
lic="MIT"
maintainer="Jane <jane@example.org>"
size="207136"
meta/deps
Supported operators: >=, <=, =, >, <
No operator = any version
Leave empty if no dependencies
Example
glibc>=2.38
zlib>=1.2.11
openssl>=3.0.0
Installation Hooks
All scripts receive a $PREFIX argument.
meta/hooks/preinst Runs before package installation.
meta/hooks/postinst Runs after package installation.
meta/hooks/prerm Runs before package removal.
meta/hooks/postrm Runs after package removal.