Changeset ec56744 in rtems-source-builder

Apr 21, 2013, 8:36:36 AM (7 years ago)
Chris Johns <chrisj@…>
4.10, 4.11, 4.9, 5, master

Add source and patches section.

1 edited


  • doc/source-builder.txt

    r29a300a rec56744  
    599599block comment.
     601Source and Patches
     604The RTEMS Source Builder provides a flexible way to manage source. Source and
     605patches are declare in configurations file using the +source+ and +patch+
     606directives. There are a single line containing a Universal Resource Location or
     607URL and can contain macros and shell expansions. The <<_prep,%prep>> section
     608details the source and patch directives
     610The URL can reference remote and local source and patch resources. The
     611following schemes are provided:
     613'http':: Remote access using the HTTP protocol.
     614'https':: Remote access using the Secure HTTP protocol.
     615'ftp:: Remote access using the FTP protocol.
     616'git:: Remote access to a GIT repository.
     617'cvs:: Remote access to a CVS repository.
     618'file:: Local access to an existing source directory.
     620HTTP, HTTPS, and FTP
     623Remote access to TAR files is provided using HTTP, HTTPS and FTP protocols. The
     624full URL provided is used to access the remote file including any query
     625components. The URL is parsed to extract the file component and the local
     626source directory is checked for that file. If the file is located the remote
     627file is not downloaded. Currently no other checks are made. If a download fails
     628you need to manually remove the file from the source directory and start the
     629build process again.
     631The URL can contain macros. These are expand before issuing the request to
     632download the file. The GNU GCC compiler source URL is:
     638The type of compression is automatically detected from the file extension. The
     639supported compression formats are:
     641`gz`:: GNU ZIP
     642`bzip2`:: BZIP2 ??
     643`zip`:: ??
     644'xy':: XY ??
     646The output of the decompression tool is feed to the standard `tar` utility and
     647unpacked into the build directory.
     649If the URL references the GitHub API server '' a tarball
     650of the specified version is download. For example the URL for the STLINK
     651project on GitHub and version is:
     654%define stlink_version 3494c11
     658the TAR file is downloaded and used.
     663A GIT repository can be cloned and used as source. The GIT repository resides
     664in the 'source' directory under the `git` directory. You can edit, update and
     665use the repository as you normally do and the results will used to build the
     666tools. This allows you to prepare and test patches in the build environment the
     667tools are built in. The GIT URL only supports the GIT protocol. You can control
     668the repository via the URL by appending options and arguments to the GIT
     669path. The options are delimited by `?` and option arguments are delimited from
     670the options with `=`. The options are:
     672`branch`:: Checkout the specified branch.
     673`pull`:: Perform a pull to update the repository.
     674`fetch`:: Perform a fetch to get any remote updates.
     675`reset`:: Reset the repository. Useful to remove any local changes. You can
     676pass the `hard` argument to force a hard reset.
     679Source0: git://
     682This will clone the GCC git repository and checkout the 4.7-branch and perform
     683a hard reset.
     688A CVS repository can be checked out. CVS is more complex than GIT to handle
     689because of the modules support. This can effect the paths the source ends up
     690in. The CVS URL only supports the CVS protocol. You can control the repository
     691via the URL by appending options and arguments to the CVS path. The options are
     692delimited by `?` and option arguments are delimited from the options with
     693`=`. The options are:
     695`module`:: The module to checkout.
     696`src-prefix`:: The path into the source where the module starts.
     697`tag`:: The CVS tag to checkout.
     698`date`:: The CVS date to checkout.
     701Source0: cvs://
    601704Macros and Defaults
    9691072%ifn %{defined Source0}
    9701073 Source0:{gcc_version}/gcc-%{gcc_version}.tar.bz2
    971  VersionContro0: git clone git:// <1>
    975 <1> The version control macro is currently not implemented.
    9771077You could optionally have a few source files that make up the package. For
Note: See TracChangeset for help on using the changeset viewer.