Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=bce97e9d6a29f5cc0b61f4f82e7de263693bf1e1

commit bce97e9d6a29f5cc0b61f4f82e7de263693bf1e1
Author: Michel Hermier <herm...@frugalware.org>
Date:   Wed Jan 5 21:36:09 2011 +0100

util.sh: Introduce _F_archive_ver.

* Introduce this facility in the hoppe it help reduce the ${pkgver/-/_}
madness. Also, one can do: pkgver=`Fsanitizeversion "$_F_archive_ver"`
to automagically generate pkgver from _F_archive_ver.

diff --git a/source/include/util.sh b/source/include/util.sh
index 2c90780..57ad90b 100644
--- a/source/include/util.sh
+++ b/source/include/util.sh
@@ -24,6 +24,7 @@
#
# == OPTIONS
# * _F_archive_name (defaults to $pkgname)
+# * _F_archive_ver (defaults to $pkgver$pkgextraver)
# * _F_archive_prefix (defaults to "")
# * _F_archive_nolinksonly (defaults to no, so that only links are proceeded by
# default)
@@ -32,7 +33,7 @@
# searching for the version
# * _F_archive_grepv (defaults to empty): grep -v for a regexp before
# searching for the version
-# * _F_cd_path (defaults to $_F_archive_name$Fpkgversep$pkgver$pkgextraver)
+# * _F_cd_path (defaults to $_F_archive_name$Fpkgversep$_F_archive_ver)
# * _F_conf_configure (defaults to ./configure)
# * _F_conf_perl_pipefrom: if set, pipe the output of this command in Fconf()
# for perl packages
@@ -247,8 +248,11 @@ Fcd() {
if [ -z "$_F_archive_name" ]; then
_F_archive_name="$pkgname"
fi
+       if [ -z "$_F_archive_ver" ]; then
+               _F_archive_ver="$pkgver$pkgextraver"
+       fi
if [ -z "$_F_cd_path" ]; then
-               _F_cd_path="$_F_archive_name$Fpkgversep$pkgver$pkgextraver"
+               _F_cd_path="$_F_archive_name$Fpkgversep$_F_archive_ver"
fi

if [ "$Fsrcdir" = `pwd` ]; then
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to