Difference between revisions of "Using the PBI Builder"

From PC-BSD Wiki
Jump to: navigation, search
m (Redirected page to PBI Module Builder Guide)
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Using the PBI Builder Software ==
+
#REDIRECT [[PBI Module Builder Guide]]
 
+
This guide is intended to instruct developers, or simply the curious, on how to use the PBI Builder software, which compiles a FreeBSD port, and turns it into a fully-functional PBI file.
+
 
+
=== Installation ===
+
 
+
Installing the PBI Builder software relatively easy, simply download the tbz package from the [[http://www.pcbsd.org/content/view/45/30/ PBI Builder Homepage]], and place it somewhere on your system with several GB of free space. Next run these commands (as root):
+
 
+
  # tar xvjpf pbibuild*.tbz
+
  # ln -s `pwd`/pbi-build /pbi-build
+
 
+
Note: On regular FreeBSD systems, you will need to install "bash" for the builder to function, and link it to /bin/bash. This step is not required on PC-BSD.
+
 
+
  # pkg_add -r bash
+
  # ln -s /usr/local/bin/bash /bin/bash
+
 
+
+
 
+
=== Usage Instructions ===
+
 
+
Using the PBI builder to convert a port into a PBI is very simple. First, you will need to copy a module directory into the /pbi-build/modules directory. Several examples are provided in /pbi-build/docs/module-examples, or you may copy a module from our [[http://trac.pcbsd.org/browser/pbibuild/modules/ subversion repository]]. After you have done this, simply run these commands:
+
 
+
  # cd /pbi-build
+
  # ./buildpbi.sh
+
 
+
The first time you run the buildpbi.sh script, it will connect to CVS and download a copy of the ports tree. You may change the cvsup server it uses by editing /pbi-build/conf/ports-supfile. If you wish to update your ports tree, simply run "/pbi-build/cron/cvsup-nightly.sh". This script may be run from cron to ensure that your ports tree is always up to date.
+
 
+
 
+
=== Advanced Usage ===
+
 
+
The PBI Builder has a few extra options which you may wish to use during the creation of your PBI.
+
 
+
==== Selective Module building ====
+
 
+
When the modules diretory contains many different modules for building, it may be necessary to single out only one of them for creation instead of rebuilding all of them. To single out a module for building simply run ./buildpbi.sh with a module name as the first agument:
+
 
+
  # ./buildpbi.sh firefox (This will build the module /pbi-build/modules/firefox, ignoring all others for this run)
+
+
 
+
==== PBI Build (Without re-compile) ====
+
 
+
During the creation of a new module, it may become necessary to recreate the PBI file to test new configurations. Often this does not require the complete rebuilding of the port from source. By skipping the source build, a new PBI may be generated within momements. To skip the building simply run the 3.makepbi.sh script in /pbi-build/scripts/3.makepbi.sh as shown:
+
 
+
# cd /pbi-build/scripts
+
# ./3.makepbi.sh firefox
+
 
+
This will rebuild the FireFox PBI using the /pbi-buid/modules/firefox configuration, skipping the actual port re-building.
+
 
+
NOTE: This requires that you have a full build of the port already finished in /pbi-build/pbisandbox
+
+
 
+
==== The PBI Sandbox ====
+
 
+
In order to build a port without touching the host system, all creation is done in the /pbi-build/pbisandbox directory. This is a complete buildworld environment, and you may "chroot" into it in order to tweak a port build, or inspect the built contents of a port.
+
 
+
  # chroot /pbi-build/pbisandbox
+

Revision as of 22:55, 7 February 2012

  1. REDIRECT PBI Module Builder Guide
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox