Would you like to be notified for every new articles? Please click HERE to subscribe for newsletter.

Automate Your Slackbuild Using Sbotools

  • Posted on: 29 October 2015
  • By: admin

For Slackware users, installing package by compiling from source using slackbuild script is preferred than installing from binary packages. We can find a lot of slackbuild script at Slackbuilds.org so we can easily search, download, compile, and install new application in our Slackware system. Some applications can be installed and run without need to install its dependencies, but some of them can have one or more dependencies. The more complicated thing is the dependecies have another dependencies and that dependencies can have the other dependencies too. For some people that might be not a big problem, but if we can automate the tasks for downloading the dependecies rather than do it manually, why not?

Let's meet the sbotools from http://dawnrazor.net/sbotools/. A great program written in Perl script that can automate the Slackbuild process downloading, compiling, packaging, installing the application, and also resolve the dependencies! Yes, sbotools will do those tasks for us. The Slackbuild script for sbotools is available at http://slackbuilds.org/repository/14.1/system/sbotools/.

If you never install anything using Slackbuild, there is step by step guide in http://slackbuilds.org/howto/.

After installing sbotools, the first thing we need to do is pull the tree structure of available packages from http://slackbuilds.org/slackbuilds/. Just type the following command.

sbosnap fetch

After all the tree is pulled, we can find it in /usr/sbo directory and there are Slackbuild script and also some information files for each package. Now, we can start installing the packages we need. In my case, I try to install xchm, which depend on wxPython package, by executing the following command.

sboinstall xchm

Before installing the dependencies, the sboinstall will ask your confirmation. It will also ask our confirmation to pass some build flags if they were available. If the package you need to install had many dependencies, you will need to answer many times but at least the dependencies are resolved. After all the requirements to be installed are confirmed, the download process will start and then the downloaded source code tarball will be stored at /usr/sbo/distfiles/. After that the program will compile, make package, and finally install it to our system. The output package files are available at /tmp. We may need to move it to another folder so it can be re-installed later.

If you don't feel comfort with the Sbotools way which need to pull the whole Slackbuilds.org tree, I have made the modification to Sbotools 1.9 so it works lighter. It will not fetch the whole tree, only the needed files for installation are downloaded so it will save your time, bandwidth, and also the space in your disk. Please feel free to take a look at it from the following link.


Add new comment

Limited HTML

  • Allowed HTML tags: <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.