UltrafastSecp256k1/packaging/README.md
vano be528aef66 audit: add AUDIT_COVERAGE.md + ASCII cleanup + CT fixes
- Add comprehensive AUDIT_COVERAGE.md documenting all 46 audit modules
  across 8 sections with ~1M+ total assertions
- Pure ASCII cleanup: remove all Unicode from source/cmake/script files
  (box-drawing, arrows, Greek, emoji, BOM, Georgian in comments)
- CT fix: RISC-V is_zero_mask (seqz+neg inline asm)
- CT fix: ct_compare general path (snez)
- All 188 files updated for ASCII-only compliance (Section 17 rule)
- Verified: 46/46 audit PASS on X64, ARM64, RISC-V (QEMU + Mars HW)
- Verified: 24/24 CTest PASS on X64
2026-02-25 19:14:21 +04:00

2.0 KiB

Linux Distribution Packaging

This directory contains packaging files for building native packages on various Linux distributions.

Debian / Ubuntu (.deb)

# Install build dependencies
sudo apt install debhelper cmake ninja-build g++ pkg-config

# Build package from source tarball
dpkg-buildpackage -us -uc -b
# -- or use CPack --
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
    -DSECP256K1_BUILD_SHARED=ON -DSECP256K1_INSTALL=ON
cmake --build build
cd build && cpack -G DEB

Produces:

  • libufsecp3_<ver>_<arch>.deb -- shared library
  • libufsecp-dev_<ver>_<arch>.deb -- headers + static lib + cmake/pkgconfig

Fedora / RHEL / CentOS (.rpm)

# Install build dependencies
sudo dnf install cmake ninja-build gcc-c++ rpm-build

# Build RPM from spec
rpmbuild -ba packaging/rpm/libufsecp.spec
# -- or use CPack --
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
    -DSECP256K1_BUILD_SHARED=ON -DSECP256K1_INSTALL=ON
cmake --build build
cd build && cpack -G RPM

Arch Linux (AUR)

# From the packaging/arch/ directory:
cd packaging/arch
makepkg -si

The PKGBUILD downloads the source tarball, builds with CMake+Ninja, runs tests, and installs to /usr.

Generic install (any distro)

cmake -S . -B build -G Ninja \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DSECP256K1_BUILD_SHARED=ON \
    -DSECP256K1_INSTALL=ON \
    -DSECP256K1_INSTALL_PKGCONFIG=ON \
    -DSECP256K1_USE_ASM=ON
cmake --build build -j$(nproc)
ctest --test-dir build --output-on-failure
sudo cmake --install build
sudo ldconfig

After install, applications can find the library via:

  • pkg-config: pkg-config --cflags --libs ufsecp
  • CMake: find_package(ufsecp 3 REQUIRED)

Package naming convention

Distro Runtime Development
Debian/Ubuntu libufsecp3 libufsecp-dev
Fedora/RHEL libufsecp libufsecp-devel
Arch libufsecp (included in main package)