[pacman-dev] [PATCH 1/4] doc: Document using VCS sources in a PKGBUILD
Signed-off-by: Allan McRae <allan@archlinux.org> --- doc/PKGBUILD.5.txt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index 956179a..2ca3c98 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -109,6 +109,10 @@ It is also possible to change the name of the downloaded file, which is helpful with weird URLs and for handling multiple source files with the same name. The syntax is: `source=('filename::url')`. + +makepkg also supports building developmental versions of packages using sources +downloaded from version control systems (VCS). For more information, see +<<VCS,Using VCS Sources>> below. ++ Files in the source array with extensions `.sig`, `.sign` or `.asc` are recognized by makepkg as PGP signatures and will be automatically used to verify the integrity of the corresponding source file. @@ -383,6 +387,34 @@ The install script does not need to be specified in the source array. A template install file is available in '{pkgdatadir}' as 'proto.install' for reference with all of the available functions defined. +Using VCS Sources[[VCS]] +------------------------ +Building a developmental version of a package using sources from a version control +system (VCS) is enabled by specifying the source in the form +`source=('folder::url#fragment')`. Currently makepkg supports the `git` protocol. + +The source URL is divided into three components: + +*folder*:: + (optional) Specifies an alternate folder name for makepkg to download the VCS + source into. + +*url*:: + The url to the VCS repo. This must include the the vcs in the URL protocol for + makepkg to recognize this as a VCS source. If the protocol does not include + the VCS name, it can be added by prefixing the URL with `vcs+`. For example, + using a git repository over `http` would have a source URL in the form + `git+http://...`. + +*fragment*:: + (optional) Allows specifying a revision number or branch for makepkg to checkout + from the VCS. For example, to checkout a given revision, the source line would + have the format `source=(url#revision=123)`. The available fragments depends on + the VCS being used: + + *git*;; + branch, commit, tag + Example ------- The following is an example PKGBUILD for the 'patch' package. For more -- 1.7.11.2
Signed-off-by: Allan McRae <allan@archlinux.org> --- doc/PKGBUILD.5.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index 2ca3c98..2efacad 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -47,6 +47,11 @@ similar to `$_basekernver`. *pkgver*:: The version of the software as released from the author (e.g., '2.7.1'). The variable is not allowed to contain colons or hyphens. ++ +The `pkgver` variable can be automatically updated by providing a `pkgver()` function +in the PKGBUILD that outputs the new package version. This is run after downloading +and extracting the sources so can use those files in determining the new `pkgver`. +This is most useful when used with sources from version control systems (see below). *pkgrel*:: This is the release number specific to the Arch Linux release. This -- 1.7.11.2
Signed-off-by: Allan McRae <allan@archlinux.org> --- doc/PKGBUILD.5.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index 2efacad..db10041 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -396,7 +396,8 @@ Using VCS Sources[[VCS]] ------------------------ Building a developmental version of a package using sources from a version control system (VCS) is enabled by specifying the source in the form -`source=('folder::url#fragment')`. Currently makepkg supports the `git` protocol. +`source=('folder::url#fragment')`. Currently makepkg supports the `git` and `svn` +protocols. The source URL is divided into three components: @@ -420,6 +421,9 @@ The source URL is divided into three components: *git*;; branch, commit, tag + *svn*;; + revision + Example ------- The following is an example PKGBUILD for the 'patch' package. For more -- 1.7.11.2
Signed-off-by: Allan McRae <allan@archlinux.org> --- doc/makepkg.8.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt index 5427449..43e6115 100644 --- a/doc/makepkg.8.txt +++ b/doc/makepkg.8.txt @@ -91,6 +91,10 @@ Options *-h, \--help*:: Output syntax and command line options. +*--holdver*:: + When using VCS sources (see below) any currently checked out source will not + be updated to the latest revision. + *-i, \--install*:: Install or upgrade the package after a successful build using linkman:pacman[8]. -- 1.7.11.2
On 23/07/12 17:04, Allan McRae wrote:
Signed-off-by: Allan McRae <allan@archlinux.org> --- doc/makepkg.8.txt | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt index 5427449..43e6115 100644 --- a/doc/makepkg.8.txt +++ b/doc/makepkg.8.txt @@ -91,6 +91,10 @@ Options *-h, \--help*:: Output syntax and command line options.
+*--holdver*:: + When using VCS sources (see below) any currently checked out source will not + be updated to the latest revision.
Ugh... + When using VCS sources (linkman:PKGBUILD[5]) any currently checked out source + will not be updated to the latest revision.
*-i, \--install*:: Install or upgrade the package after a successful build using linkman:pacman[8].
participants (1)
-
Allan McRae