How to use slackbuilds


If you're using slackware, you'll find there are many packages not "included" with the base distribution. Slack tends to use vanilla packages with little or no patching from how the application was intended by the author upstream... so this means that you can build virtually anything you need with the excellent build tools.

Utilizing slackbuilds from slackbuilds.org is a good way to do this.

First, we need to su to root so that we can build and install the packages. so we open a terminal and type

su -


then we need to create our build directory. this can be anywhere, but you may want to put it in your user's home directory. So we create the directory like so.. substitute your user name where "user" is listed.

mkdir /home/user/build


then we'll change directory to our build directory

cd /home/user/build


now we can begin building packages. navigate in your favorite web browser to http://slackbuilds.org/

On the right hand side of the screen you will find a search navigation tool, and the version number. So if you're using slackware 12.2, you select that and then search for the package you want to build. Let's try something simple like flash... which brings us to this page.
http://slackbuilds.org/result/?search=flash&sv=12.2

now at this point the different options available for building flash are listed. We'll simply go with flash-player-plugin so we can watch some videos on youtube.
http://slackbuilds.org/repository/12.2/multimedia/flash-player-plugin/

Now that we're on this page, we have access to the slackbuild tar ball and a link to the source required to compile it. It's a good idea to read the README file linked to at the bottom of the page and to peruse the slackbuild script.

Next we'll download the slackbuild in our terminal session using wget which is very reliable. Simply right click on the link to the slackbuild source under "Download slackbuild" and select "copy link location". Then type

wget


then leave a space and right click in the terminal and select paste. this will paste the location of the source slackbuild for you to download. then hit enter. so in this case it would look like this.

wget http://slackbuilds.org/slackbuilds/12.2/multimedia/flash-player-plugin.tar.gz


now we need to untar the archive

tar -zxf flash-player-plugin.tar.gz


now we need to see what directory has been created, and we can do this with ls

ls


it will show the directory. in this case it's "flash-player-plugin". so we'll change to that directory.

cd flash-player-plugin


now we'll download the source linked to on the slackbuild page under "Download Source"

wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz


we now want to make sure that our slackbuild is fine, so we can open a text editor and take a look to make sure everything seems fine. sometimes the slackbuild site doesn't link to the latest version available, so we can navigate to the homepage of the original author, download the source and edit the slackbuild. we'll cover that another time however and focus on installing this slackbuild.

next we have to ensure that the slackbuild is executable.

chmod +x flash-player-plugin.SlackBuild


now we're ready to build the package.

./flash-player-plugin.SlackBuild


the program will compile now, assuming we've met the needed dependencies. flash-player-plugin doesn't have any additional dependencies, so it should compile just fine on a stock slack install.

the created package is created and moved to /tmp, and the full file name is listed. we can either cd to the tmp directory and then use installpkg, or we can simply use the full path. so our next step is to install the package now. 

installpkg /tmp/flash-player-plugin-10.0_r22-i386-1_SBo.tgz

congrats! you have just compiled your first slackware compliant package and installed it.

Post a Comment

Previous Post Next Post