Comments in the template code are not stripped when they are input and thus would end up in the exported PKGBUILD. To not clutter these, this file provides overview and documentation instead.
All templates end with a version number which should be increased on major changes. There always exists a symbolic link to the newest version, lacking any number.
-
source-github-release downloads the last release from GitHub and generates a version number looking at its tag. The location is generated from a
$urlpointing to the homepage of the repository, which can be overwritten by setting a$_giturlpointing to the latest release GitHub API location before including the template. -
source-github-tag does the same for the newest tag. As GitHub has no notion of a "latest" tag, the one to use is determined purely to be the first in the order given out by GitHub. Because of that
$_giturlshould analogously point to the list of tags instead, when used. -
source-git-json is an extension of the git template, looking for a
.jsonfile to determine the$pkgverfrom itsversionfield. -
adjust-version contains a
preparefunction that modifies themetadata.jsonof an extension to be exactly compatible with the gnome-shell versions thedependsarray specifies. It is used to make the package installable with versions that are not officially supported by the developer, which mostly happens because the extension is not actively maintained any more. If the functionality is known to be restricted under certain versions, the package should tell so in the post_install and post_upgrade hooks of its installer script. -
find-version adds gnome-shell to the dependencies, restricted to the versions parsed from the
metadata.json.As this file has to be present in
$srcdir, the.SRCINFOofPKGBUILDs utilizing the version range can only be correctly generated after the sources are downloaded and extracted. If themetadata.jsonis not yet present, the package will be configured to be dependend on gnome-shell independent of any version. It is advised to runmakepkgto compile the package before executingmakepkg -S,makeaurball,mksrcinfoor anything alike. -
gnome-shell-version is a small snippet that spits out the currently installed version of gnome-shell. It is used in the former two templates.
-
modularize-package sets up a modular
packagefunction that will call all functions of the naming patternpackage_<number>_<name>in order. Multiple of these package functions may have the same numbers. They will then be called in alphabetical order. Inclusion of this template is needed to use any of the remaining templates. -
install-code installs the extension code. It is most probably always used and uses numbers below
05in its function names so that these are called first. They set up the variable$destdirpointing to the root directory of the extension. It can be used to install additional content to there. As all other installation templates use numbers10and up, numbers05to10are recommended for this purpose. -
install-locale installs translations from the
localedirectory in the extension root to/usr/share/locale. Include it whenever the extension is translated. -
install-schemas installs glib schema XML definitions from the extension root to their common location it also sets up the install script to
gschemas.installwhen not previously defined. When using this template, link the common installer script into the package or provide a custom one that at least includes the same functionality, compiling the schemas on update, installation and removal. This template is appropriate to use whenever schemas are present. -
unify-conveniencejs links to
convenience.jsfrom GNOME's own extensions instead of installing a copy to the extension for the cost of being dependent of gnome-shell-extensions. This saves space and is appropriate whenever the extension source includes a fileconvenience.jssimilar to the common variant. -
github contains a notice to this repositories location as a comment, where all the PKGBUILDs are maintained. It is intended to be placed directly under the list of maintainer and contributors to the PKGBUILD.