-   Slackware (
-   -   How to build a Slackbuild script? (

Laodiceans 10-29-2010 11:46 AM

How to build a Slackbuild script?
Any links to a guide for building a slackbuid script?

The link don't show nothing!

GrapefruiTgirl 10-29-2010 11:59 AM

Yes, interesting. Seems the domain has... Gone away. :/

What I'd suggest, unless you want to search for a guide somewhere (there's probably another one - check the LQ Slackware Wiki section!), is to just grab a Slackbuild script from some package, and examine it. Grab a few, examine & compare them. You can change it, re-write it to suit whatever you are trying to do.

The existing scripts have some commentary, are laid out clearly, and are not overly complicated so the format & intent of the various sections isn't too hard to figure out. If you don't have/find a guide, and have particular questions about something in the scripts, ask away.

Good luck & kind regards.

catkin 10-29-2010 12:12 PM

There is some information and a link to templates at You can see some errors that this stumbling novice made and solved with great help from LQ here.

piratesmack 10-29-2010 12:23 PM

Here is Google's cache of that page:

Laodiceans 10-29-2010 01:42 PM

Thanks I will try to examine some Slackbuild scripts and use the cached page from google and the information about it too.
Any questions I will ask!

dive 10-29-2010 05:01 PM

Have a look at the templates:

dive 10-29-2010 05:02 PM

BTW Slackwiki will be back.

*Edit: it is back already.

jostber 10-30-2010 10:22 AM

You also have the Slackbuild toolkit from Eric H.:

dive 10-30-2010 07:02 PM

Might as well pimp my own then ;-)

Laodiceans 10-31-2010 07:03 AM

Is good to see that the community is still very strong.

vonbiber 11-01-2010 10:13 AM

building a package from source is most of the time
1. unpacking the source archive
2. ./configure __with_some_options
3. make

But of course there are a lot of exceptions.
What I usually do is
1. I use a metascript (slackgenerator) that writes a skeleton
2. I unpack the archive to a temporary folder
and look at the README, INSTALL, etc. to find out
about specific options
3. If there's a configure script, I run
./configure --help
and see if there are any specific options to add
to the SlackBuild script
4. I copy the apname.SlackBuild to source folder, edit
it to remove any unecessary stuff and test it step by step
by commenting out everything except the first step (e.g., configure)
If there are errors (such as a missing library, I try to install
them before proceeding)
Then I continue: make, etc.

Sometimes there are no configure script but an
or just a plain Makefile
Some files need to be tweaked once in a while (Makefile, etc.)
I do it with sed

I learned a lot by looking at the src2slack script
(sorry, I forgot who wrote it), the SlackBuild scripts
at the slackbuild web site, and of course from the SlackBuilds
found in the source directory of slackware.

I suggest you first try to build some simple stuff
starting from a SlackBuild found in the source tree of
the slackware distro.
Start with the ones that only have

configure ...
make install DESTDIR=$PKG

Skaperen 11-01-2010 05:00 PM

When looking at that slackbuild guidelines several months back, what I remember was it needed some more simplistic example so it was clear what settings were needed for slackbuild context, and what was specific to certain packages. Maybe a minimal SlackBuild for a minimal HelloWorld program might be nice for some people. Otherwise, we just figure it out by finding 2 or 3 really simple packages and seeing what their SlackBuild files have in common.

I also vaguely remember some confusion as to identifying 32 vs. 64 platforms, and some SBo limitations on architectures (I like to experiment with ARM, MIPS, PPC, Sparc, and S/390).

Alien Bob 11-01-2010 06:15 PM


Originally Posted by Skaperen (Post 4146143)
Maybe a minimal SlackBuild for a minimal HelloWorld program might be nice for some people.

Play around a bit with my interactive SlackBuild creator at . See what the results are when selecting each of the templates "web" (my own rich template) "sbo" (the template) or "bare" (template for a SlackBuild script that stays closest to an original Slackware script).

By changing the parameters of the webform and looking at the results you will get an idea of how a SlackBuild is constructed from parts with well-defined functionality.


ChrisAbela 11-02-2010 05:23 AM


Maybe a minimal SlackBuild for a minimal HelloWorld program might be nice for some people.
I had compiled one when I wanted to understand how SlackBuilds work and it can be downloaded from here:

All times are GMT -5. The time now is 01:18 PM.