summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--specs/spf-2.0/buildsys.mdwn135
1 files changed, 135 insertions, 0 deletions
diff --git a/specs/spf-2.0/buildsys.mdwn b/specs/spf-2.0/buildsys.mdwn
index 5f5e302..93cb800 100644
--- a/specs/spf-2.0/buildsys.mdwn
+++ b/specs/spf-2.0/buildsys.mdwn
@@ -20,3 +20,138 @@ directory named `dest` shall be created.
After all expected binary packages have been built, the work area (`tmp` and its
children) shall be removed.
+
+
+Environment Variables [env-vars]
+================================
+
+Certain environment variables shall be set to provide to the configuration
+script and build makefile information about the package and the environments in
+and for which binary packages are to be built.
+
+The terms "build system" and "host system" below are used according to [the
+convention set by GNU Autoconf][target-triplets]. The build system is the type
+of system on which a package is built. The host system is the type of system on
+which a binary package is expected to be natively installed and used.
+
+Package Variables [env-vars-pkg]
+--------------------------------
+
+The following environment variables shall be set to describe the source package:
+
+ * `OPK_SOURCE`
+
+ The source package name, as given in the most recent entry of the change
+ log. See $[sectlink][changelog] for more information on the source package
+ name.
+
+ * `OPK_SOURCE_VERSION`
+
+ The source package version, as given in the most recent entry of the change
+ log. See $[sectlink][src-ver] for the syntax of source package version
+ identifiers.
+
+ * `OPK_SOURCE_VERSION_UPSTREAM`
+
+ * `OPK_BINARY_VERSION`
+
+Build and Host System Variables [env-vars-sys]
+----------------------------------------------
+
+The following environment variables shall be set to describe the build system:
+
+ * `OPK_BUILD_ARCH`
+
+ The distribution architecture string of the build system.
+
+ * `OPK_BUILD_ARCH_CPU`
+
+ The CPU component of the distribution architecture string of the build
+ system.
+
+ * `OPK_BUILD_ARCH_KERNEL`
+
+ The kernel component of the distribution architecture string of the build
+ system.
+
+ * `OPK_BUILD_ARCH_LIBS`
+
+ The system libraries component of the distribution architecture string of
+ the build system.
+
+ * `OPK_BUILD_ARCH_GNU`
+
+ The GNU system type of the build system.
+
+ * `OPK_BUILD_PLAT`
+
+ The application platform of the build system.
+
+The following environment variables shall be set to describe the host system:
+
+ * `OPK_HOST_ARCH`
+
+ The distribution architecture string of the host system.
+
+ * `OPK_HOST_ARCH_CPU`
+
+ The CPU component of the distribution architecture string of the host
+ system.
+
+ * `OPK_HOST_ARCH_KERNEL`
+
+ The kernel component of the distribution architecture string of the host
+ system.
+
+ * `OPK_HOST_ARCH_LIBS`
+
+ The system libraries component of the distribution architecture string of
+ the host system.
+
+ * `OPK_HOST_ARCH_GNU`
+
+ The GNU system type of the host system.
+
+ * `OPK_HOST_PLAT`
+
+ The application platform of the host system.
+
+Toolchain Variables [env-vars-tools]
+------------------------------------
+
+The following environment variables shall be set to describe the toolchain:
+
+ * `AR`
+
+ * `AS`
+
+ * `CC`
+
+ * `CPP`
+
+ * `CXX`
+
+ * `LD`
+
+ * `NM`
+
+ * `OBJCOPY`
+
+ * `OBJDUMP`
+
+ * `RANLIB`
+
+ * `READELF`
+
+ * `SIZE`
+
+ * `STRINGS`
+
+ * `STRIP`
+
+Note that the environment variables assume the use of GNU Binutils and GCC.
+Support for other toolchains may be specified in a future version of this source
+package format.
+
+
+[target-triplets]: https://www.gnu.org/software/autoconf/manual/html_node/Specifying-Target-Triplets.html