LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 12-27-2010, 03:43 PM   #1
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Rep: Reputation: 107Reputation: 107
What exactly does a slackbuild do (aside from installing a package)?


I mean like, what does it do differently from just installing something from source? Check to make sure you have the required dependencies before compiling the .tgz package? something else?
 
Old 12-27-2010, 03:54 PM   #2
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
Normally a SlackBuild will just Build a package from source.

It's just a script that is written to automate all the steps to create a package.

It can set compiler options and other environmental variables and sometimes even download the source but does not resolve dependencies (unless someone hard codes this in).

More interesting reading to be found here. http://www.slackwiki.org/Writing_A_SlackBuild_Script
 
Old 12-27-2010, 04:22 PM   #3
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Another thing the slackbuild does is: document the build process. Though that's more of a soft benefit.


Quote:
Originally Posted by mRgOBLIN View Post
It can set compiler options and other environmental variables and sometimes even download the source but does not resolve dependencies (unless someone hard codes this in).
Strangely enough I was thinking about that very thing the other day and wondering whether to add something along the lines of that to the start of some of my build scripts. Keeping it simple though, like a set of: "test -f /var/log/packages/requiredpackagename* || exit" statements.


I recently had an epiphany and discovered that it's not automated dependency checking, but automated dependency resolution that I object too.
 
Old 12-27-2010, 06:39 PM   #4
brixtoncalling
Member
 
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403

Rep: Reputation: 67
Besides, making it easy to compile a package (it isn't always easy), using a Slackbuild allows you to uninstall the program.
 
Old 12-27-2010, 08:35 PM   #5
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
Actually using a Package allows the un-installing =)
 
Old 12-27-2010, 11:41 PM   #6
brixtoncalling
Member
 
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403

Rep: Reputation: 67
Quote:
Originally Posted by mRgOBLIN View Post
Actually using a Package allows the un-installing =)
Hair-splitter!
 
Old 12-28-2010, 03:18 AM   #7
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Also, the SlackBuild does not *install* the program -it just creates the package. As GazL pointed out, the script provides the most concise documentation of the build, which to me is the *biggest* benefit.
 
Old 12-28-2010, 05:41 AM   #8
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748
A SlackBuild can also be used to adapt an install to suit the standard Slackware structure. An example of this is the SlackBuild for OpenOffice by rworkman. It actually unpacks the compiled binary rpm package and makes changes to suit Slackware.
Quote:
# Yes, I know there is a Slackware integration file in the desktop-integration
# directory, but it's worthless to us. I'd prefer to do things correctly.
 
Old 12-29-2010, 07:19 AM   #9
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
Most usually a slackbuild script actually does dependency checking. That is: if the build process performs a "./configure --parameters"

What most of the SlackBuild scripts do:
1) unpack the source
2) run configure
3) make the software
4) "install" it in a safe location which allows for creation of the package
5) add the documentation and other useful resources (like config files) to the package
6) create the package so that it is easy to install, uninstall and upgrade, allowing you to keep the rest of your system clean.

This is, however, NOT what _all_ SlackBuild scripts do; in essence what they do in one line is this:
put together the files into a (compressed) archive in a format that is understood by the package application so that it may be installed, upgraded or un-installed.
 
Old 12-29-2010, 07:43 AM   #10
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,781

Rep: Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431
Successors

Greetz
When building from source, the commonly stated last step of "su make install" does not do it for me because not only do I want to be able to uninstall (and there is no "make uninstall") but I want a record of what is installed and where, That only takes place with packages. Additionally SlackBuilds, for me, fills a hole left by "checkinstall" when it failed to keep up and was dropped from Slackware Extras. For those newer to Slack or who never used it, "su checkinstall" took the place as a direct substitute for "make install" and it could create packages, slacpakcks, debs and/or rpms. It was great while it lasted.

Slackpkg isn't bad but I have yet to learn how to control the configure process the way I want with it. SlackBuilds generally lay it all out and make it easy to set any options you want and I never needed debs or rpms anyway. The dependencies are generally listed from the same place you get the SlackBuild so before you even download it you know what you need. That means you don't have to sit and watch as configure runs for the tenth time stopping on some missing library you must then go fetch and install first. With SlackBuilds you can plan ahead and make compiling all but effortless and go fix a cup of coffee while the build script runs unattended and return ready to go.
 
1 members found this post helpful.
Old 02-03-2011, 11:10 PM   #11
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Does it mean that if I install the VLC player slackbuild, it won't install ALL the codecs on its own? Do I have to download 100 codecs from different websites individually?
 
Old 02-04-2011, 01:03 AM   #12
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Quote:
Originally Posted by Anisha Kaul View Post
Does it mean that if I install the VLC player slackbuild, it won't install ALL the codecs on its own? Do I have to download 100 codecs from different websites individually?
From your list of distributions I can make assumptions on the intention of your post but I will simply say that VLC is a rare case where using Alien Bob's prebuilt package (especially the restricted package that contains additional codecs that are not distributable from a US server) is exceptionally advantageous, and is compiled statically so you don't need to chase dependencies. There's a reason a package like VLC should be compiled statically to avoid this dependency mess on ANY distro -- having VLC break every time you upgrade ffmpeg would not be fun, and it has so many dependencies (some of them build-time dependencies only) that I wouldn't compile it from source unless I had to. This, of course, is contrary to my philosophies for almost any other piece of software, but there is a time for pragmatism.

For mplayer though, yes, you'd need to hunt down some dependencies if you're unhappy with the build that ships with Slackware. ffmpeg is another one that can make good use of codecs that may not be included with Slackware. I have a list of codecs from SBo that I generally build before anything else (and I recompile mplayer to take advantage of them). This lets me include support for the codecs that I plan on using without burdening my system with added optional dependencies that will never be used. sbopkg makes preparing queues for these multimedia dependencies relatively painless while still providing you with control over which optional dependencies are to be included.

For those arguing about dependency resolution, in *my* mind the only dependency resolution I would accept would be something akin to Gentoo's portage system with USE flags allowing me to enable/disable optional dependencies at will. Right now I essentially prepare sbopkg queues manually which takes slightly longer than a USE flag-like system but is still reasonable.
 
1 members found this post helpful.
Old 02-04-2011, 01:48 AM   #13
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Quote:
Originally Posted by T3slider View Post
From your list of distributions I can make assumptions on the intention of your post
I am curious to know the assumptions you made about my intentions.

Quote:
Originally Posted by T3slider View Post
VLC is a rare case where using Alien Bob's prebuilt package (especially the restricted package that contains additional codecs that are not distributable from a US server) is exceptionally advantageous, and is compiled statically so you don't need to chase dependencies. There's a reason a package like VLC should be compiled statically to avoid this dependency mess on ANY distro -- having VLC break every time you upgrade ffmpeg would not be fun, and it has so many dependencies (some of them build-time dependencies only) that I wouldn't compile it from source unless I had to. This, of course, is contrary to my philosophies for almost any other piece of software, but there is a time for pragmatism.
T3slider, thanks for the effort, I had to look up "static compilation" in detail I had previously tried to install VLC tar on Suse, I got soon tired because of the missing codecs..I am planning to shift my external hardisk (used for storing music/movies) to Slackware, You've explained the reasons well.
 
  


Reply



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
Gambas: Package or SlackBuild and dependencies? gargamel Slackware 8 10-03-2010 12:23 PM
Anyone got a slackbuild/package for TigerVNC? (Not TightVNC!) uppman Slackware 2 04-16-2010 06:42 AM
updating slackbuild package in slackware 12.2 jrecortel Slackware 1 02-06-2009 06:23 PM
mplayerplug-in 3.55 - Looking for slackbuild or package ErV Slackware 9 12-22-2008 09:35 PM
Rebuilding a Slackware Package With Slackbuild Scripts Woodsman Slackware 11 10-14-2006 05:08 AM

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

All times are GMT -5. The time now is 06:38 PM.

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