The Slackware OS was successfully upgraded on Fri Oct 3 14:39:01 UTC 2014
The Wiki was successfully upgraded on Fri Oct 3 15:42:57 UTC 2014

Welcome to the Slackware Documentation Project

Building and Installing Packages with sbopkg

Sbopkg is a command-line and dialog-based tool to synchronize with the SlackBuilds.org (“SBo”) repository, a collection of third-party SlackBuild scripts to build Slackware packages. The program has a curses based interface which lets you pick and assemble the programs which you want to compile from source into packages. It can also be used non-interactively in case you know beforehand what your goal is - in that case it is “fire and forget”.

The following information will assist you in getting sbopkg installed, and running on Slackware.

Note that sbopkg builds Slackware packages. As with any Slackware package management program, you will have to be root to use the program! Execute

su -

to get a root command prompt with the correct environment configured.

Download sbopkg:

Download sbopkg from: http://www.sbopkg.org/downloads.php
You can get the sources and build a package yourself, or just grab th ready-made Slackware package. The following section of this article assumes that you downloaded the ready-built package.

Install sbopkg

  1. Assuming that the sbopkg package file name you downloaded to the current directory is sbopkg-0.36.0-noarch-1_cng.tgz, the installpkg command to install sbopkg (or upgrade it if it was already present on your system) is as follows:
    $ su -
    # cd /path/to/downloaded/file/
    # upgradepkg --install-new sbopkg-0.36.0-noarch-1_cng.tgz

Configure sbopkg

  1. Read the sbopkg documentation! See http://www.sbopkg.org/docs.php , and also do not forget there is a man page for sbopkg.
  2. The first time sbopkg is executed, you will be asked if it is OK that the program creates the necessary configuration files:
    # sbopkg
    
    The following directories do not exist:
    
    Variable                   Assignment
    --------                   ----------
    REPO_{ROOT,NAME,BRANCH} -> /var/lib/sbopkg/,SBo/,14.0
    LOGFILE directory -------> /var/log/sbopkg
    QUEUEDIR ----------------> /var/lib/sbopkg/queues
    SRCDIR ------------------> /var/cache/sbopkg
    TMP ---------------------> /tmp/SBo
    
    You can have sbopkg create them or, if these values are incorrect, you can
    abort to edit your config files or pass different flags.
    
    (C)reate or (A)bort?:

    . Select C to create these required directories.
    The program will then present its main screen:

  3. Your first task is to synchronize with the SlackBuilds.org repository - i.e. you let sbopkg create a local copy of all the SlackBuild entries on the remote server, for the Slackware release which you are running. You either use the first menu item in the curses-based main screen, or else you can do this from the commandline:
    # sbopkg -r
    Syncing with the remote repository into /var/lib/sbopkg/SBo/14.0.
    receiving incremental file list
    
    <long list of filenames...>
    
    sent 451288 bytes  received 36904793 bytes  371702.30 bytes/sec
    total size is 35271012  speedup is 0.94
    
    Rsync with the SBo repository for Slackware 14.0 complete.
    
    Importing SBo repository for Slackware 14.0 GPG Key...
    Import done.
    
    ***SYNC COMPLETE***
  4. You are now ready to select the packages you want sbopkg to build from source.

Using Queuefiles with sbopkg

The sbopkg program itself allows a great deal of automation: the interactive curses interface helps you manage the burden of downloading source code archives, and allowing you to select multiple programs and then compile and package all of those in one go.
But you can automate this process even further, by using queuefiles which contain pre-defined build sequences for a series of packages. Queuefiles themselves will be invoked recursively so that you can create a complex build chain with little effort.

Luckily Mauro Giachero (a sbopkg co-developer) already created queuefiles for the entire SlackBuilds.org repository. Check out the git repository http://gitorious.org/sbopkg-slackware-queues. Every program you find in the SBo repository has its own queuefile, containing every dependency which has to be compiled before your target program can be compiled.

The following URL has a listing of individual packages along with a tar.gz file of the complete index for Slackware 14: http://gitorious.org/sbopkg-slackware-queues/sbopkg-slackware-queues/trees/sbo-14.0

You can download an archive containing the full set for the Slackware 14.0 repository at SlackBuilds.org from this URL: http://gitorious.org/sbopkg-slackware-queues/sbopkg-slackware-queues/archive-tarball/sbo-14.0 . The resulting archive file will be named “sbopkg-slackware-queues-sbopkg-slackware-queues-sbo-14.0.tar.gz”.

Extract all of the *.sqf files to the directory which will be checked by sbopkg: “/var/lib/sbopkg/queues/” with the following commands:

# cd /var/lib/sbopkg/queues
# tar xvf /path/to/downloaded/sbopkg-slackware-queues-sbopkg-slackware-queues-sbo-14.0.tar.gz
# cd sbopkg-slackware-queues-sbopkg-slackware-queues
# mv * ../
# cd ..
# rm -r sbopkg-slackware-queues-sbopkg-slackware-queues

Now any queue file (*.sqf) can be selected to install any package (with dependencies) you desire.

Another way to obtain queuefiles is run:

cd /var/lib/sbopkg

And then:

git clone git://gitorious.org/sbopkg-slackware-queues/sbopkg-slackware-queues.git queues

To update queuesfiles in the future:

# cd /var/lib/sbopkg/queues
# git pull

Example of Using sbopkg

As an example, let's install Gramps. The queuefile for Gramps lists the following dependencies, in order of install:

orbit2
pyorbit
libbonobo
gnome-mime-data
gnome-vfs
libgnome
gnome-python
gramps

Load the “gramps.sqf” queue file in sbopkg's curses interface, and Gramps will be successfully built on your Slackware 14 system and installed, along with all its dependencies.

Alternatively you can use the less interactive command-line interface:

# sbopkg -i gramps
Both a queuefile and a package were found with the name "gramps".

Use (Q)ueuefile, (P)ackage, or (A)bort?: q

One or more build option files for the avahi
SlackBuild script were found:

Queuefile options: MONO=yes

Use (N)one, (Q)ueuefile, or (A)bort?: n

###########################################
       New queue process started on:
       Thu Nov 15 23:05:16 CET 2012
###########################################

+++++++++++++++++++++++++++++++++++++++++++
PACKAGE BUILDING/INSTALLATION PRE-CHECK LOG
Using the SBo repository for Slackware 14.0
Queue Process:  Build and install

<long list of package checks...>

Pre-check complete.

Do you wish to proceed based on the search results above? Packages not
found will be skipped during the process.

(P)roceed or (Q)uit?: p

etcetera.

References for sbopkg

Sources


In Other Languages
Translations of this page?:
QR Code
QR Code howtos:slackware_admin:building_packages_with_sbopkg (generated for current page)