Sport Command - Manage Slackware Packages

Learn how to use the sport command to manage Slackware packages, including searching, building, installing, and upgrading with clear examples and explanations.

Sport Command - Slackware Package Management

The sport command is a powerful utility for managing packages within the Slackware Linux distribution. It simplifies common tasks related to the SlackBuilds.org (SBo) repository, allowing users to efficiently search, build, install, and manage software.

Syncing with SlackBuilds.org

To ensure you have the latest package definitions, you can sync your local repository with the official SlackBuilds.org tree. This is a fundamental step before performing other operations.

# To sync to newest slackbuild.org tree:
sport r

Searching for Packages

sport provides a flexible way to search for packages. You can perform fuzzy searches to find packages even if you don't know the exact name.

# to search (fuzzy) slackbuild tree for packages foo and bar:
sport s foo bar

If you need to operate from an alternate build tree location, you can specify the path using the SBOPATH environment variable.

# To operate from alternate build tree:
SBOPATH=/path/to/tree sport s foo

Viewing Package Information

To get detailed information about a package, including its readme file, use the c command.

# to view info and readme of bar (not fuzzy):
sport c foo BaR

Building and Installing Packages

sport streamlines the process of building and installing packages. You can choose to build only, or build and install.

# To build a package:
sport i --build-only foo

# to build and install package foo and bar:
sport i foo BaR

# To build and install package from current directory:
sport i .

Upgrading Packages

For upgrading existing packages, you can leverage the installer with the upgradepkg option.

# To upgrade instead of install:
INSTALLER=upgradepkg sport i foo

Managing Dependency Lists

You can create and install packages based on a list of dependencies stored in a file.

# To build dependency list for baz:
echo "foo bar" >> /tmp/baz.list

# To install list of packages from file:
sport i (< /tmp/baz.list)

Checking Package Installation Status

Verify if a specific package is already installed on your system.

# To check if package is installed:
sport k foo

External Resources