FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 03-12-2012, 05:53 PM
 
Default makepkg: add --devver option for SCM packages

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")
" "makepkg"
printf -- "$(gettext " --check Run the %s function in the %s")
" "check()" "$BUILDSCRIPT"
printf -- "$(gettext " --config <file> Use an alternate config file (instead of '%s')")
" "$confdir/makepkg.conf"
+ printf -- "$(gettext " --devver Force automatic version bumping for development %ss")
" "$BUILDSCRIPT"
printf -- "$(gettext " --holdver Prevent automatic version bumping for development %ss")
" "$BUILDSCRIPT"
printf -- "$(gettext " --key <key> Specify a key to use for %s signing instead of the default")
" "gpg"
printf -- "$(gettext " --nocheck Do not run the %s function in the %s")
" "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,hel p,holdver,skippgpcheck"
OPT_LONG+=",install,key:,log,nocolor,nobuild,noche ck,nosign,pkg:,rmdeps"
OPT_LONG+=",repackage,skipchecksums,skipinteg,skip pgpcheck,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
 

Thread Tools




All times are GMT. The time now is 09:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org