VCS package guidelines

From ArchWiki
Revision as of 05:53, 28 November 2009 by Gen2ly (Talk | contribs) (Added categories, summary)

Jump to: navigation, search

Template:Article summary start Template:Article summary text Template:Article summary heading Template:I18n entry Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary end 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