How to build a Slackbuild script?
Any links to a guide for building a slackbuid script?
The link http://www.slackwiki.org/Writing_A_SlackBuild_Script don't show nothing! |
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. |
There is some information and a link to templates at http://slackbuilds.org/guidelines/. You can see some errors that this stumbling novice made and solved with great help from LQ here.
|
Here is Google's cache of that page:
http://webcache.googleusercontent.co...&ct=clnk&gl=us |
Thanks I will try to examine some Slackbuild scripts and use the cached page from google and the linuxpackages.com information about it too.
Any questions I will ask! |
Have a look at the templates: http://slackbuilds.org/templates/
|
BTW Slackwiki will be back.
*Edit: it is back already. |
You also have the Slackbuild toolkit from Eric H.:
http://alien.slackbook.org/AST/ http://alien.slackbook.org/blog/alie...build-toolkit/ |
|
Is good to see that the community is still very strong.
|
building a package from source is most of the time
1. unpacking the source archive 2. ./configure __with_some_options 3. make 4. make install DESTDIR=SOME_TEMPORARY_FOLDER_HOSTING_THE_BUILT_FILES But of course there are a lot of exceptions. What I usually do is 1. I use a metascript (slackgenerator) that writes a skeleton apname.SlackBuild 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 autogen.sh 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 Code:
configure ... |
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). |
Quote:
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. Eric |
Quote:
https://www.yousendit.com/download/d...cTJrYUJFQlE9PQ |
All times are GMT -5. The time now is 11:34 PM. |