From: Matthew Monaco <matthew.monaco@0x01b.net> If the package's name does not end in -git/svn/etc, then don't touch the pkgver or pkgrel. This changes the current semantics of makepkg, but it shouldn't be too mind blowing. Currently in core/extra there are two vcs packages (svn) which use _svntrunk and _svnmod. They also use -svn in the pkgname so they won't be affected (mplayer-svn, seom-svn). In addition, vim uses the _hg directives but with a double underscore (presumably to avoid automatic versioning despite not being vim-git). In community there are a few packages which use the vcs directives but do not have a -vcs name. Most of these appear to never want an automatic version number (blender, boinc, bti, cfml, go, lorcon, sfml). The exceptions in community are: fusion-icon, ldc, notion, opencollada. --- doc/PKGBUILD.5.txt | 3 ++- scripts/makepkg.sh.in | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt index a21c1df..7459521 100644 --- a/doc/PKGBUILD.5.txt +++ b/doc/PKGBUILD.5.txt @@ -389,7 +389,8 @@ makepkg supports building development versions of packages without having to manually update the pkgver in the PKGBUILD. This was formerly done using the separate utility 'versionpkg'. In order to utilize this functionality, your PKGBUILD must use correct variable names depending on the SCM being fetched -from (e.g., 'makepkg-git', 'mplayer-svn'). +from *and* the name of the package must end in -SCM (e.g., 'makepkg-git', +'mplayer-svn'). *CVS*:: The generated pkgver will be the date the package is built. diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index d4798ca..dd545c6 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1735,6 +1735,11 @@ devel_check() { vcs=${pkgname##*-} fi + if [[ "$vcs" != "${pkgname##*-}" ]]; then + warning "$(gettext "The pkgname does not end in -%s, skipping automatic versioning.")" "$vcs" + return 0 + fi + if ! type -p "$vcs" >/dev/null; then warning "$(gettext "Cannot find the %s binary required to determine latest %s revision.")" "$vcs" "$vcs" return 0 -- 1.7.9.3