LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-29-2010, 10:46 AM   #1
Laodiceans
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 188

Rep: Reputation: 18
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!
 
Old 10-29-2010, 10:59 AM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555
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.
 
Old 10-29-2010, 11:12 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
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.
 
Old 10-29-2010, 11:23 AM   #4
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 519

Rep: Reputation: 142Reputation: 142
Here is Google's cache of that page:
http://webcache.googleusercontent.co...&ct=clnk&gl=us
 
Old 10-29-2010, 12:42 PM   #5
Laodiceans
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 188

Original Poster
Rep: Reputation: 18
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!
 
Old 10-29-2010, 04:01 PM   #6
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Have a look at the templates: http://slackbuilds.org/templates/
 
Old 10-29-2010, 04:02 PM   #7
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
BTW Slackwiki will be back.

*Edit: it is back already.

Last edited by dive; 10-29-2010 at 04:05 PM.
 
Old 10-30-2010, 09:22 AM   #8
jostber
Member
 
Registered: Jul 2001
Location: Skien, Norway
Distribution: Slackware Current 64-bit
Posts: 543

Rep: Reputation: 178Reputation: 178
You also have the Slackbuild toolkit from Eric H.:

http://alien.slackbook.org/AST/
http://alien.slackbook.org/blog/alie...build-toolkit/
 
Old 10-30-2010, 06:02 PM   #9
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Might as well pimp my own then ;-)

http://dawoodfall.net/latest-projects/3-mkslack
 
Old 10-31-2010, 06:03 AM   #10
Laodiceans
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 188

Original Poster
Rep: Reputation: 18
Is good to see that the community is still very strong.
 
Old 11-01-2010, 09:13 AM   #11
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware 14.1 64-bit, slackware 14.2 64-bit, SystemRescueCD
Posts: 533

Rep: Reputation: 129Reputation: 129
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 ...
make
make install DESTDIR=$PKG
 
Old 11-01-2010, 04:00 PM   #12
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,677
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
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).
 
Old 11-01-2010, 05:15 PM   #13
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104Reputation: 8104
Quote:
Originally Posted by Skaperen View Post
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 http://slackware.com/~alien/AST . See what the results are when selecting each of the templates "web" (my own rich template) "sbo" (the http://SlackBuilds.org 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.

Eric
 
1 members found this post helpful.
Old 11-02-2010, 04:23 AM   #14
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware
Posts: 572

Rep: Reputation: 154Reputation: 154
Quote:
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:

https://www.yousendit.com/download/d...cTJrYUJFQlE9PQ
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to build from Slackbuild in slackware 13 troj3n Slackware 1 01-28-2010 03:50 PM
Unable to build from Slackbuild in slackware 13 troj3n Slackware 5 01-28-2010 10:38 AM
What changes must be made in a slackBuild from 11.x To build for Slackware64 current? Alexvader Slackware 5 12-30-2009 01:38 PM
[SOLVED] can't build texlive slackbuild portia Slackware 27 12-28-2009 07:41 AM
SlackBuild.org nvidia kernel build script bug Woodsman Slackware 3 04-06-2008 07:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration