| 148 | | ...TODO... |
| | 148 | These are the global (i.e. one instance per port) environment variables recognized by !HaikuPorter: |
| | 149 | |
| | 150 | ==== BUILD_PACKAGE_ACTIVATION_PHASE ==== |
| | 151 | - '''Type:''' String - one of ['BUILD', 'TEST' or 'INSTALL'] |
| | 152 | - '''Purpose:''' Tell !HaikuPorter in which build phase the [wiki:HaikuPorterForPM/PortsAndPackages#TheBuildPackages build package(s)] should be activated. By default, this happens just before the `BUILD` phase, but if a port depends on being able to execute its own binaries during the build (`autoconf` is an example), this must happen at a later phase (usually `INSTALL`). |
| | 153 | - '''Required:''' No |
| | 154 | - '''Default:''' 'BUILD' |
| | 155 | |
| | 156 | ==== DISABLE_SOURCE_PACKAGE ==== |
| | 157 | - '''Type:''' YesNo - one of ['yes', 'true', 'no', 'false'], case insensitive |
| | 158 | - '''Purpose:''' Normally, !HaikuPorter creates a source package for every port. This option can be used to disable the creation of that source package. |
| | 159 | - '''Required:''' No |
| | 160 | - '''Default:''' 'no' |
| | 161 | |
| | 162 | ==== HOMEPAGE ==== |
| | 163 | - '''Type:''' List of URLs, one per line |
| | 164 | - '''Purpose:''' Specify one or more websites that are homepages for this port. |
| | 165 | - '''Required:''' Yes |
| | 166 | - '''Default:''' None |
| | 167 | |
| | 168 | ==== MESSAGE ==== |
| | 169 | - '''Type:''' String |
| | 170 | - '''Purpose:''' Specifies a message to be shown and acknowledged by the user (i.e. packager) before this port will be built. |
| | 171 | - '''Required:''' No |
| | 172 | - '''Default:''' None |
| | 173 | |
| | 174 | ==== REVISION ==== |
| | 175 | - '''Type:''' Positive Integer |
| | 176 | - '''Purpose:''' Defines the revision of the build recipe (which is an addition to the version of the port). Whenever something is changed in the recipe that has an effect on the built packages (basically everytime the build recipe is changed), this number has to be incremented. Additionally, whenever a patch files is changed, this number has to be incremented, too. |
| | 177 | - '''Required:''' Yes |
| | 178 | - '''Default:''' 1 |
| | 179 | |
| | 180 | The following set of environment variables exists for each defined source archive, the first set of variables is named like shown here, the second set gets a `_2` suffix, the third a `_3` suffix and so on. |
| | 181 | |
| | 182 | Note: |
| | 183 | most ports only have one source archive, so they don't need the additional sets. |
| | 184 | |
| | 185 | ==== CHECKSUM_MD5 ==== |
| | 186 | - '''Type:''' MD5-checksum |
| | 187 | - '''Purpose:''' Defines the MD5-checksum that shall be used by !HaikuPorter for validating the downloaded source archive. |
| | 188 | - '''Required:''' Yes, unless the port does not use a source archive (for instance when the sources are fetched from a version control repository). |
| | 189 | - '''Default:''' None |
| | 190 | |
| | 191 | ==== PATCHES (deprecated) ==== |
| | 192 | - '''Type:''' String |
| | 193 | - '''Purpose:''' Specify one or more patch files to be applied to the sources of this port. This is deprecated in favour of making use of the implicit git repository that is created for ports using a source archive (and the corresponding patchset). |
| | 194 | - '''Required:''' No |
| | 195 | - '''Default:''' None |
| | 196 | |
| | 197 | ==== SOURCE_DIR ==== |
| | 198 | - '''Type:''' String |
| | 199 | - '''Purpose:''' Specify the sub-directory where the sources are after the source archive has been unpacked. Most ports should use `'$portVersionedName'`, as that seems to be the most popular way of archiving the sources. |
| | 200 | - '''Required:''' No |
| | 201 | - '''Default:''' None |
| | 202 | |
| | 203 | ==== SOURCE_EXPORT_SUBDIR ==== |
| | 204 | - '''Type:''' String |
| | 205 | - '''Purpose:''' Tells !HaikuPorter to only export the given sub-directory into the source package. This can be useful if a port pulls in a large source archive but only uses a subdirectory of that itself. An example are the current build recipes for `binutils` and `gcc`. |
| | 206 | - '''Required:''' No |
| | 207 | - '''Default:''' None |
| | 208 | |
| | 209 | ==== SRC_FILENAME ==== |
| | 210 | - '''Type:''' String |
| | 211 | - '''Purpose:''' Can be used to specify a local filename for the source archive. This is useful if the URLs from where the source is fetched doesn't provide a proper filename (e.g. `http://sw.example.org/cool-stuff-1.3/download`). |
| | 212 | - '''Required:''' No |
| | 213 | - '''Default:''' None |
| | 214 | |
| | 215 | ==== SRC_URI ==== |
| | 216 | - '''Type:''' String |
| | 217 | - '''Purpose:''' Specify one or more URIs for downloading the respective source archive from. SRC_URI can provide more than one URIs (one per line), all of which are expected to provide exactly the same file. If a port requires more than one source archives, it has to provide the URIs for the second archive in SRC_URI_2. |
| | 218 | - '''Required:''' Yes |
| | 219 | - '''Default:''' None |
| | 220 | - '''URI-Types:''' The following URI-types are supported: |
| | 221 | - '''!http://''', '''!https://''' and '''!ftp://''': Download of source archive via `wget` |
| | 222 | - '''!bzr://''': Download via checkout of Bazaar repository. |
| | 223 | - '''!cvs://''': Download via checkout of CVS repository. |
| | 224 | - '''!fossil://''': Download via cloning of Fossil repository. |
| | 225 | - '''!git://''': Download via cloning of Git repository. |
| | 226 | - '''!hg://''', '''!hg+...://''': Download via cloning of Mercurial repository. |
| | 227 | - '''!svn://''', '''!svn+...://''': Download via checkout of Subversion repository. |
| | 228 | |
| | 229 | Finally, there is a set of output variables that can be set per-package. A sibling package can be defined by extending one of these variables with `_<packageSuffix>`. If for instance you set `SUMMAY_devel='Development files for foo'` in the `foo`-recipe, a sibling package `foo_devel` will be created alongside of the base package named `foo`. |
| | 230 | |
| | 231 | This is the set of per-package variables: |
| | 232 | |
| | 233 | ... TODO ... |