The PKGBUILD files can be fetched via the ABS utility. To learn more about ABS, see the ABS wiki page.
You can view the history of all the PKGBUILD files from the Repository WebSVN interface.
You can also get individual PKGBUILDs directly from SVN. This can be especially useful if you need to compile an older version of a package. DO NOT CHECK OUT THE ENTIRE SVN REPO. Your address may be blocked. Use the following commands to check out a specific package:
svn checkout --depth=empty svn://svn.archlinux.org/packages cd packages svn update <your-package-name>For the community repository, use the following commands instead:
svn checkout --depth=empty svn://svn.archlinux.org/community cd community svn update <your-package-name>
Visit the wiki for more tips on checking out and updating svn PKGBUILDs.