Difference between revisions of "VCS package guidelines"

From ArchWiki
Jump to: navigation, search
(Prototypes)
(Added categories, summary)
Line 1: Line 1:
 
[[Category:Package development (English)]]
 
[[Category:Package development (English)]]
[[Category:HOWTOs (English)]]
 
 
[[Category:Guidelines (English)]]
 
[[Category:Guidelines (English)]]
 
+
{{Article summary start}}
General guidelines to creating PKGBUILDS for version control systems.
+
{{Article summary text|Creating PKGBUILDs for version control systems.}}
 +
{{Article summary heading|Available in languages}}
 +
{{i18n entry|English|Building Packages in Arch Linux}}
 +
{{Article summary heading|Related articles}}
 +
{{Article summary wiki|ABS - The Arch Build System}}
 +
{{Article summary wiki|Arch Linux User-Community Repository (AUR)}}
 +
{{Article summary wiki|makepkg}}
 +
{{Article summary wiki|pacman}}
 +
{{Article summary wiki|PKGBUILD Tricks}}
 +
{{Article summary wiki|PKGBUILD Variables}}
 +
{{Article summary end}}
 +
Guidelines to creating PKGBUILDS for version control systems.
  
 
== Prototypes ==
 
== Prototypes ==

Revision as of 05:53, 28 November 2009

Summary help replacing me
Creating PKGBUILDs for version control systems.
Available in languages

Template:I18n entry

Related articles
ABS - The Arch Build System
Arch Linux User-Community Repository (AUR)
makepkg
pacman
PKGBUILD Tricks
PKGBUILD Variables

Guidelines to creating PKGBUILDS for version control systems.

Prototypes

The abs package provides prototypes for cvs, svn, git and darcs PKGBUILDs. When abs is installed, you can find them in Template:Filename.

Tips

  • Suffix pkgname with -cvs, -svn or -git where applicable - this prevents confusion with non-development versions of packages (e.g. fluxbox-svn or fvwm-cvs vs fluxbox and fvwm).
  • When makepkg is run by default, it will check for newer revisions and then update the pkgver in the PKGBUILD. Look at --holdver in man makepkg if you want otherwise. --holdver only works correctly for cvs and svn, which allow checkout of older revisions.
  • Check for package conflicts. For example fluxbox-svn will conflict with fluxbox. In this case, you need to use conflicts=('fluxbox').
  • Use the 'provides' field so that pkgs that require the non-VCS package can be installed (provides=('fluxbox')).
  • You should AVOID using replaces= as it generally causes unnecessary problems
  • When using/defining the cvsroot use anonymous:@ rather than anonymous@ to avoid having to press enter to give blank password OR anonymous:password@ - if a password is required.
  • Though it is often unneccesary to use the pkgrel field when building CVS/SVN/GIT pkgs (any changes to the pkg will often be on another day and so are usually accounted for by a change in pkgver [assuming pkgver is used to hold a date format], makepkg will require it.
  • Don't forget to include the appropriate vcs tool (cvs,subversion,git,...) in makedepends=.
  • To preserve the integrity of the checked out code consider copying the original build dir if you have to make edits... E.g. having checked out source code to src/$_cvsmod from $startdir you can use:
  
  mkdir src/$_cvsmod-build

  cd src/$_cvsmod-build
  ../$_cvsmod/configure

  #or

 cp -r src/$_cvsmod src/$_cvsmod-build
 cd src/$_cvsmod-build
  • With the introduction of the AUR, it is most important to avoid using backtick execution to create pkg variables. makepkg will automatically bumps the pkgver anyway when building the package (unless --holdver is used).

Related Links