Build Environment

From SlackWiki
Jump to: navigation, search

Introduction

The purpose of this document is to give you several ideas on how to set up a good building environment (directory structure and such) for making Slackware packages from SlackBuild scripts.

Hopefully, you can see what works for several different people here. The definition of "good" is largely dependent upon personal preference, but all of these would be classified as "good" for the individuals using them.

Individual Setups

jjdm

My directory structure is as follows:

/home/slackware/ The slackware home directory. This directory (and all subdirectories) are owned by the group "packager" (of which root and my user account are members on my system).

/home/slackware/source In this directory I've placed the whole slackware-source because maybe I have to temporarily build another package to build a new one because of header files and stuff.

/home/slackware/source/myslackware/ This is where I build all my packages. Now they are unorganized but you can organize them in different topics like they're in Slackware.

/home/slackware/source/myslackware/<package> In this directory you build your package <package>.

/home/slackware/packages Place where the built packages are.

You don't have to use such a building environment. You can place everything in your home-folder, in /root or somewhere else. The only important thing is that you always keep track of your files and packages.

BTW: You can get the Slackware source packages from your Slackware-mirror of choice. It's placed in source/.

robw810

Directory Structure

My setup is something like this:

/shared/os_files/slackware/slackware-(version)/source/...
/home/rworkman/build/source
/home/rworkman/build/packages

Explanation of Directory Structure

The /shared/os_files/slackware/slackware-(version)/source/ directory contains all of the source files (it's copied directly from the cdroms) from that release of Slackware.

The /home/rworkman/build/source directory contains all of the sources for my SlackBuild scripts and such (it's set up basically identical to what the Slackware source directory contains).

The /home/rworkman/build/packages directory contains all of the packages compiled from my sources.

Integration of Directory Structure with Executing SlackBuild Scripts

With some good environment variables declared in your SlackBuild scripts, it's relatively easy to manage this setup:

PKG_OUT=/home/rworkman/build/packages

Final Thoughts

As always, what works for me may not be ideal for you, so adjust your expectations accordingly :)

Other Resources