Skip to content

Latest commit

 

History

History
111 lines (73 loc) · 4.79 KB

File metadata and controls

111 lines (73 loc) · 4.79 KB

Installation

The documented installation choices are a user-local CMake installation and an openSUSE RPM. Other compatible configurations may use the CMake installation, but the project does not maintain instructions for their system package managers. Direct system-wide installation with CMake is not recommended because those files are not owned by a system package manager.

Build prerequisites

Install the release-tested build environment on openSUSE Leap 16:

sudo zypper install cmake gcc-c++ llvm19-devel clang19-devel jsoncpp-devel sqlite3-devel

jsoncpp-devel supplies the headers and link metadata used at build time. Installing scalps through Zypper records the matching JsonCpp runtime library dependency automatically; a user-local installation requires that runtime library to remain installed.

These package versions are the release-tested configuration, not an allowlist. Other compatible LLVM, Clang, and JsonCpp releases may be used. Clang's CMake package must provide matching clang-cpp and LLVM targets. The matching Clang driver normally reports the location of its builtin headers; if an installation provides the development libraries and headers without that driver, pass their resource directory with -DSCALPS_CLANG_RESOURCE_DIRECTORY=/path/to/lib/clang/version.

Configure, build, and test scalps before installing it:

cmake -S . -B build
cmake --build build
ctest --test-dir build --output-on-failure

NixOS

The repository provides a flake with a pinned nixpkgs input. Build scalps into result with:

nix build

Install or upgrade it in the current user's Nix profile with:

nix profile install .

Remove it with:

nix profile remove scalps

For development, enter the environment containing CMake and all build dependencies, then use the normal CMake workflow:

nix develop
cmake --preset nix
cmake --build --preset nix
ctest --preset nix

The nix preset writes build-nixos/compile_commands.json, keeping NixOS compiler and dependency paths separate from the openSUSE build tree when a checkout is shared between the two systems. It uses the Clang resource directory supplied by the development shell. The Nix package build runs the full test suite, including extraction through the build's compiler wrapper. For day-to-day indexing under Nix, use a separate index such as .scalps/index-nixos.sqlite; scalps index and scalps status authorize exact /nix/store/ compilers automatically when every compilation driver resolves there, or you can put auto in .scalps/query-driver. Run indexing from the project build environment (nix develop or equivalent) so package includes that wrappers inject from the environment are visible. See Compiler configuration discovery.

User-local installation

From the checkout root, ./install.sh configures a Release build in build/release, builds it, and moves the executable to $HOME/.local/bin/scalps:

./install.sh

Remove that executable with:

./uninstall.sh

Alternatively, install into the standard user-local prefix with CMake:

cmake --install build --prefix "$HOME/.local"

This installs only the executable at $HOME/.local/bin/scalps. Add $HOME/.local/bin to PATH if the desktop or shell configuration has not already done so.

Repeat the install command to upgrade an existing user-local installation. Remove this installation with:

rm "$HOME/.local/bin/scalps"

These commands remove only files owned by the current scalps install. Do not remove $HOME/.local itself because other applications may use it.

openSUSE RPM

The RPM spec is maintained at packaging/opensuse/scalps.spec. It builds from a versioned source archive and uses the openSUSE CMake build, install, and test macros.

To build the current package from a committed checkout:

mkdir -p "$HOME/rpmbuild/SOURCES"
git archive --format=tar.gz --prefix=scalps-1.0.0/ \
    --output="$HOME/rpmbuild/SOURCES/scalps-1.0.0.tar.gz" HEAD
rpmbuild -ba packaging/opensuse/scalps.spec

Install the resulting local package through Zypper:

sudo zypper install "$HOME"/rpmbuild/RPMS/*/scalps-1.0.0-*.rpm

Zypper records the package's files and shared-library dependencies. Remove it, including /usr/bin/scalps, with:

sudo zypper remove scalps

The RPM installs the license at /usr/share/licenses/scalps/LICENSE and the README at /usr/share/doc/packages/scalps/README.md. It links to the openSUSE LLVM, Clang, JsonCpp, SQLite, and C++ runtime packages. It does not bundle copies of those libraries or Clang's builtin headers. In the release-tested configuration, clang-19 --print-resource-dir reports the builtin headers supplied by libclang-cpp19; the build does not hard-code that package's /usr/lib64/clang/19 layout.