eeaa4ed2df
We'll tune it later.
1.8 KiB
1.8 KiB
Package Generation
This project supports generating both Debian (.deb) and RPM (.rpm) packages using CPack.
Manual Package Generation
Prerequisites
- CMake 3.16 or later
- Make or Ninja build system
- For RPM packages:
rpmbuildutility
Build Process
-
Create build directory:
mkdir -p build-package cd build-package -
Configure with CMake:
cmake .. -DCMAKE_BUILD_TYPE=Release -
Build the project:
make -j$(nproc) -
Generate packages:
cpack -G DEB # Generate Debian package cpack -G RPM # Generate RPM package (requires rpmbuild)
Requirements for RPM Generation
To generate RPM packages, you need rpmbuild installed:
- Ubuntu/Debian:
sudo apt-get install rpm - CentOS/RHEL:
sudo yum install rpm-build - Fedora:
sudo dnf install rpm-build
Package Contents
The generated packages include:
- Main executable:
/usr/bin/salmanoff - Shared libraries:
/usr/lib/lib*.so - Device configurations:
/usr/share/salmanoff/devices/(preprocessed .daps files) - Documentation:
/usr/share/doc/salmanoff/
Installing Packages
Debian/Ubuntu:
sudo dpkg -i salmanoff-0.00.004-x86_64.deb
CentOS/RHEL/Fedora:
sudo rpm -i salmanoff-0.00.004-x86_64.rpm
Package Configuration
Package metadata and configuration is defined in
cmake/CPackConfig.cmake. This includes:
- Package name, version, and description
- Dependencies and recommendations
- License information
- File naming conventions
Troubleshooting
- RPM generation fails: Ensure
rpmbuildis installed - Missing dependencies: Check that all build dependencies are installed
- Permission errors: Ensure you have write permissions in the build directory