SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I see a lot of references to SlackBuild script, what are they? As far as I can gather you download a Build script and the source for the program you want, put them in the same directory run the script and it will build you a package, or do you just run the script without downloading the source?
I presume the slackbuild script will ./configure make and make install the programs sources and then create a package for you? which will save you the time of configuring and installing manually?
Can I use any version of hte source with a slackbuild script or is each slackbuild script specific to a certain version of the application in question.. ie could i have a slackbuild script for kplayer and download any version of the kplayer source?
Which is better to use the packages found off linuxpackage.net or slackbuild scripts? And why do some packages come with slackbuild scripts?
As far as I can gather you download a Build script and the source for the program you want, put them in the same directory run the script and it will build you a package, or do you just run the script without downloading the source?
The first one.
Quote:
Originally Posted by stu_mueller
I presume the slackbuild script will ./configure make and make install the programs sources and then create a package for you? which will save you the time of configuring and installing manually?
That's right.
Quote:
Originally Posted by stu_mueller
Can I use any version of hte source with a slackbuild script or is each slackbuild script specific to a certain version of the application in question.. ie could i have a slackbuild script for kplayer and download any version of the kplayer source?
Generally they're specific to a particular version, but it's usually quite simple to make it work for another version. Often, it's just a case of changing the version number in the script.
Quote:
Originally Posted by stu_mueller
Which is better to use the packages found off linuxpackage.net or slackbuild scripts? And why do some packages come with slackbuild scripts?
I tend not to use the linuxpackages.net packages, especially if they don't come with a build script. I mostly get my SlackBuilds from www.slackbuilds.org.
I see a lot of references to SlackBuild script, what are they? As far as I can gather you download a Build script and the source for the program you want, put them in the same directory run the script and it will build you a package, or do you just run the script without downloading the source?
The SlackBuild scripts that I write and publish at http://www.slackware.com/~alien/slackbuilds/ will download the sources in case they are missing, but that is not common practice. The SlackBuild scripts made available at http://slacky.eu do this too I think.
A SlackBuild script is nothing more than formalizing what you otherwise do manually when compiling a piece of software. The advantage is that a good script also creates a proper Slackware package that you can install as well as cleanly uninstall. And also, it allows you to upgrade to a newer version of the software easily because it would involve changing only a single variable in the script, get the new source tarball and compile the new package by executing a single command. It is ease-of-use.
A SlackBuild script is nothing more than formalizing what you otherwise do manually when compiling a piece of software. The advantage is that a good script also creates a proper Slackware package that you can install as well as cleanly uninstall.
So will the slackBuild script install the software as well as creating a package, or will it just create hte package and leave it to you to install?
Quote:
Originally Posted by Alien Bob
And also, it allows you to upgrade to a newer version of the software easily because it would involve changing only a single variable in the script, get the new source tarball and compile the new package by executing a single command.
So if a newer version of a piece of software comes out, I could change the variable in the slackbuild script, and re-run it to get the new version, would I then need to uninstall the old package, or could I just 'upgradepkg newpackage.tgz'?
Also why do some tgz packages come with SlackBuild scripts?
So will the slackBuild script install the software as well as creating a package, or will it just create hte package and leave it to you to install?
No, installing packages is left to the administrator.
Quote:
So if a newer version of a piece of software comes out, I could change the variable in the slackbuild script, and re-run it to get the new version, would I then need to uninstall the old package, or could I just 'upgradepkg newpackage.tgz'?
Yes. Sometimes there is more to it than simply changing the version number if it's a major update, but usually that is all you need to do.
Quote:
Also why do some tgz packages come with SlackBuild scripts?
So you can view it, edit it, customize it, and make a package with exactly what options you need.
As an aside, I have created a little tool called 'sbopkg' which provides a way to easily interact with the SlackBuilds.org repository. You can browse a local copy of the repo, build packages, edit the slackbuilds, etc. from within a dialog interface or from the command line. It's still in a testing phase, but I have been using it personally and it has been working well. You can check it out and download a package for it at http://code.google.com/p/sbopkg.
if i could just jump in on this topic with my own question, if you create a slackbuild script, would you need to put any uninstall commands in there, so as to enable uninstall at a later date? or will pkgtool just handle that?
A SlackBuild script has a Slackware package as the end product. But then it is not yet installed to your computer.
The next step would be to install that package using Slackware's installpkg command. If you ever want to remove the package, you do so with Slackware's removepkg command.
A SlackBuild script needs to know nothing of these two commands. Read more about how you work with a SlackBuild script, at http://slackbuilds.org/howto/
if i could just jump in on this topic with my own question, if you create a slackbuild script, would you need to put any uninstall commands in there, so as to enable uninstall at a later date? or will pkgtool just handle that?
The idea is that pkgtool handles the installation and removal of the package created in the SlackBuild script by makepkg.
So if a newer version of a piece of software comes out, I could change the variable in the slackbuild script, and re-run it to get the new version, would I then need to uninstall the old package, or could I just 'upgradepkg newpackage.tgz'?
Quote:
Yes. Sometimes there is more to it than simply changing the version number if it's a major update, but usually that is all you need to do.
However, even a minor update will not work as expected from time to time.
If you run into problems when changing the version number, I would email the maintainer first before posting here or the SBo mailing list. More than likely, they will already know why it didn't work and be able to suggest a workaround until a newer script can be made available.
After all, the SBo team only has enough time to test the versions that were submitted to them. They rely on the maintainers to know the ins and outs of the scripts they maintain.
Is there an advantage to using a SlackBuild script as opposed to something like src2pkg?
Good question. Both produce a .tgz package that you can install (at least I think src2pkg does or at least can, although I've never used it), so they're both pretty good. A SlackBuild allows you to go back and see all the options that were used to compile the package, so if you need to make any changes or recompile it or compile a newer version you can use it as a guide and only change what needs to be changed. It's a very nice log of events that can be transferred to any system (as long as any system-specific variables are changed). However, if there isn't a SlackBuild available, you must write it yourself (not that difficult to do, but you do need to learn how to build packages to be able to do it and not all packages have the exact same build procedure). src2pkg tries to do some of the above for you, so if there isn't a SlackBuild available, there is still a good chance that src2pkg will work with minimal effort to build a nice package. I'm not sure if src2pkg saves its compile options somewhere (someone else will have to answer that), so I'm not sure if it can be used as a reference like a SlackBuild or not.
If you don't wish to learn how to create SlackBuilds or if it is just too time-consuming, I have heard great things about src2pkg. I would ultimately recommend using slackbuilds.org first if they have a SlackBuild for the application you wish to install (since it's basically guaranteed to work since it's been tested). If they don't have a SlackBuild for the app you want, give src2pkg a try since it may still work -- but although I've heard it's pretty good, it may not work 100% of the time depending on the way the app needs to be compiled (there may be certain options that are required). I think you can also pass options to src2pkg in an application-specific way, so that'll make the chances of success even higher, but it requires knowledge of how the program SHOULD be compiled (read the documentation that comes with the app).
Basically it's a choice. Both are good ways. A SlackBuild allows you to customize everything about the compilation and maintains a record of what you did -- it is also, coincidentally, the way Pat builds his packages. src2pkg is a more automated solution that also produces great results. Research both and make an informed choice.
Is there an advantage to using a SlackBuild script as opposed to something like src2pkg?
I have not used src2pkg, but the reason I like using SlackBuilds is that (1) it is the "native" way to make packages because that is what Patrick uses to create the official packages and (2) by manually examining the source code and writing a SlackBuild, I have a better understanding of how the source code works and how the package is created, and also have the opportunity to customize the final product by, for example, selecting only those configure options I want.
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054
Rep:
Finally src2pkg is a program. It can't be as smart as someone who has written down script. src2pkg works great many of the times , but slackbuilds are better if you don't want to think much.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.