HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • ← Previous Change
  • Wiki History
  • Next Change →

Changes between Version 6 and Version 7 of BepFile


Ignore:
Timestamp:
01/04/08 00:47:49 (8 years ago)
Author:
brecht
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BepFile

    v6 v7  
    99=== Key types === 
    1010 
    11 There are three types of keys in a !BepFile: single-value, list-of-values and shell-commands. 
     11There are three types of keys in a !BepFile: single-value, list-of-values and shell commands. 
    1212 
    1313The key label is subject to the following rules: 
    14  * the key label must be in all capitals and consist only of letters (A-Z) and underscores 
     14 * the key label must be in all capitals and consist only of letters (A-Z), numbers (0-9) and underscores 
    1515 * there may be no whitespace in front of the key label 
    16  * there may be whitespace around the '=', but it is not required 
    1716 
    1817==== A key with a '''single value''' ==== 
    … …  
    2322 
    2423The syntax is subject to the following rules: 
     24 * there may be whitespace around the '=', but it is not required 
    2525 * the value should be enclosed within double quotes 
    2626 * there may be whitespace after the closing quote 
    … …  
    4545{{{ 
    4646KEY = { 
    47        command1 
    48        command2 
    49        command3 
     47       line1 
     48       line2 
     49       line3 
    5050      } 
    5151}}} 
    5252 
    5353The syntax is subject to these rules: 
    54  * the line of the key label end with an opening brace '{', with no command following it 
    55  * one command is entered per line 
    56  * every command is indented by whitespace (tabs or spaces) 
     54 * the line of the key label ends with an opening brace '{', with nothing following it (except for whitespace) 
     55 * each line is indented by whitespace (tabs or spaces) 
    5756 * the closing brace '}' is on on a seperate line, preceded by whitespace 
     57 * the lines between the braces are interpreted as a shell script (bash); hence, it is possible to use conditional execution and insert comments using '#' (see below) 
    5858 
    5959=== List of keys === 
    … …  
    7070||{{{STATUS_HAIKU}}}||indicates the status of this port on Haiku||single||status ({{{untested}}}, {{{unstable}}}, {{{stable}}})||no||{{{untested}}}|| 
    7171||{{{DEPEND}}}||(list of) !BePort(s) this port depends upon||single, list||{{{category/portname >= portversion}}}||no||-|| 
    72 ||{{{BUILD}}}||list of shell commands to execute in order to build the port||shell||shell commands||no||-|| 
     72||{{{BUILD}}}||list of shell commands (script) to execute in order to build the port||shell||shell commands||no||-|| 
    7373||{{{INSTALL}}}||list of shell commands to execute in order to install the port||shell||shell commands||no||-|| 
     74 
     75Inside the BUILD and INSTALL scripts, it is possible to distinguish between the different BeOS platforms using the {{{BEPORTS_PLATFORM}}} environment variable. It can be one of {{{R5}}}, {{{BONE}}} or {{{HAIKU}}}. 
     76 
     77An example of a build script is shown below.  
     78{{{ 
     79BUILD { 
     80        cd xyz-1.0.0 
     81        if [ "$BEPORTS_PLATFORM" = "BONE" ] ; then 
     82                export EXTRA_CONFARGS = "--enable-debug"        # there are still some problems on BONE 
     83        else 
     84                export EXTRA_CONFARGS = "" 
     85        fi 
     86        ./configure --prefix=/boot/home/config $EXTRA_CONFARGS 
     87        make 
     88} 
     89}}} 
    7490 
    7591When a key is not listed in the BepFile, BePorter assumes the default value, or an empty string/list (if no default value is specified above). 

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/