"Be a sport and use s-port!"

sport, modeled after the BSD Port and Gentoo Emerge systems, is a simple shell frontend to slackbuilds.org.

How do I install sport?

Installing sport is easy, as it comes with a sport.SlackBuild that you can run. But you may have to do a little bit of set up as well:

  1. First, download sport from gitorious.org/slackport and read it over.

    $ git clone git://gitorious.org/slackport/sport.git

  2. And then run the included SlackBuild.

    $ su -c './sport.SlackBuild'

    Install it with installpkg

    $ su -c 'installpkg /tmp/sport*tgz'

    Or, if you are upgrading from a previous release of sport, use upgradepkg (let x.x represent the new version of sport to which you are upgrading):

    $ su -c 'upgradepkg /tmp/sport*x.x*tgz'

  3. If you are using sbopkg already, then the default values are probably already appropriate, and you can skip this step.

    If you are only using sport then you may wish to define the location of your local and remote slackbuild repositories. To do this, open up /etc/sport.conf and set the SBOPATH and MASTER variables (note the lack of a trailing slash on SBOPATH and the trailing slash after MASTER):

    SBOPATH=/usr/ports
    MASTER="rsync://slackbuilds.org/slackbuilds/14.0/"

    Remember, you can either use the default (which ensures compatibility with sbopkg) or you can use any path you prefer (personally, I use /usr/ports)

  4. Now you're ready to start using sport.

Using sport

sport was written with the BSD port system in mind, and so it has a very similar workflow:

  1. The first step in both BSD Port and Gentoo Emerge is to obtain the port tree. This is also the first step with sport.

    # sport rsync

  2. If these were BSD ports and you wanted to see if you could install an application via the ports collection, you might do a "make search" so in sport you would do a sport search, like so:

    # sport search w3m
       network/emacs-w3m.tar.gz
       network/w3m.tar.gz

    Note that at this stage, sport is case insensitive and your search is forced to be fuzzy.

  3. You might want to see some helpful information about the package you are wanting to install. For this, you use sport cat

    In this case, if you just ask sport to give you information on "w3m", sport cannot know whether you want information on w3m or emacs-w3m, so you must be more specific. You can be more specific for sport by providing the SlackBuild category that package belongs to:

    # sport cat network/w3m
    PRGNAM="w3m"
    VERSION="0.5.3"
    HOMEPAGE="http://w3m.sourceforge.net/"
    DOWNLOAD="http://downloads.sourceforge.net/w3m/w3m-0.5.3.tar.gz#34;
    MD5SUM="1b845a983a50b8dec0169ac48479eacc"
    REQUIRES="gc imlib2"
    w3m is a blah blah blah blah

  4. Uh oh, it looks like w3m depends upon gc and imlib2. So before proceeding, you'll need to satisfy those dependencies, which can be done exactly as we're doing here with w3m. In fact, it would be quite easy to resolve them:

    # sport install gc
    # sport install inlib2

    But we are getting ahead of ourselves. Let's pretend that we already have gc and imlib2 installed or that we just installed them with the commands above.

    (If you are not sure if something is installed or not, then you can check quite easily:)

    # sport check imlib2    /var/log/packages/imlib2-1.4.5-x86_64-1_SBo

  5. Finally, you would want to download and build the application. On BSD, you'd do a "cd /path/to/foo && make install". With sport you can use the build verb and Slackware's native installpkg command. Important: remember that if your package is not named uniquely, you must provide the category and package name when installing.

    # sport build network/w3m
    # installpkg /tmp/w3m*SBo*t?z

    Or you might want to download, build, and install with one command:

    # sport install network/w3m

And that's all there is to it. If you're concerned about all that source code lying around on your hard drive taking up space, or you somehow mess up a build really badly and you want to start anew, there's also sport clean foo/bar, which removes the directory and the source code contained within it, and then untars a fresh copy from the SBo tree.

To update your SlackBuild tree, run sport rsync

I hope sport is useful to you.

Queue Files

If you have lots of applications to install at once, it makes sense to use a batch, or "queue" file.

Creating a queue file is simple. Just list the packages in the order you wish them to be installed in a plain text file, one package per line. It is safest to use both the category and package name but if the package name is unique you can list it alone.

For example, in a file arbitrarily called w3m.list, you may place some lines of package names:

development/gc
imlib2
network/w3m

It's safer to use the full category/pkg naming scheme, but if you' sure that a package name is unique then you can cheat, as I did in the above example with imlib2 line.

And to process this queue file, you would use:

# sport queue w3m.list

By default, sport only builds the packages and does not install them. To make sport install the packages after it builds each one, pass the INSTALLER variable:

# INSTALLER=installpkg sport queue w3m.list

Or, if you are upgrading packages rather than installing them as new, you could use:

# INSTALLER=upgradepkg sport queue w3m.list

In fact, you could even keep local stashes of SlackBuild queues for applications you upgrade frequently, and use sport to handle them. For instance, if you update ffmpeg with every new ffmpeg release, then you might keep a local directory in your home folder containing all of the SlackBuilds needed to build it. In this case, you can provide both the SBOPATH and INSTALLER variables:

# SBOPATH=$(pwd) INSTALLER=upgradepkg \
  sport -q ./ffmpeg/ffmpeg.list

This would process the queue file ffmpeg.list located in the sub directory ffmpeg, using your current directory as the SlackBuild root directory.

You can name queue files whatever you please, and you should even be able to use sbopkg queue files (frequently saved as .sqf documents) with minimal or no modification (sport tends to be fuzzier than sbopkg, so some applications will want to listed more clearly than how sbopkq queue files list them).

For information on queue files and variables and advanced topics like that, read the included .info file and man page.

System Requirements

Slackware Port (sport) was designed for Slackware Linux. It uses only built-in tools already included on a default full install of Slackware. It has been tested on all official Slackware architectures including the Raspberry Pi.

Can I pass build options through sport?

Why, yes! Since it is part of BASH you are able to pass SlackBuild variables through sport:

# WIDGETS=yes sport install network/foo

Can I pass make flags through sport?

Yes, using MAKEOPTS:

# MAKEOPTS='-j7' sport install multimedia/foo

Thanks to cobra2 for the tip!

Is sport a replacement for sbopkg?

No. The two are very similar applications but they feel unique in the way I use them. You may find that you will want to use sport on some days, and sbopkg on others, and sometimes neither! It just depends on what your workflow is at any given moment, or what the needs are for a particular package you are installing.

For me, sport works best when I'm following a dependency trail of a particularly complex application. Not that sbopkg couldn't do the same thing with its queue files, but sometimes I haven't got the clarity of mind to build a queue file and sort them all out, so I just muddle through the SBo tree and install as I go.

I frequently use sbopkg when I am just idly browsing available packages.

And I use neither for those really important apps, like ffmpeg or qtractor, and other apps that I like to compile on my own terms.

You will likely discover on your own which tool works best for you, and in what circumstances. Happily, there is no right or wrong answer; they're all free!

I hate it, how do I uninstall?

If you want to remove sport from your system, simply remove the sport script from where ever you placed it (probably in /usr/sbin) or just use removepkg. Send back the unused portion to us, and we'll refund you.

I love it! But it sounds too good to be true.

Then it probably is. Look, this is a simple shell script. It's not as fast or robust or smart or flexible as many other Slackbuilds.org frontends, and it's not my attempt at making Slackware "more user friendly". It's just another tool in the shed.

Sport was written swiftly and is probably very narrowly attuned for exactly what I want it for. It is a dormant beast waiting until you are relaxed, and when you least expect it, it will fail miserably and disappoint you.

I love it, and want to purchase a 200-seat corporate license.

Corporate licenses for sport are available by donating a lot of dollars to the Slackware project. Send proof of your donation and a gift card for one cup of coffee to klaatu at member dot fsf org, and if we feel your donation was sufficient, then we will send you One Golden Ticket. If you donate a million dollars or more, we will modify the code so you even have to enter in a serial number to activate it, and send you the patch in the form of a service pack.

I love it, but it could be so much better.

Feel free to clone and mod sport on gitorious. If you come up with cool improvements, send me a patch or a merge request.

If you don't code at all but want a better tool, then there are many other frontends to Slackbuilds.org that you might want to try, including the one that inspired me to write sport, called sbopkg. It is a robust and flexible and great system, and when I'm not using sport I use it. Unfortunately, I cannot do anything about its name.

I'm from the Software Police. Why did you write yet-another-package-manager?

sport is not a package manager, officer. It's a script that leverages other scripts to build software from source code.

Some new Slackware users seem to be looking at SlackBuilds and the frontend applications that exist as package managers. This is incorrect. You, the Slackware admin, are the package manager. SlackBuilds are only organized methods of building applications from source code. A SlackBuild doesn't even install applications so it cannot be a package manager.

Om nom nom dependency resolution?

No.

Sport icon by johnny_automatic at openclipart.org