From: Matthew Monaco <matthew.monaco@0x01b.net> This will allow packages to be built with an automatic development version even if the package's name does not end in -git/svn/etc. --- doc/makepkg.8.txt | 4 ++++ scripts/makepkg.sh.in | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt index df41e18..e0255d0 100644 --- a/doc/makepkg.8.txt +++ b/doc/makepkg.8.txt @@ -58,6 +58,10 @@ Options will break the build process if all of the dependencies are not installed. +*--devver*:: + Force makepkg to automatically bump pkgver if a package uses VCS directives + but does not have a name that ends in -vcs. + *-e, \--noextract*:: Do not extract source files; use whatever source already exists in the src/ directory. This is handy if you want to go into src/ and manually diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index dd545c6..aa68dc5 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -70,6 +70,7 @@ LOGGING=0 SOURCEONLY=0 IGNOREARCH=0 HOLDVER=0 +DEVVER=0 BUILDFUNC=0 CHECKFUNC=0 PKGFUNC=0 @@ -1735,8 +1736,8 @@ devel_check() { vcs=${pkgname##*-} fi - if [[ "$vcs" != "${pkgname##*-}" ]]; then - warning "$(gettext "The pkgname does not end in -%s, skipping automatic versioning.")" "$vcs" + if [[ "$vcs" != "${pkgname##*-}" ]] && (( ! DEVVER )); then + warning "$(gettext "The pkgname does not end in -%s, use --devver to force automatic versioning.")" "$vcs" return 0 fi @@ -1892,6 +1893,7 @@ usage() { printf -- "$(gettext " --asroot Allow %s to run as root user")\n" "makepkg" printf -- "$(gettext " --check Run the %s function in the %s")\n" "check()" "$BUILDSCRIPT" printf -- "$(gettext " --config <file> Use an alternate config file (instead of '%s')")\n" "$confdir/makepkg.conf" + printf -- "$(gettext " --devver Force automatic version bumping for development %ss")\n" "$BUILDSCRIPT" printf -- "$(gettext " --holdver Prevent automatic version bumping for development %ss")\n" "$BUILDSCRIPT" printf -- "$(gettext " --key <key> Specify a key to use for %s signing instead of the default")\n" "gpg" printf -- "$(gettext " --nocheck Do not run the %s function in the %s")\n" "check()" "$BUILDSCRIPT" @@ -1933,7 +1935,7 @@ ARGLIST=("$@") # Parse Command Line Options. OPT_SHORT="AcdefFghiLmop:rRsSV" -OPT_LONG="allsource,asroot,ignorearch,check,clean,nodeps" +OPT_LONG="allsource,asroot,ignorearch,check,clean,nodeps,devver" OPT_LONG+=",noextract,force,forcever:,geninteg,help,holdver,skippgpcheck" OPT_LONG+=",install,key:,log,nocolor,nobuild,nocheck,nosign,pkg:,rmdeps" OPT_LONG+=",repackage,skipchecksums,skipinteg,skippgpcheck,sign,source,syncdeps" @@ -1961,6 +1963,7 @@ while true; do --check) RUN_CHECK='y' ;; --config) shift; MAKEPKG_CONF=$1 ;; -d|--nodeps) NODEPS=1 ;; + --devver) DEVVER=1 ;; -e|--noextract) NOEXTRACT=1 ;; -f|--force) FORCE=1 ;; #hidden opt used by fakeroot call for svn/cvs/etc PKGBUILDs to set pkgver -- 1.7.9.3