VCS package guidelines
Revision as of 15:45, 4 November 2009 by Gen2ly (Clean Up)
General guidelines to creating PKGBUILDS for version control systems.
The abs package provides prototypes for cvs, svn, git and darcs PKGBUILDs. When abs is installed, they are installed in Template:Filename.
-gitwhere 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
--holdverin man makepkg if you want otherwise.
--holdveronly 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
- 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
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).